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) if (!this.options.readonly)
{ {
this.btn = $j(document.createElement("button")) this.btn = $j(document.createElement("button"))
.addClass("et2_button et2_button_text") .addClass("et2_button")
.attr({type:"button"}); .attr({type:"button"});
this.setDOMNode(this.btn[0]); this.setDOMNode(this.btn[0]);
} }
@ -290,6 +290,11 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM],
this.label = _value; this.label = _value;
this.btn.text(_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) if(this.image)
{ {

View File

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