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
This commit is contained in:
parent
f91134edd7
commit
bfe62046d1
|
@ -219,10 +219,10 @@
|
|||
</implementation>
|
||||
|
||||
<content>
|
||||
<xul:hbox xbl:inherits="flex">
|
||||
<xul:textbox/>
|
||||
<xul:menulist label="days">
|
||||
<xul:menupopup>
|
||||
<xul:hbox flex="1">
|
||||
<xul:textbox flex="1"/>
|
||||
<xul:menulist>
|
||||
<xul:menupopup flex="1">
|
||||
<xul:menuitem label="&zotero.search.date.units.days;" value="days" selected="true"/>
|
||||
<xul:menuitem label="&zotero.search.date.units.months;" value="months"/>
|
||||
<xul:menuitem label="&zotero.search.date.units.years;" value="years"/>
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -97,7 +102,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
conditionsBox.childNodes[0].id('remove').hidden = (conditionsBox.childNodes.length == 1);
|
||||
if (conditionsBox.childNodes.length == 1){
|
||||
conditionsBox.childNodes[0].disableRemoveButton();
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -443,16 +450,34 @@
|
|||
<method name="onRemoveClicked">
|
||||
<body>
|
||||
<![CDATA[
|
||||
if(this.parent)
|
||||
if (this.parent){
|
||||
this.parent.removeCondition(this.conditionID);
|
||||
}
|
||||
window.sizeToContent()
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<method name="onAddClicked">
|
||||
<body>
|
||||
<![CDATA[
|
||||
if(this.parent)
|
||||
if (this.parent){
|
||||
this.parent.onAddClicked();
|
||||
}
|
||||
window.sizeToContent()
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<method name="disableRemoveButton">
|
||||
<body>
|
||||
<![CDATA[
|
||||
document.getAnonymousNodes(this)[0].lastChild.previousSibling.disabled = true;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<method name="enableRemoveButton">
|
||||
<body>
|
||||
<![CDATA[
|
||||
document.getAnonymousNodes(this)[0].lastChild.previousSibling.disabled = false;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -477,7 +502,7 @@
|
|||
<xul:menulist id="valuemenu" flex="1" hidden="true">
|
||||
<xul:menupopup/>
|
||||
</xul:menulist>
|
||||
<xul:zoterosearchagefield id="value-date-age" hidden="true"/>
|
||||
<xul:zoterosearchagefield id="value-date-age" hidden="true" flex="1"/>
|
||||
<xul:toolbarbutton id="remove" class="zotero-clicky" label="-" oncommand="this.parentNode.parentNode.onRemoveClicked();"/>
|
||||
<xul:toolbarbutton id="add" class="zotero-clicky" label="+" oncommand="this.parentNode.parentNode.onAddClicked();"/>
|
||||
</xul:hbox>
|
||||
|
|
|
@ -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);");
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://zotero/skin/overlay.css" type="text/css"?>
|
||||
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
||||
|
||||
<!DOCTYPE bindings SYSTEM "chrome://zotero/locale/searchbox.dtd">
|
||||
|
||||
<dialog
|
||||
id="zotero-search-dialog"
|
||||
|
@ -18,6 +19,9 @@
|
|||
<script src="include.js"/>
|
||||
<script src="searchDialog.js"/>
|
||||
|
||||
<hbox align="center"><label value="Name:"/><textbox id="search-name" flex="1"/></hbox>
|
||||
<hbox align="center">
|
||||
<label value="&zotero.search.name;"/>
|
||||
<textbox id="search-name" flex="1"/>
|
||||
</hbox>
|
||||
<zoterosearch id="search-box" flex="1"/>
|
||||
</dialog>
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
<!ENTITY zotero.search.name "Name:">
|
||||
|
||||
<!ENTITY zotero.search.joinMode.prefix "Match">
|
||||
<!ENTITY zotero.search.joinMode.any "any">
|
||||
<!ENTITY zotero.search.joinMode.all "all">
|
||||
|
|
|
@ -110,7 +110,10 @@ zoterosearchagefield
|
|||
-moz-binding: url('chrome://zotero/content/bindings/searchtextbox.xml#search-in-the-last');
|
||||
}
|
||||
|
||||
|
||||
zoterosearchagefield textbox
|
||||
{
|
||||
min-width:3em;
|
||||
}
|
||||
|
||||
#zotero-editpane-dynamic-fields row, tagsbox row
|
||||
{
|
||||
|
@ -192,20 +195,19 @@ zoterosearchagefield
|
|||
margin: 0 0 0 1px;
|
||||
}
|
||||
|
||||
.zotero-clicky, .zotero-unclicky
|
||||
.zotero-clicky
|
||||
{
|
||||
-moz-border-radius: 6px;
|
||||
}
|
||||
|
||||
.zotero-clicky[value="-"], .zotero-clicky[value="+"],
|
||||
.zotero-unclicky[value="-"], .zotero-unclicky[value="+"]
|
||||
.zotero-clicky[value="-"], .zotero-clicky[value="+"]
|
||||
{
|
||||
margin: 0px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.zotero-clicky:hover
|
||||
.zotero-clicky:not([disabled=true]):hover
|
||||
{
|
||||
color: white;
|
||||
background: #666666;
|
||||
|
|
Loading…
Reference in New Issue
Block a user