summaryrefslogtreecommitdiffstats
path: root/browser/base/content/browser-places.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/base/content/browser-places.js')
-rw-r--r--browser/base/content/browser-places.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js
index c940fade5f..404a080983 100644
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -55,7 +55,6 @@ var StarUI = {
delete this.panel;
this._createPanelIfNeeded();
var element = this._element("editBookmarkPanel");
- window.ensureCustomElements("moz-button-group");
// initially the panel is hidden
// to avoid impacting startup / new window performance
element.hidden = false;
@@ -1378,7 +1377,7 @@ var BookmarkingUI = {
this.updateLabel(
"BMB_viewBookmarksSidebar",
- SidebarUI.currentID == "viewBookmarksSidebar"
+ SidebarController.currentID == "viewBookmarksSidebar"
);
this.updateLabel("BMB_viewBookmarksToolbar", !this.toolbar.collapsed);
},
@@ -1999,6 +1998,13 @@ var BookmarkingUI = {
case "ViewHiding":
this.onPanelMenuViewHiding(aEvent);
break;
+ case "command":
+ if (aEvent.target.id == "panelMenu_searchBookmarks") {
+ PlacesCommandHook.searchBookmarks();
+ } else if (aEvent.target.id == "panelMenu_viewBookmarksToolbar") {
+ this.toggleBookmarksToolbar("bookmark-tools");
+ }
+ break;
}
},
@@ -2026,12 +2032,15 @@ var BookmarkingUI = {
panelview
);
panelview.removeEventListener("ViewShowing", this);
+ panelview.addEventListener("command", this);
},
onPanelMenuViewHiding: function BUI_onViewHiding(aEvent) {
this._panelMenuView.uninit();
delete this._panelMenuView;
- aEvent.target.removeEventListener("ViewHiding", this);
+ let panelview = aEvent.target;
+ panelview.removeEventListener("ViewHiding", this);
+ panelview.removeEventListener("command", this);
},
handlePlacesEvents(aEvents) {