fix button to only assign et2_button_text class, if we really have a text in the button and style it correctly for nextmatch

This commit is contained in:
Ralf Becker 2016-02-25 13:23:22 +00:00
parent 3a00764669
commit d2e26f6e10
2 changed files with 42 additions and 38 deletions

View File

@ -99,7 +99,7 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM],
if (!this.options.readonly)
{
this.btn = $j(document.createElement("button"))
.addClass("et2_button et2_button_text")
.addClass("et2_button")
.attr({type:"button"});
this.setDOMNode(this.btn[0]);
}
@ -290,6 +290,11 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM],
this.label = _value;
this.btn.text(_value);
if (_value && !this.image)
this.btn.addClass('et2_button_text');
else
this.btn.removeClass('et2_button_text');
}
if(this.image)
{

View File

@ -189,56 +189,56 @@ a.et2_url.url {
* Button widget - text only, and icon
*/
.et2_button {
text-align: center;
font-size: 9pt;
text-shadow: 1px 1px #E0E0E0;
white-space: nowrap;
text-align: center;
font-size: 9pt;
text-shadow: 1px 1px #E0E0E0;
white-space: nowrap;
}
.et2_button_text,
input[type=button] {
background-color: #E0E0E0;
background-image: url(images/gradient01.png);
background-position: center;
background-repeat: repeat-x;
margin: 5px;
padding: 3px;
border: 1px solid silver;
color: #101010;
background-color: #E0E0E0;
background-image: url(images/gradient01.png);
background-position: center;
background-repeat: repeat-x;
margin: 5px;
padding: 3px;
border: 1px solid silver;
color: #101010;
}
.et2_button_icon {
border: none;
background-color: transparent;
padding: 0px;
border: none;
background-color: transparent;
padding: 0px;
}
button.et2_button_text:hover,
.et2_file_spanHover,
span.et2_button_text:hover,
input[type=button]:hover {
color: #050505;
border: 1px solid gray;
background-color: #D0D0EE;
color: #050505;
border: 1px solid gray;
background-color: #D0D0EE;
}
button.et2_button_text:active,
span.et2_button_text:active,
input[type=button]:active {
background-image: url(images/gradient02.png);
background-color: #D0D0E0;
background-image: url(images/gradient02.png);
background-color: #D0D0E0;
}
button.et2_button_text:focus,
span.et2_button_text:focus,
.et2_file_spanActive,
input[type=button]:focus {
border: 1px solid #2c3d6f;
color: #202d52;
outline: none;
border: 1px solid #2c3d6f;
color: #202d52;
outline: none;
}
button.et2_button_with_image {
padding-left: 20px;
background-repeat: no-repeat;
background-position: 4px center;
background-size: 16px;
height: 24px;
}
padding-left: 20px;
background-repeat: no-repeat;
background-position: 4px center;
background-size: 16px;
height: 24px;
}
/* et2_box_widget ###*/
button[id="cancel"],
button#cancel {
@ -549,8 +549,7 @@ for printing
div.et2_file {
display: inline-block;
position: relative;
vertical-align: middle;
margin-left: 8px;
vertical-align: top;
margin-top: 0;
}
.et2_file .progress_dropDown_fileList {
@ -626,13 +625,12 @@ span.et2_file_span{
cursor: pointer;
height: 15px;
text-align: left;
text-indent: 18px;
text-indent: 22px;
white-space: nowrap;
margin-top:0;
}
div.et2_file input.et2_file_upload{
position: absolute;
top: 4px;
cursor: pointer;
width: 98%;
opacity: 0;
@ -1630,7 +1628,7 @@ div.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button {
margin: 0 !important;
padding: 0 !important;
}
.et2_toolbar .et2_toolbar_actionlist button.et2_button_with_image, .nextmatch_header_row button.et2_button {
.et2_toolbar .et2_toolbar_actionlist button.et2_button_with_image, .nextmatch_header_row .et2_button {
width: 24px;
background-position: center;
background-size: 16px 16px;
@ -1638,10 +1636,12 @@ div.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button {
padding-left: 0;
background-color: #fafafa;
}
.et2_toolbar .et2_toolbar_actionlist button.et2_button_with_image.et2_toolbar_hasCaption {
.et2_toolbar .et2_toolbar_actionlist button.et2_button_with_image.et2_toolbar_hasCaption, .nextmatch_header_row .et2_button_text {
width:auto;
background-position: 6px center;
padding-left: 30px;
padding-left: 26px;
padding-right: 5px;
color: #5B5B5B;
}
.et2_toolbar .et2_toolbar_actionlist button.et2_button_with_image.et2_toolbar_onlyCaption {
vertical-align: top;
@ -2313,7 +2313,6 @@ td.avatar {
.et2_searchbox {
position: relative;
padding: 0 0 0 0px;
z-index: 500;
}
.et2_searchbox .flex.overlay input {
position: absolute;