commit e8d8f4a0a3a472604c8ae18789d7d06c0d3668b4
parent 335c3d0b983a41a07d297fcf0a046c0b62088308
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 21 Nov 2016 02:57:57 -0500
Use spinner instead of items pane message for search
Fixes #1116, and is generally more pleasant
Diffstat:
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
@@ -2165,10 +2165,14 @@ var ZoteroPane = new function()
if (!runAdvanced && search.value.indexOf('"') != -1) {
return;
}
- this.setItemsPaneMessage(Zotero.getString('searchInProgress'));
+ var spinner = document.getElementById('zotero-tb-search-spinner');
+ spinner.style.visibility = 'visible';
var searchVal = search.value;
yield this.itemsView.setFilter('search', searchVal);
- this.clearItemsPaneMessage();
+ spinner.style.visibility = 'hidden';
+ if (runAdvanced) {
+ this.clearItemsPaneMessage();
+ }
});
diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul
@@ -197,6 +197,7 @@
<toolbarseparator/>
<toolbarbutton id="zotero-tb-advanced-search" class="zotero-tb-button" tooltiptext="&zotero.toolbar.advancedSearch;" command="cmd_zotero_advancedSearch"/>
<spacer flex="1"/>
+ <image id="zotero-tb-search-spinner" class="zotero-spinner" style="visibility: hidden"/>
<textbox id="zotero-tb-search" type="search" timeout="250"
onkeypress="ZoteroPane_Local.handleSearchKeypress(this, event)"
oninput="ZoteroPane_Local.handleSearchInput(this, event)"
diff --git a/chrome/skin/default/zotero/spinner-14px@2x.png b/chrome/skin/default/zotero/spinner-14px@2x.png
Binary files differ.
diff --git a/chrome/skin/default/zotero/zotero.css b/chrome/skin/default/zotero/zotero.css
@@ -454,6 +454,13 @@ label.zotero-text-link {
-moz-box-pack: end;
}
+.zotero-spinner {
+ list-style-image: url(chrome://zotero/skin/spinner-14px@2x.png);
+ height: 14px;
+ width: 14px;
+ margin-right: 2px;
+}
+
/* BEGIN 2X BLOCK -- DO NOT EDIT MANUALLY -- USE 2XIZE */
@media (min-resolution: 1.5dppx) {
#zotero-toolbar-save-button,#zotero-toolbar-save-button-single { list-style-image: url("chrome://zotero/skin/treeitem-webpage@2x.png"); }