Bug 1359984 - Add mobile root to places organizer and bookmark sidebar search panels. r?mak
MozReview-Commit-ID: 2Yv6ll19F91
--- a/browser/components/places/content/bookmarksPanel.js
+++ b/browser/components/places/content/bookmarksPanel.js
@@ -11,13 +11,14 @@ function init() {
function searchBookmarks(aSearchString) {
var tree = document.getElementById("bookmarks-view");
if (!aSearchString)
tree.place = tree.place;
else
tree.applyFilter(aSearchString,
[PlacesUtils.bookmarksMenuFolderId,
PlacesUtils.unfiledBookmarksFolderId,
- PlacesUtils.toolbarFolderId]);
+ PlacesUtils.toolbarFolderId,
+ PlacesUtils.mobileFolderId]);
}
window.addEventListener("SidebarFocused",
() => document.getElementById("search-box").focus());
--- a/browser/components/places/content/places.js
+++ b/browser/components/places/content/places.js
@@ -752,17 +752,18 @@ var PlacesSearchBox = {
/**
* Folders to include when searching.
*/
_folders: [],
get folders() {
if (this._folders.length == 0) {
this._folders.push(PlacesUtils.bookmarksMenuFolderId,
PlacesUtils.unfiledBookmarksFolderId,
- PlacesUtils.toolbarFolderId);
+ PlacesUtils.toolbarFolderId,
+ PlacesUtils.mobileFolderId);
}
return this._folders;
},
set folders(aFolders) {
this._folders = aFolders;
return aFolders;
},
@@ -938,17 +939,18 @@ var PlacesQueryBuilder = {
switch (aScope) {
case "history":
filterCollection = "history";
break;
case "bookmarks":
filterCollection = "bookmarks";
folders.push(PlacesUtils.bookmarksMenuFolderId,
PlacesUtils.toolbarFolderId,
- PlacesUtils.unfiledBookmarksFolderId);
+ PlacesUtils.unfiledBookmarksFolderId,
+ PlacesUtils.mobileFolderId);
break;
case "downloads":
filterCollection = "downloads";
break;
default:
throw "Invalid search scope";
}