зеркало из https://github.com/mozilla/gecko-dev.git
Fixed JavaScript errors which were breaking copy/paste/delete.
bug=324056 r=beng
This commit is contained in:
Родитель
5cd5d59918
Коммит
28a8f7ba17
|
@ -895,24 +895,25 @@ var PlacesController = {
|
|||
_getFolderCopyTransaction:
|
||||
function PC__getFolderCopyTransaction(data, container, index) {
|
||||
var transactions = [];
|
||||
var self = this;
|
||||
function createTransactions(folderId, container, index) {
|
||||
var folderTitle = this._bms.getFolderTitle(folderId);
|
||||
var folderTitle = self._bms.getFolderTitle(folderId);
|
||||
|
||||
var createTxn =
|
||||
new PlacesCreateFolderTransaction(folderTitle, container, index);
|
||||
transactions.push(createTxn);
|
||||
|
||||
// Get the folder's children
|
||||
var kids = this.getFolderContents(folderId,
|
||||
var kids = self.getFolderContents(folderId,
|
||||
ViewConfig.GENERIC_FILTER_OPTIONS);
|
||||
var cc = kids.childCount;
|
||||
for (var i = 0; i < cc; ++i) {
|
||||
var node = kids.getChild(i);
|
||||
if (this.nodeIsFolder(node))
|
||||
if (self.nodeIsFolder(node))
|
||||
createTransactions(node.folderId, folderId, i);
|
||||
else {
|
||||
var uri = this._uri(node.url);
|
||||
transactions.push(this._getItemCopyTransaction(uri, container,
|
||||
var uri = self._uri(node.url);
|
||||
transactions.push(self._getItemCopyTransaction(uri, container,
|
||||
index));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,6 +147,12 @@
|
|||
]]></body>
|
||||
</method>
|
||||
|
||||
<property name="isBookmarks">
|
||||
<getter><![CDATA[
|
||||
return PlacesController.nodeIsFolder(this.getResult());
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="hasSelection">
|
||||
<getter><![CDATA[
|
||||
return this._selection != null;
|
||||
|
@ -264,10 +270,12 @@
|
|||
})]]></field>
|
||||
|
||||
<method name="saveSelection">
|
||||
<body/>
|
||||
<body><![CDATA[
|
||||
]]></body>
|
||||
</method>
|
||||
<method name="restoreSelection">
|
||||
<body/>
|
||||
<body><![CDATA[
|
||||
]]></body>
|
||||
</method>
|
||||
</implementation>
|
||||
<handlers>
|
||||
|
|
|
@ -192,6 +192,12 @@
|
|||
]]></body>
|
||||
</method>
|
||||
|
||||
<property name="isBookmarks">
|
||||
<getter><![CDATA[
|
||||
return PlacesController.nodeIsFolder(this.getResult());
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="hasSelection">
|
||||
<getter><![CDATA[
|
||||
return this._selection != null;
|
||||
|
@ -363,10 +369,12 @@
|
|||
})]]></field>
|
||||
|
||||
<method name="saveSelection">
|
||||
<body/>
|
||||
<body><![CDATA[
|
||||
]]></body>
|
||||
</method>
|
||||
<method name="restoreSelection">
|
||||
<body/>
|
||||
<body><![CDATA[
|
||||
]]></body>
|
||||
</method>
|
||||
</implementation>
|
||||
<handlers>
|
||||
|
|
Загрузка…
Ссылка в новой задаче