Use spinner instead of items pane message for search

Fixes #1116, and is generally more pleasant
This commit is contained in:
Dan Stillman 2016-11-21 02:57:57 -05:00
parent 335c3d0b98
commit e8d8f4a0a3
4 changed files with 14 additions and 2 deletions

View file

@ -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();
}
});

View file

@ -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)"

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View file

@ -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"); }