From bfe62046d1e5f28e1543f1df52eafe15a0af5250 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 5 Nov 2006 08:18:06 +0000 Subject: [PATCH] Fixes #339, Saved search dialog doesn't expand when you add new conditions Addresses #155, Localize strings - Fixed flex/overflow issues with search dialog - Localized "Name:" in search dialog - Disabled hover color for disabled clicky buttons with CSS3 not() selector and removed "unclicky" class --- .../content/zotero/bindings/searchtextbox.xml | 8 ++--- chrome/content/zotero/bindings/tagsbox.xml | 3 +- .../content/zotero/bindings/zoterosearch.xml | 35 ++++++++++++++++--- chrome/content/zotero/itemPane.js | 3 +- chrome/content/zotero/searchDialog.xul | 8 +++-- chrome/locale/en-US/zotero/searchbox.dtd | 2 ++ chrome/skin/default/zotero/zotero.css | 12 ++++--- 7 files changed, 51 insertions(+), 20 deletions(-) diff --git a/chrome/content/zotero/bindings/searchtextbox.xml b/chrome/content/zotero/bindings/searchtextbox.xml index 045d6956b7..bbdd3bcd3c 100644 --- a/chrome/content/zotero/bindings/searchtextbox.xml +++ b/chrome/content/zotero/bindings/searchtextbox.xml @@ -219,10 +219,10 @@ - - - - + + + + diff --git a/chrome/content/zotero/bindings/tagsbox.xml b/chrome/content/zotero/bindings/tagsbox.xml index e6006a5f94..e1c5d060a3 100644 --- a/chrome/content/zotero/bindings/tagsbox.xml +++ b/chrome/content/zotero/bindings/tagsbox.xml @@ -118,16 +118,15 @@ var remove = document.createElement("label"); remove.setAttribute('value','-'); + remove.setAttribute('class','zotero-clicky'); if (id) { remove.setAttribute('tabindex', -1); remove.setAttribute('onclick',"this.parentNode.parentNode.parentNode.parentNode.parentNode.remove('"+id+"');"); - remove.setAttribute('class','zotero-clicky'); } else { remove.setAttribute('disabled', true); - remove.setAttribute('class', 'zotero-unclicky'); } var row = document.createElement("row"); diff --git a/chrome/content/zotero/bindings/zoterosearch.xml b/chrome/content/zotero/bindings/zoterosearch.xml index 262726db7c..cb794bf212 100644 --- a/chrome/content/zotero/bindings/zoterosearch.xml +++ b/chrome/content/zotero/bindings/zoterosearch.xml @@ -79,7 +79,12 @@ condition.initWithParentAndCondition(this, ref); - conditionsBox.childNodes[0].id('remove').hidden = (conditionsBox.childNodes.length == 1); + if (conditionsBox.childNodes.length == 2){ + conditionsBox.childNodes[0].enableRemoveButton(); + } + else if (conditionsBox.childNodes.length == 1){ + conditionsBox.childNodes[0].disableRemoveButton(); + } ]]> @@ -97,7 +102,9 @@ } } - conditionsBox.childNodes[0].id('remove').hidden = (conditionsBox.childNodes.length == 1); + if (conditionsBox.childNodes.length == 1){ + conditionsBox.childNodes[0].disableRemoveButton(); + } ]]> @@ -443,16 +450,34 @@ + + + + + + + + + + @@ -477,7 +502,7 @@ - diff --git a/chrome/content/zotero/itemPane.js b/chrome/content/zotero/itemPane.js index c20e0a48fb..7e4806d8b0 100644 --- a/chrome/content/zotero/itemPane.js +++ b/chrome/content/zotero/itemPane.js @@ -542,6 +542,7 @@ var ZoteroItemPane = new function() // Plus (+) button var addButton = document.createElement('label'); addButton.setAttribute("value","+"); + addButton.setAttribute("class","zotero-clicky"); // If row isn't saved, don't let user add more if (unsaved) { @@ -722,14 +723,12 @@ var ZoteroItemPane = new function() function disableButton(button) { button.setAttribute('disabled', true); - button.setAttribute('class', 'zotero-unclicky'); button.setAttribute('onclick', false); } function _enablePlusButton(button, creatorTypeID, fieldMode) { button.setAttribute('disabled', false); - button.setAttribute("class","zotero-clicky"); button.setAttribute("onclick", "ZoteroItemPane.disableButton(this); ZoteroItemPane.addCreatorRow('', '', " + (creatorTypeID ? creatorTypeID : 'false') + ", " + fieldMode + ", true);"); } diff --git a/chrome/content/zotero/searchDialog.xul b/chrome/content/zotero/searchDialog.xul index 73ab2ea124..a17439f105 100644 --- a/chrome/content/zotero/searchDialog.xul +++ b/chrome/content/zotero/searchDialog.xul @@ -2,7 +2,8 @@ - + +