Bug 912855 - Can't remove check-mark on "Load this bookmark in the sidebar". r=mak, a=akeybl
--- a/browser/components/places/content/bookmarkProperties.js
+++ b/browser/components/places/content/bookmarkProperties.js
@@ -552,20 +552,17 @@ var BookmarkPropertiesPanel = {
value : this._description,
expires: Ci.nsIAnnotationService.EXPIRE_NEVER };
let editItemTxn = new PlacesSetItemAnnotationTransaction(-1, annoObj);
childTransactions.push(editItemTxn);
}
if (this._loadInSidebar) {
let annoObj = { name : PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO,
- type : Ci.nsIAnnotationService.TYPE_INT32,
- flags : 0,
- value : this._loadInSidebar,
- expires: Ci.nsIAnnotationService.EXPIRE_NEVER };
+ value : true };
let setLoadTxn = new PlacesSetItemAnnotationTransaction(-1, annoObj);
childTransactions.push(setLoadTxn);
}
if (this._postData) {
let postDataTxn = new PlacesEditBookmarkPostDataTransaction(-1, this._postData);
childTransactions.push(postDataTxn);
}
--- a/browser/components/places/content/editBookmarkOverlay.js
+++ b/browser/components/places/content/editBookmarkOverlay.js
@@ -584,24 +584,20 @@ var gEditItemOverlay = {
if (keyword != PlacesUtils.bookmarks.getKeywordForBookmark(this._itemId)) {
var txn = new PlacesEditBookmarkKeywordTransaction(this._itemId, keyword);
PlacesUtils.transactionManager.doTransaction(txn);
}
},
onLoadInSidebarCheckboxCommand:
function EIO_onLoadInSidebarCheckboxCommand() {
- var loadInSidebarChecked = this._element("loadInSidebarCheckbox").checked;
- var annoObj = { name : PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO,
- type : Ci.nsIAnnotationService.TYPE_INT32,
- flags : 0,
- value : loadInSidebarChecked,
- expires: Ci.nsIAnnotationService.EXPIRE_NEVER };
- var txn = new PlacesSetItemAnnotationTransaction(this._itemId,
- annoObj);
+ let annoObj = { name : PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO };
+ if (this._element("loadInSidebarCheckbox").checked)
+ annoObj.value = true;
+ let txn = new PlacesSetItemAnnotationTransaction(this._itemId, annoObj);
PlacesUtils.transactionManager.doTransaction(txn);
},
toggleFolderTreeVisibility: function EIO_toggleFolderTreeVisibility() {
var expander = this._element("foldersExpander");
var folderTreeRow = this._element("folderTreeRow");
if (!folderTreeRow.collapsed) {
expander.className = "expander-down";