зеркало из https://github.com/mozilla/pjs.git
Bug 422977 - remove advanced search UI from library / bookmarks organizer. r=mconnor.
This commit is contained in:
Родитель
c07222f039
Коммит
26c97b5505
|
@ -78,8 +78,10 @@ var PlacesOrganizer = {
|
|||
// Set up the search UI.
|
||||
PlacesSearchBox.init();
|
||||
|
||||
#ifdef PLACES_QUERY_BUILDER
|
||||
// Set up the advanced query builder UI
|
||||
PlacesQueryBuilder.init();
|
||||
#endif
|
||||
|
||||
window.addEventListener("AppCommand", this, true);
|
||||
#ifdef XP_MACOSX
|
||||
|
@ -632,25 +634,15 @@ var PlacesOrganizer = {
|
|||
saveSearch: function PO_saveSearch() {
|
||||
// Get the place: uri for the query.
|
||||
// If the advanced query builder is showing, use that.
|
||||
var queries = [];
|
||||
var queries = PlacesQueryBuilder.queries;
|
||||
var options = this.getCurrentOptions();
|
||||
options.excludeQueries = true;
|
||||
// unset expandQueries=false, which is set by the left pane
|
||||
options.expandQueries = true;
|
||||
var searchUI = document.getElementById("searchModifiers");
|
||||
if (!searchUI.hidden)
|
||||
queries = PlacesQueryBuilder.queries;
|
||||
else if (PlacesSearchBox.value && PlacesSearchBox.value.length > 0) {
|
||||
// If not, use the value of the search box.
|
||||
var query = PlacesUtils.history.getNewQuery();
|
||||
query.searchTerms = PlacesSearchBox.value;
|
||||
queries.push(query);
|
||||
}
|
||||
else {
|
||||
// if there is no query, do nothing.
|
||||
// XXX should probably have a dialog here to explain that the user needs to search first.
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef PLACES_QUERY_BUILDER
|
||||
var query = PlacesUtils.history.getNewQuery();
|
||||
query.searchTerms = PlacesSearchBox.value;
|
||||
queries.push(query);
|
||||
#endif
|
||||
|
||||
var placeSpec = PlacesUtils.history.queriesToQueryString(queries,
|
||||
queries.length,
|
||||
options);
|
||||
|
@ -843,9 +835,11 @@ var PlacesSearchBox = {
|
|||
var searchModifiers = document.getElementById("searchModifiers");
|
||||
searchModifiers.hidden = false;
|
||||
|
||||
#ifdef PLACES_QUERY_BUILDER
|
||||
// if new search, open builder with pre-populated text row
|
||||
if (PlacesQueryBuilder.numRows == 0)
|
||||
document.getElementById("OrganizerCommand_search:moreCriteria").doCommand();
|
||||
#endif
|
||||
},
|
||||
|
||||
hideSearchUI: function PSB_hideSearchUI() {
|
||||
|
@ -862,6 +856,7 @@ var PlacesQueryBuilder = {
|
|||
queries: [],
|
||||
queryOptions: null,
|
||||
|
||||
#ifdef PLACES_QUERY_BUILDER
|
||||
numRows: 0,
|
||||
|
||||
/**
|
||||
|
@ -904,6 +899,7 @@ var PlacesQueryBuilder = {
|
|||
_nextSearch: null,
|
||||
_queryBuilders: null,
|
||||
|
||||
|
||||
init: function PQB_init() {
|
||||
// Initialize advanced search
|
||||
this._nextSearch = {
|
||||
|
@ -1319,6 +1315,7 @@ var PlacesQueryBuilder = {
|
|||
// XXXben - find some public way of doing this!
|
||||
PlacesOrganizer._content.load(this.queries, this.options);
|
||||
},
|
||||
#endif
|
||||
|
||||
onScopeSelected: function PQB_onScopeSelected(aButton) {
|
||||
var id = aButton.getAttribute("id");
|
||||
|
|
|
@ -435,6 +435,7 @@
|
|||
<button id="saveSearch" class="small"
|
||||
label="&saveSearch.label;" accesskey="&saveSearch.accesskey;"
|
||||
command="OrganizerCommand_search:save"/>
|
||||
#ifdef PLACES_QUERY_BUILDER
|
||||
<button id="organizerScopeBarExpander"
|
||||
class="expander-down"
|
||||
tooltiptext="&search.scopeBarExpanderDown.tooltip;"
|
||||
|
@ -443,6 +444,9 @@
|
|||
oncommand="PlacesQueryBuilder.toggleVisibility();"/>
|
||||
</toolbar>
|
||||
#include advancedSearch.inc
|
||||
#else
|
||||
</toolbar>
|
||||
#endif
|
||||
</vbox>
|
||||
<vbox flex="1">
|
||||
<tree id="placeContent" class="placesTree" context="placesContext"
|
||||
|
|
|
@ -4,7 +4,9 @@ browser.jar:
|
|||
* content/browser/places/bookmarkProperties2.xul (content/bookmarkProperties.xul)
|
||||
* content/browser/places/places.xul (content/places.xul)
|
||||
* content/browser/places/places.js (content/places.js)
|
||||
#ifdef PLACES_QUERY_BUILDER
|
||||
content/browser/places/places.xml (content/places.xml)
|
||||
#endif
|
||||
content/browser/places/places.css (content/places.css)
|
||||
content/browser/places/organizer.css (content/organizer.css)
|
||||
* content/browser/places/bookmarkProperties.xul (content/bookmarkProperties.xul)
|
||||
|
|
|
@ -39,7 +39,7 @@ classic.jar:
|
|||
skin/classic/browser/places/starred48.png (places/starred48.png)
|
||||
skin/classic/browser/places/unstarred48.png (places/unstarred48.png)
|
||||
skin/classic/browser/places/places.css (places/places.css)
|
||||
skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
* skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
* skin/classic/browser/places/organizer.xml (places/organizer.xml)
|
||||
skin/classic/browser/places/query.png (places/query.png)
|
||||
skin/classic/browser/places/starPage.png (places/starPage.png)
|
||||
|
|
|
@ -140,29 +140,7 @@
|
|||
padding: 2px 2px 3px 4px;
|
||||
}
|
||||
|
||||
.filterList {
|
||||
-moz-appearance: none;
|
||||
background-color: transparent;
|
||||
border: 0px;
|
||||
margin: 2px;
|
||||
padding: 0px;
|
||||
min-width: 0px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
list-style-image: url("chrome://browser/skin/Search-bar.png");
|
||||
-moz-user-focus: ignore;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.filterList .button-box {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.filterList .button-menu-dropmarker {
|
||||
margin: 9px -3px -4px 8px;
|
||||
}
|
||||
|
||||
%ifdef PLACES_QUERY_BUILDER
|
||||
/* Calendar */
|
||||
.history-calendar {
|
||||
margin: 0px 0px 7px 6px;
|
||||
|
@ -229,16 +207,6 @@
|
|||
padding: 3px 3px 3px 0px;
|
||||
}
|
||||
|
||||
#searchModifiers {
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
#debugPanel {
|
||||
background-color: ThreeDFace;
|
||||
border-top: 2px solid;
|
||||
-moz-border-top-colors: ThreeDShadow ThreeDHighlight;
|
||||
}
|
||||
|
||||
.advancedSearchMinus {
|
||||
list-style-image: url("moz-icon://stock/gtk-remove?size=menu");
|
||||
}
|
||||
|
@ -257,26 +225,30 @@
|
|||
margin: 0 !important;
|
||||
}
|
||||
|
||||
#saveSearch {
|
||||
list-style-image: url("moz-icon://stock/gtk-save?size=menu");
|
||||
}
|
||||
|
||||
/**** expanders ****/
|
||||
.expander-up,
|
||||
.expander-down {
|
||||
min-width: 0;
|
||||
}
|
||||
%endif
|
||||
|
||||
#searchModifiers {
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
#saveSearch {
|
||||
list-style-image: url("moz-icon://stock/gtk-save?size=menu");
|
||||
}
|
||||
|
||||
/**** menuitem stock icons ****/
|
||||
#orgClose {
|
||||
list-style-image: url("moz-icon://stock/gtk-close?size=menu");
|
||||
}
|
||||
|
||||
menuitem[command="OrganizerCommand_import"] {
|
||||
#fileImport {
|
||||
list-style-image: url("moz-icon://stock/gtk-revert-to-saved?size=menu");
|
||||
}
|
||||
|
||||
menuitem[command="OrganizerCommand_export"] {
|
||||
#fileExport {
|
||||
list-style-image: url("moz-icon://stock/gtk-save-as?size=menu");
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ classic.jar:
|
|||
skin/classic/browser/monitor_16-10.png
|
||||
skin/classic/browser/wrench.png
|
||||
skin/classic/browser/places/places.css (places/places.css)
|
||||
skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
* skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
skin/classic/browser/places/query.png (places/query.png)
|
||||
skin/classic/browser/places/livemarkItem.png (places/livemarkItem.png)
|
||||
skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png)
|
||||
|
|
|
@ -443,6 +443,7 @@ menulist[open="true"] > .menulist-label-box .menulist-label {
|
|||
background: url("chrome://global/skin/icons/round-button-active-right.png") no-repeat center right;
|
||||
}
|
||||
|
||||
%ifdef PLACES_QUERY_BUILDER
|
||||
/* Calendar */
|
||||
.history-calendar {
|
||||
margin: 0px 0px 7px 6px;
|
||||
|
@ -503,33 +504,6 @@ menulist[open="true"] > .menulist-label-box .menulist-label {
|
|||
color:#888;
|
||||
}
|
||||
|
||||
.no-margin-button {
|
||||
min-width:0em;
|
||||
}
|
||||
|
||||
/**
|
||||
* info pane
|
||||
*/
|
||||
|
||||
/* More/Less button */
|
||||
#infoScrollboxExpander {
|
||||
list-style-image: url("chrome://browser/skin/places/twisty-open.gif");
|
||||
-moz-appearance: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
max-width: 0;
|
||||
}
|
||||
|
||||
#infoScrollbox[minimal="true"] #infoScrollboxExpander {
|
||||
list-style-image: url("chrome://browser/skin/places/twisty-closed.gif");
|
||||
}
|
||||
|
||||
#itemsCountText,
|
||||
#selectItemDescription {
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
|
||||
.advancedSearchPlus,
|
||||
.advancedSearchMinus {
|
||||
width: 18px;
|
||||
|
@ -585,6 +559,33 @@ menulist[open="true"] > .menulist-label-box .menulist-label {
|
|||
.expander-up:hover:active {
|
||||
list-style-image: url("chrome://browser/skin/places/expander-open-active.png") !important;
|
||||
}
|
||||
%endif
|
||||
|
||||
.no-margin-button {
|
||||
min-width:0em;
|
||||
}
|
||||
|
||||
/**
|
||||
* info pane
|
||||
*/
|
||||
|
||||
/* More/Less button */
|
||||
#infoScrollboxExpander {
|
||||
list-style-image: url("chrome://browser/skin/places/twisty-open.gif");
|
||||
-moz-appearance: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
max-width: 0;
|
||||
}
|
||||
|
||||
#infoScrollbox[minimal="true"] #infoScrollboxExpander {
|
||||
list-style-image: url("chrome://browser/skin/places/twisty-closed.gif");
|
||||
}
|
||||
|
||||
#itemsCountText,
|
||||
#selectItemDescription {
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
#editBookmarkPanelGrid > rows > row > label {
|
||||
text-align: right !important;
|
||||
|
|
|
@ -42,7 +42,7 @@ classic.jar:
|
|||
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/audioFeedIcon16.png)
|
||||
skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css)
|
||||
skin/classic/browser/places/places.css (places/places.css)
|
||||
skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
* skin/classic/browser/places/organizer.css (places/organizer.css)
|
||||
skin/classic/browser/places/query.png (places/query.png)
|
||||
skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png)
|
||||
skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png)
|
||||
|
|
|
@ -146,29 +146,7 @@
|
|||
padding: 2px 2px 3px 4px;
|
||||
}
|
||||
|
||||
.filterList {
|
||||
-moz-appearance: none;
|
||||
background-color: transparent;
|
||||
border: 0px;
|
||||
margin: 2px;
|
||||
padding: 0px;
|
||||
min-width: 0px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
list-style-image: url("chrome://browser/skin/Search-bar.png");
|
||||
-moz-user-focus: ignore;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.filterList .button-box {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.filterList .button-menu-dropmarker {
|
||||
margin: 9px -3px -4px 8px;
|
||||
}
|
||||
|
||||
%ifdef PLACES_QUERY_BUILDER
|
||||
/* Calendar */
|
||||
.history-calendar {
|
||||
margin: 0px 0px 7px 6px;
|
||||
|
@ -235,16 +213,6 @@
|
|||
padding: 3px 3px 3px 0px;
|
||||
}
|
||||
|
||||
#searchModifiers {
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
#debugPanel {
|
||||
background-color: ThreeDFace;
|
||||
border-top: 2px solid;
|
||||
-moz-border-top-colors: ThreeDShadow ThreeDHighlight;
|
||||
}
|
||||
|
||||
/**** expanders ****/
|
||||
|
||||
.expander-up,
|
||||
|
@ -267,3 +235,9 @@
|
|||
.expander-up:hover:active {
|
||||
list-style-image: url("chrome://global/skin/arrow/arrow-up-hov.gif");
|
||||
}
|
||||
%endif
|
||||
|
||||
#searchModifiers {
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче