- Don't display "+" and "-" tags as add/remove icons in the tag selector, as much as I like the idea of tags arbitrarily being turned into graphical representations

- Use add/remove icons in advanced search window
This commit is contained in:
Dan Stillman 2011-05-09 08:11:18 +00:00
parent 62a0bdf1e3
commit 3e30066d89
6 changed files with 18 additions and 20 deletions

View File

@ -642,7 +642,7 @@
// Minus (-) button // Minus (-) button
var removeButton = document.createElement('label'); var removeButton = document.createElement('label');
removeButton.setAttribute("value","-"); removeButton.setAttribute("value","-");
removeButton.setAttribute("class","zotero-clicky"); removeButton.setAttribute("class","zotero-clicky zotero-clicky-minus");
// If default first row, don't let user remove it // If default first row, don't let user remove it
if (defaultRow) { if (defaultRow) {
this.disableButton(removeButton); this.disableButton(removeButton);
@ -658,7 +658,7 @@
// Plus (+) button // Plus (+) button
var addButton = document.createElement('label'); var addButton = document.createElement('label');
addButton.setAttribute("value","+"); addButton.setAttribute("value","+");
addButton.setAttribute("class", "zotero-clicky"); addButton.setAttribute("class", "zotero-clicky zotero-clicky-plus");
// If row isn't saved, don't let user add more // If row isn't saved, don't let user add more
if (unsaved) { if (unsaved) {
this.disableButton(addButton); this.disableButton(addButton);

View File

@ -149,7 +149,7 @@
remove.setAttribute('value','-'); remove.setAttribute('value','-');
remove.setAttribute('onclick', remove.setAttribute('onclick',
"document.getBindingParent(this).remove('" + related[i].id + "');"); "document.getBindingParent(this).remove('" + related[i].id + "');");
remove.setAttribute('class','zotero-clicky'); remove.setAttribute('class','zotero-clicky zotero-clicky-minus');
} }
var row = document.createElement("row"); var row = document.createElement("row");

View File

@ -187,7 +187,7 @@
if (this.editable) { if (this.editable) {
var remove = document.createElement("label"); var remove = document.createElement("label");
remove.setAttribute('value','-'); remove.setAttribute('value','-');
remove.setAttribute('class','zotero-clicky'); remove.setAttribute('class','zotero-clicky zotero-clicky-minus');
if (tagID) if (tagID)
{ {
remove.setAttribute('ztabindex', -1); remove.setAttribute('ztabindex', -1);

View File

@ -698,8 +698,8 @@
</xul:menulist> </xul:menulist>
<xul:zoterosearchagefield id="value-date-age" hidden="true" flex="1"/> <xul:zoterosearchagefield id="value-date-age" hidden="true" flex="1"/>
<!-- Adding elements below will break disable/enableRemoveButton() --> <!-- Adding elements below will break disable/enableRemoveButton() -->
<xul:toolbarbutton id="remove" class="zotero-clicky" label="-" oncommand="this.parentNode.parentNode.onRemoveClicked(event); event.stopPropagation()"/> <xul:toolbarbutton id="remove" class="zotero-clicky zotero-clicky-minus" label="-" oncommand="this.parentNode.parentNode.onRemoveClicked(event); event.stopPropagation()"/>
<xul:toolbarbutton id="add" class="zotero-clicky" label="+" oncommand="this.parentNode.parentNode.onAddClicked(event); event.stopPropagation()"/> <xul:toolbarbutton id="add" class="zotero-clicky zotero-clicky-plus" label="+" oncommand="this.parentNode.parentNode.onAddClicked(event); event.stopPropagation()"/>
</xul:hbox> </xul:hbox>
</content> </content>
</binding> </binding>

View File

@ -117,7 +117,7 @@ var ZoteroItemPane = new function() {
if (editable) { if (editable) {
var removeButton = document.createElement('label'); var removeButton = document.createElement('label');
removeButton.setAttribute("value","-"); removeButton.setAttribute("value","-");
removeButton.setAttribute("class","zotero-clicky"); removeButton.setAttribute("class","zotero-clicky zotero-clicky-minus");
removeButton.setAttribute("onclick","ZoteroItemPane.removeNote(" + notes[i].id + ")"); removeButton.setAttribute("onclick","ZoteroItemPane.removeNote(" + notes[i].id + ")");
} }

View File

@ -149,7 +149,8 @@ dialog[resizable="true"]
border: 1px solid transparent; border: 1px solid transparent;
} }
.zotero-clicky[value="-"], .zotero-clicky[value="+"] /* Minus and plus buttons with clicky glow effect */
.zotero-clicky-minus, .zotero-clicky-plus
{ {
color: transparent !important; color: transparent !important;
padding: 0 !important; padding: 0 !important;
@ -158,42 +159,39 @@ dialog[resizable="true"]
height: 18px; height: 18px;
} }
.zotero-clicky[value="-"] { .zotero-clicky-minus {
background-image: url('chrome://zotero/skin/minus.png') !important; background-image: url('chrome://zotero/skin/minus.png') !important;
background-position: center !important; background-position: center !important;
background-repeat: no-repeat !important; background-repeat: no-repeat !important;
border: 0px !important; border: 0px !important;
} }
.zotero-clicky[value="+"] { .zotero-clicky-plus {
background-image: url('chrome://zotero/skin/plus.png') !important; background-image: url('chrome://zotero/skin/plus.png') !important;
background-position: center !important; background-position: center !important;
background-repeat: no-repeat !important; background-repeat: no-repeat !important;
border: 0px !important; border: 0px !important;
} }
.zotero-clicky[value="+"][disabled=true], .zotero-clicky[value="-"][disabled=true] { .zotero-clicky-minus[disabled=true], .zotero-clicky-plus[disabled=true] {
opacity: .5; opacity: .5;
} }
.zotero-clicky[value="+"]:not([disabled=true]):active { .zotero-clicky-minus:not([disabled=true]):active {
background-image: url('chrome://zotero/skin/plus-active.png') !important;
}
.zotero-clicky[value="-"]:not([disabled=true]):active {
background-image: url('chrome://zotero/skin/minus-active.png') !important; background-image: url('chrome://zotero/skin/minus-active.png') !important;
} }
.zotero-clicky:not([disabled=true]):hover, .zotero-clicky-plus:not([disabled=true]):active {
.zotero-clicky:not([disabled=true]):hover .toolbarbutton-text background-image: url('chrome://zotero/skin/plus-active.png') !important;
}
.zotero-clicky:not([disabled=true]):hover
{ {
background: #666;
background: rgb(187, 206, 241); background: rgb(187, 206, 241);
border: 1px solid rgb(109, 149, 224); border: 1px solid rgb(109, 149, 224);
} }
.zotero-clicky:not([disabled=true]):active, .zotero-clicky:not([disabled=true]):active,
.zotero-clicky:not([disabled=true]):active .toolbarbutton-text,
.zotero-clicky[selected="true"] .zotero-clicky[selected="true"]
{ {
color: white; color: white;