Change style for buttons with icons to only display image

This commit is contained in:
Nathan Gray 2011-09-22 19:10:21 +00:00
parent 7488843290
commit c631412dfb
2 changed files with 20 additions and 15 deletions

View File

@ -52,7 +52,7 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], {
if (!this.options.readonly)
{
this.btn = $j(document.createElement("button"))
.addClass("et2_button");
.addClass("et2_button et2_button_text");
this.setDOMNode(this.btn[0]);
}
},
@ -75,6 +75,7 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], {
{
// No label if there's an image
this.options.label = "";
this.btn.removeClass("et2_button_text").addClass("et2_button_icon");
}
},

View File

@ -125,35 +125,39 @@ a.et2_url.url {
}
button.et2_button {
background-color: #E0E0E0;
background-image: url(gfx/gradient01.png);
background-position: center;
background-repeat: repeat-x;
border: 1px solid silver;
color: #101010;
cursor: pointer;
margin: 5px;
padding: 3px;
text-align: center;
font-size: 9pt;
text-shadow: 1px 1px #E0E0E0;
}
button.et2_button_text {
background-color: #E0E0E0;
background-image: url(gfx/gradient01.png);
background-position: center;
background-repeat: repeat-x;
button.et2_button:hover {
margin: 5px;
padding: 3px;
border: 1px solid silver;
color: #101010;
}
button.et2_button_icon {
border: none;
background: transparent;
}
button.et2_button_text:hover {
color: #050505;
border: 1px solid gray;
background-color: #D0D0EE;
}
button.et2_button:active {
button.et2_button_text:active {
background-image: url(gfx/gradient02.png);
background-color: #D0D0E0;
}
button.et2_button:focus {
button.et2_button_text:focus {
border: 1px solid #2c3d6f;
color: #202d52;
outline: none;