[Common] repaired button's caption

This commit is contained in:
Maxim Kadushkin 2017-03-06 12:02:32 +03:00
parent a75065ecd6
commit 357bcc9061
2 changed files with 16 additions and 19 deletions

View file

@ -138,28 +138,28 @@ define([
template: _.template([ template: _.template([
'<% if (menu == null) { %>', '<% if (menu == null) { %>',
'<button type="button" class="btn <%= cls %>" id="<%= id %>" style="<%= style %>">', '<button type="button" class="btn <%= cls %>" id="<%= id %>" style="<%= style %>">',
'<span class="caption"><%= caption %></span>',
'<% if (iconCls != "") { %>', '<% if (iconCls != "") { %>',
'<span class="btn-icon <%= iconCls %>">&nbsp;</span>', '<i class="btn-icon <%= iconCls %>">&nbsp;</i>',
'<% } %>', '<% } %>',
'<span class="caption"><%= caption %></span>',
'</button>', '</button>',
'<% } else if (split == false) {%>', '<% } else if (split == false) {%>',
'<div class="btn-group" id="<%= id %>" style="<%= style %>">', '<div class="btn-group" id="<%= id %>" style="<%= style %>">',
'<button type="button" class="btn dropdown-toggle <%= cls %>" data-toggle="dropdown">', '<button type="button" class="btn dropdown-toggle <%= cls %>" data-toggle="dropdown">',
'<span class="caption"><%= caption %></span>',
'<% if (iconCls != "") { %>', '<% if (iconCls != "") { %>',
'<span class="btn-icon <%= iconCls %>">&nbsp;</span>', '<i class="btn-icon <%= iconCls %>">&nbsp;</i>',
'<% } %>', '<% } %>',
'<span class="caption"><%= caption %></span>',
'<span class="caret img-commonctrl"></span>', '<span class="caret img-commonctrl"></span>',
'</button>', '</button>',
'</div>', '</div>',
'<% } else { %>', '<% } else { %>',
'<div class="btn-group split" id="<%= id %>" style="<%= style %>">', '<div class="btn-group split" id="<%= id %>" style="<%= style %>">',
'<button type="button" class="btn <%= cls %>">', '<button type="button" class="btn <%= cls %>">',
'<span class="caption"><%= caption %></span>',
'<% if (iconCls != "") { %>', '<% if (iconCls != "") { %>',
'<span class="btn-icon <%= iconCls %>">&nbsp;</span>', '<i class="btn-icon <%= iconCls %>">&nbsp;</i>',
'<% } %>', '<% } %>',
'<span class="caption"><%= caption %></span>',
'</button>', '</button>',
'<button type="button" class="btn <%= cls %> dropdown-toggle" data-toggle="dropdown">', '<button type="button" class="btn <%= cls %> dropdown-toggle" data-toggle="dropdown">',
'<span class="caret img-commonctrl"></span>', '<span class="caret img-commonctrl"></span>',

View file

@ -99,11 +99,14 @@
background-color: @primary; background-color: @primary;
} }
span.btn-icon { .caption:not(:empty) {
.position(); padding: 0 5px 0 2px;
}
.btn-icon {
padding: 0; padding: 0;
margin: 0; margin: 0;
position: absolute; display: inline-block;
background-repeat: no-repeat; background-repeat: no-repeat;
.background-ximage('@{app-image-path}/toolbar-menu.png', '@{app-image-path}/toolbar-menu@2x.png', 60px); .background-ximage('@{app-image-path}/toolbar-menu.png', '@{app-image-path}/toolbar-menu@2x.png', 60px);
@ -119,7 +122,7 @@
// Large size // Large size
// ------------------------ // ------------------------
&.large { &.large {
span.btn-icon { .btn-icon {
width: 30px !important; width: 30px !important;
height: 30px; height: 30px;
line-height: 20px; line-height: 20px;
@ -224,12 +227,6 @@
&.dropdown-toggle { &.dropdown-toggle {
width: 100%; width: 100%;
min-width: 28px; min-width: 28px;
.caret {
// float: right;
position: relative;
right: -8px;
}
} }
&.btn-text-value { &.btn-text-value {
@ -295,7 +292,7 @@
.box-shadow(none); .box-shadow(none);
background-color: transparent; background-color: transparent;
span.btn-icon { .btn-icon {
position: relative; position: relative;
min-width: inherit; min-width: inherit;
height: inherit; height: inherit;
@ -378,7 +375,7 @@
border: 1px solid @input-border; border: 1px solid @input-border;
.border-radius(@border-radius-small); .border-radius(@border-radius-small);
span.btn-icon { .btn-icon {
width: 28px; width: 28px;
padding: 0; padding: 0;
margin: 0; margin: 0;
@ -414,7 +411,7 @@
border: 1px solid @input-border; border: 1px solid @input-border;
.border-radius(@border-radius-small); .border-radius(@border-radius-small);
span.btn-icon { .btn-icon {
display: inline-block; display: inline-block;
.btn.btnsize(52px); .btn.btnsize(52px);
padding: 0; padding: 0;