Bug 912855 - Can't remove check-mark on "Load this bookmark in the sidebar". r=mak

This commit is contained in:
Asaf Romano 2013-10-09 16:33:58 +02:00
parent be6e11caa4
commit 2edf767025
2 changed files with 5 additions and 12 deletions

View File

@ -557,10 +557,7 @@ var BookmarkPropertiesPanel = {
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);
}

View File

@ -589,14 +589,10 @@ var gEditItemOverlay = {
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);
},