www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 77b594f447d48e9aa40483d0223c5df2f2b880f8
parent 4f5ac318915ade1875e085fc452e0ffc88018244
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 30 Aug 2006 17:16:33 +0000

Closes #244, Export Collection... and Create Bibliography from Collection... contextual menu options should be disabled for empty collections


Diffstat:
Mchrome/chromeFiles/content/scholar/overlay.js | 27+++++++++++++++++++++++++++
1 file changed, 27 insertions(+), 0 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js @@ -385,6 +385,15 @@ var ScholarPane = new function() { var hide = [4,6,9,11,12]; var show = [3,5,7,8,10]; + if (itemsView.rowCount>0) + { + var enable = [8,10]; + } + else + { + var disable = [8,10]; + } + } // Saved Search else if (collectionsView.selection.count == 1 && @@ -392,6 +401,14 @@ var ScholarPane = new function() { var hide = [3,5,8,10,12]; var show = [4,6,7,9,11]; + if (itemsView.rowCount>0) + { + var enable = [9,11]; + } + else + { + var disable = [9,11]; + } } // Library else @@ -400,6 +417,16 @@ var ScholarPane = new function() var show = [12]; } + for (var i in disable) + { + menu.childNodes[disable[i]].setAttribute('disabled', true); + } + + for (var i in enable) + { + menu.childNodes[enable[i]].setAttribute('disabled', false); + } + for (var i in hide) { menu.childNodes[hide[i]].setAttribute('hidden', true);