- 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
var removeButton = document.createElement('label');
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 (defaultRow) {
this.disableButton(removeButton);
@ -658,7 +658,7 @@
// Plus (+) button
var addButton = document.createElement('label');
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 (unsaved) {
this.disableButton(addButton);

View file

@ -149,7 +149,7 @@
remove.setAttribute('value','-');
remove.setAttribute('onclick',
"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");

View file

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

View file

@ -698,8 +698,8 @@
</xul:menulist>
<xul:zoterosearchagefield id="value-date-age" hidden="true" flex="1"/>
<!-- 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="add" class="zotero-clicky" label="+" oncommand="this.parentNode.parentNode.onAddClicked(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 zotero-clicky-plus" label="+" oncommand="this.parentNode.parentNode.onAddClicked(event); event.stopPropagation()"/>
</xul:hbox>
</content>
</binding>

View file

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

View file

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