Fixed JavaScript errors which were breaking copy/paste/delete.

bug=324056 r=beng
This commit is contained in:
annie.sullivan%gmail.com 2006-01-20 17:03:45 +00:00
Родитель 5cd5d59918
Коммит 28a8f7ba17
3 изменённых файлов: 26 добавлений и 9 удалений

Просмотреть файл

@ -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>