Clear tag selector when switching between views

This commit is contained in:
Dan Stillman 2011-08-05 22:04:48 +00:00
parent 94e92b9f53
commit 2db050290d
2 changed files with 6 additions and 3 deletions

View File

@ -535,7 +535,6 @@
</method> </method>
<!-- Not currently used -->
<method name="clearVisible"> <method name="clearVisible">
<body> <body>
<![CDATA[ <![CDATA[

View File

@ -993,7 +993,9 @@ var ZoteroPane = new function()
* Sets the tag filter on the items view * Sets the tag filter on the items view
*/ */
function updateTagFilter(){ function updateTagFilter(){
this.itemsView.setFilter('tags', getTagSelection()); if (this.itemsView) {
this.itemsView.setFilter('tags', getTagSelection());
}
} }
@ -1034,7 +1036,9 @@ var ZoteroPane = new function()
document.getElementById('zotero-items-tree').view = this.itemsView = null; document.getElementById('zotero-items-tree').view = this.itemsView = null;
} }
// Clear quick search and tag selector when switching views
document.getElementById('zotero-tb-search').value = ""; document.getElementById('zotero-tb-search').value = "";
document.getElementById('zotero-tag-selector').clearAll();
if (this.collectionsView.selection.count != 1) { if (this.collectionsView.selection.count != 1) {
document.getElementById('zotero-items-tree').view = this.itemsView = null; document.getElementById('zotero-items-tree').view = this.itemsView = null;