Bug 422977 - remove advanced search UI from library / bookmarks organizer. r=mconnor.

This commit is contained in:
mozilla.mano@sent.com 2008-03-29 11:16:27 -07:00
Родитель 8ec52a37a0
Коммит cdcaccb688
9 изменённых файлов: 71 добавлений и 121 удалений

Просмотреть файл

@ -78,8 +78,10 @@ var PlacesOrganizer = {
// Set up the search UI. // Set up the search UI.
PlacesSearchBox.init(); PlacesSearchBox.init();
#ifdef PLACES_QUERY_BUILDER
// Set up the advanced query builder UI // Set up the advanced query builder UI
PlacesQueryBuilder.init(); PlacesQueryBuilder.init();
#endif
window.addEventListener("AppCommand", this, true); window.addEventListener("AppCommand", this, true);
#ifdef XP_MACOSX #ifdef XP_MACOSX
@ -632,25 +634,15 @@ var PlacesOrganizer = {
saveSearch: function PO_saveSearch() { saveSearch: function PO_saveSearch() {
// Get the place: uri for the query. // Get the place: uri for the query.
// If the advanced query builder is showing, use that. // If the advanced query builder is showing, use that.
var queries = []; var queries = PlacesQueryBuilder.queries;
var options = this.getCurrentOptions(); var options = this.getCurrentOptions();
options.excludeQueries = true;
// unset expandQueries=false, which is set by the left pane #ifndef PLACES_QUERY_BUILDER
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(); var query = PlacesUtils.history.getNewQuery();
query.searchTerms = PlacesSearchBox.value; query.searchTerms = PlacesSearchBox.value;
queries.push(query); queries.push(query);
} #endif
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;
}
var placeSpec = PlacesUtils.history.queriesToQueryString(queries, var placeSpec = PlacesUtils.history.queriesToQueryString(queries,
queries.length, queries.length,
options); options);
@ -843,9 +835,11 @@ var PlacesSearchBox = {
var searchModifiers = document.getElementById("searchModifiers"); var searchModifiers = document.getElementById("searchModifiers");
searchModifiers.hidden = false; searchModifiers.hidden = false;
#ifdef PLACES_QUERY_BUILDER
// if new search, open builder with pre-populated text row // if new search, open builder with pre-populated text row
if (PlacesQueryBuilder.numRows == 0) if (PlacesQueryBuilder.numRows == 0)
document.getElementById("OrganizerCommand_search:moreCriteria").doCommand(); document.getElementById("OrganizerCommand_search:moreCriteria").doCommand();
#endif
}, },
hideSearchUI: function PSB_hideSearchUI() { hideSearchUI: function PSB_hideSearchUI() {
@ -862,6 +856,7 @@ var PlacesQueryBuilder = {
queries: [], queries: [],
queryOptions: null, queryOptions: null,
#ifdef PLACES_QUERY_BUILDER
numRows: 0, numRows: 0,
/** /**
@ -904,6 +899,7 @@ var PlacesQueryBuilder = {
_nextSearch: null, _nextSearch: null,
_queryBuilders: null, _queryBuilders: null,
init: function PQB_init() { init: function PQB_init() {
// Initialize advanced search // Initialize advanced search
this._nextSearch = { this._nextSearch = {
@ -1319,6 +1315,7 @@ var PlacesQueryBuilder = {
// XXXben - find some public way of doing this! // XXXben - find some public way of doing this!
PlacesOrganizer._content.load(this.queries, this.options); PlacesOrganizer._content.load(this.queries, this.options);
}, },
#endif
onScopeSelected: function PQB_onScopeSelected(aButton) { onScopeSelected: function PQB_onScopeSelected(aButton) {
var id = aButton.getAttribute("id"); var id = aButton.getAttribute("id");

Просмотреть файл

@ -435,6 +435,7 @@
<button id="saveSearch" class="small" <button id="saveSearch" class="small"
label="&saveSearch.label;" accesskey="&saveSearch.accesskey;" label="&saveSearch.label;" accesskey="&saveSearch.accesskey;"
command="OrganizerCommand_search:save"/> command="OrganizerCommand_search:save"/>
#ifdef PLACES_QUERY_BUILDER
<button id="organizerScopeBarExpander" <button id="organizerScopeBarExpander"
class="expander-down" class="expander-down"
tooltiptext="&search.scopeBarExpanderDown.tooltip;" tooltiptext="&search.scopeBarExpanderDown.tooltip;"
@ -443,6 +444,9 @@
oncommand="PlacesQueryBuilder.toggleVisibility();"/> oncommand="PlacesQueryBuilder.toggleVisibility();"/>
</toolbar> </toolbar>
#include advancedSearch.inc #include advancedSearch.inc
#else
</toolbar>
#endif
</vbox> </vbox>
<vbox flex="1"> <vbox flex="1">
<tree id="placeContent" class="placesTree" context="placesContext" <tree id="placeContent" class="placesTree" context="placesContext"

Просмотреть файл

@ -4,7 +4,9 @@ browser.jar:
* content/browser/places/bookmarkProperties2.xul (content/bookmarkProperties.xul) * content/browser/places/bookmarkProperties2.xul (content/bookmarkProperties.xul)
* content/browser/places/places.xul (content/places.xul) * content/browser/places/places.xul (content/places.xul)
* content/browser/places/places.js (content/places.js) * content/browser/places/places.js (content/places.js)
#ifdef PLACES_QUERY_BUILDER
content/browser/places/places.xml (content/places.xml) content/browser/places/places.xml (content/places.xml)
#endif
content/browser/places/places.css (content/places.css) content/browser/places/places.css (content/places.css)
content/browser/places/organizer.css (content/organizer.css) content/browser/places/organizer.css (content/organizer.css)
* content/browser/places/bookmarkProperties.xul (content/bookmarkProperties.xul) * 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/starred48.png (places/starred48.png)
skin/classic/browser/places/unstarred48.png (places/unstarred48.png) skin/classic/browser/places/unstarred48.png (places/unstarred48.png)
skin/classic/browser/places/places.css (places/places.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/organizer.xml (places/organizer.xml) * skin/classic/browser/places/organizer.xml (places/organizer.xml)
skin/classic/browser/places/query.png (places/query.png) skin/classic/browser/places/query.png (places/query.png)
skin/classic/browser/places/starPage.png (places/starPage.png) skin/classic/browser/places/starPage.png (places/starPage.png)

Просмотреть файл

@ -140,29 +140,7 @@
padding: 2px 2px 3px 4px; padding: 2px 2px 3px 4px;
} }
.filterList { %ifdef PLACES_QUERY_BUILDER
-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;
}
/* Calendar */ /* Calendar */
.history-calendar { .history-calendar {
margin: 0px 0px 7px 6px; margin: 0px 0px 7px 6px;
@ -229,16 +207,6 @@
padding: 3px 3px 3px 0px; padding: 3px 3px 3px 0px;
} }
#searchModifiers {
padding-right: 3px;
}
#debugPanel {
background-color: ThreeDFace;
border-top: 2px solid;
-moz-border-top-colors: ThreeDShadow ThreeDHighlight;
}
.advancedSearchMinus { .advancedSearchMinus {
list-style-image: url("moz-icon://stock/gtk-remove?size=menu"); list-style-image: url("moz-icon://stock/gtk-remove?size=menu");
} }
@ -257,26 +225,30 @@
margin: 0 !important; margin: 0 !important;
} }
#saveSearch {
list-style-image: url("moz-icon://stock/gtk-save?size=menu");
}
/**** expanders ****/ /**** expanders ****/
.expander-up, .expander-up,
.expander-down { .expander-down {
min-width: 0; min-width: 0;
} }
%endif
#searchModifiers {
padding-right: 3px;
}
#saveSearch {
list-style-image: url("moz-icon://stock/gtk-save?size=menu");
}
/**** menuitem stock icons ****/ /**** menuitem stock icons ****/
#orgClose { #orgClose {
list-style-image: url("moz-icon://stock/gtk-close?size=menu"); 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"); 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"); 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/monitor_16-10.png
skin/classic/browser/wrench.png skin/classic/browser/wrench.png
skin/classic/browser/places/places.css (places/places.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/query.png (places/query.png)
skin/classic/browser/places/livemarkItem.png (places/livemarkItem.png) skin/classic/browser/places/livemarkItem.png (places/livemarkItem.png)
skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.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; background: url("chrome://global/skin/icons/round-button-active-right.png") no-repeat center right;
} }
%ifdef PLACES_QUERY_BUILDER
/* Calendar */ /* Calendar */
.history-calendar { .history-calendar {
margin: 0px 0px 7px 6px; margin: 0px 0px 7px 6px;
@ -503,33 +504,6 @@ menulist[open="true"] > .menulist-label-box .menulist-label {
color:#888; 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, .advancedSearchPlus,
.advancedSearchMinus { .advancedSearchMinus {
width: 18px; width: 18px;
@ -585,6 +559,33 @@ menulist[open="true"] > .menulist-label-box .menulist-label {
.expander-up:hover:active { .expander-up:hover:active {
list-style-image: url("chrome://browser/skin/places/expander-open-active.png") !important; 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 { #editBookmarkPanelGrid > rows > row > label {
text-align: right !important; text-align: right !important;

Просмотреть файл

@ -42,7 +42,7 @@ classic.jar:
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/audioFeedIcon16.png) skin/classic/browser/feeds/audioFeedIcon16.png (feeds/audioFeedIcon16.png)
skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css) skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css)
skin/classic/browser/places/places.css (places/places.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/query.png (places/query.png)
skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png) skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png)
skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png) skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png)

Просмотреть файл

@ -146,29 +146,7 @@
padding: 2px 2px 3px 4px; padding: 2px 2px 3px 4px;
} }
.filterList { %ifdef PLACES_QUERY_BUILDER
-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;
}
/* Calendar */ /* Calendar */
.history-calendar { .history-calendar {
margin: 0px 0px 7px 6px; margin: 0px 0px 7px 6px;
@ -235,16 +213,6 @@
padding: 3px 3px 3px 0px; padding: 3px 3px 3px 0px;
} }
#searchModifiers {
padding-right: 3px;
}
#debugPanel {
background-color: ThreeDFace;
border-top: 2px solid;
-moz-border-top-colors: ThreeDShadow ThreeDHighlight;
}
/**** expanders ****/ /**** expanders ****/
.expander-up, .expander-up,
@ -267,3 +235,9 @@
.expander-up:hover:active { .expander-up:hover:active {
list-style-image: url("chrome://global/skin/arrow/arrow-up-hov.gif"); list-style-image: url("chrome://global/skin/arrow/arrow-up-hov.gif");
} }
%endif
#searchModifiers {
padding-right: 3px;
}