Show caption if there's no icon available for toolbar actions

- Remove icon from today action in calendar
This commit is contained in:
Hadi Nategh 2016-01-26 13:43:00 +00:00
parent c982167602
commit 1c4647492d
3 changed files with 7 additions and 3 deletions

View File

@ -382,7 +382,6 @@ class calendar_uiviews extends calendar_ui
),
'today' => array(
'caption' => 'Today',
'icon' => 'today',
'group' => $group,
'onExecute' => 'javaScript:app.calendar.toolbar_action',
'hint' => 'Today',

View File

@ -508,11 +508,11 @@ var et2_toolbar = et2_DOMWidget.extend([et2_IInput],
if (action.caption)
{
if ((this.countActions <= parseInt(this.options.view_range) ||
this.preference[action.id]) &&
this.preference[action.id] || !action.iconUrl) &&
typeof button[0] !== 'undefined' &&
!(action.checkbox && action.data && (action.data.toggle_on || action.data.toggle_off))) // no caption for slideswitch checkboxes
{
button.addClass('et2_toolbar_hasCaption');
button.addClass(action.iconUrl?'et2_toolbar_hasCaption':'et2_toolbar_onlyCaption');
button[0].textContent = action.caption;
}
}

View File

@ -1556,6 +1556,11 @@ div.ms-sel-ctn .ms-sel-item {
background-position: 6px center;
padding-left: 30px;
}
.et2_toolbar .et2_toolbar_actionlist button.et2_button_with_image.et2_toolbar_onlyCaption {
vertical-align: top;
width:auto;
padding-left: 3px;
}
.et2_toolbar button {
margin:1px;
margin-right: 3px;