[DE PE SSE] Add certain alt hints to buttons in top toolbar and to tabs in toolbar
This commit is contained in:
parent
2d9a56643e
commit
85063c9990
|
@ -100,7 +100,7 @@ define([
|
||||||
'<li class="ribtab' +
|
'<li class="ribtab' +
|
||||||
'<% if (items[i].haspanel===false) print(" x-lone") %>' +
|
'<% if (items[i].haspanel===false) print(" x-lone") %>' +
|
||||||
'<% if (items[i].extcls) print(\' \' + items[i].extcls) %>">' +
|
'<% if (items[i].extcls) print(\' \' + items[i].extcls) %>">' +
|
||||||
'<a data-tab="<%= items[i].action %>" data-title="<%= items[i].caption %>" data-hint="0" data-hint-direction="bottom" data-hint-offset="small"><%= items[i].caption %></a>' +
|
'<a data-tab="<%= items[i].action %>" data-title="<%= items[i].caption %>" data-hint="0" data-hint-direction="bottom" data-hint-offset="small" <% if (typeof items[i].dataHintTitle !== "undefined") { %> data-hint-title="<%= items[i].dataHintTitle %>" <% } %>><%= items[i].caption %></a>' +
|
||||||
'</li>' +
|
'</li>' +
|
||||||
'<% } %>' +
|
'<% } %>' +
|
||||||
'<% } %>' +
|
'<% } %>' +
|
||||||
|
@ -316,7 +316,7 @@ define([
|
||||||
return config.tabs[index].action;
|
return config.tabs[index].action;
|
||||||
}
|
}
|
||||||
|
|
||||||
var _tabTemplate = _.template('<li class="ribtab" style="display: none;"><a data-tab="<%= action %>" data-title="<%= caption %>" data-hint="0" data-hint-direction="bottom" data-hint-offset="small"><%= caption %></a></li>');
|
var _tabTemplate = _.template('<li class="ribtab" style="display: none;"><a data-tab="<%= action %>" data-title="<%= caption %>" data-hint="0" data-hint-direction="bottom" data-hint-offset="small" <% if (typeof dataHintTitle !== "undefined") { %> data-hint-title="<%= dataHintTitle %>" <% } %> ><%= caption %></a></li>');
|
||||||
|
|
||||||
config.tabs[after + 1] = tab;
|
config.tabs[after + 1] = tab;
|
||||||
var _after_action = _get_tab_action(after);
|
var _after_action = _get_tab_action(after);
|
||||||
|
|
|
@ -63,7 +63,7 @@ define([
|
||||||
var appOptions = me.getApplication().getController('Main').appOptions;
|
var appOptions = me.getApplication().getController('Main').appOptions;
|
||||||
|
|
||||||
if ( !appOptions.isEditMailMerge && !appOptions.isEditDiagram ) {
|
if ( !appOptions.isEditMailMerge && !appOptions.isEditDiagram ) {
|
||||||
var tab = {action: 'plugins', caption: me.panelPlugins.groupCaption};
|
var tab = {action: 'plugins', caption: me.panelPlugins.groupCaption, dataHintTitle: 'E'};
|
||||||
me.$toolbarPanelPlugins = me.panelPlugins.getPanel();
|
me.$toolbarPanelPlugins = me.panelPlugins.getPanel();
|
||||||
|
|
||||||
toolbar.addTab(tab, me.$toolbarPanelPlugins, 10); // TODO: clear plugins list in left panel
|
toolbar.addTab(tab, me.$toolbarPanelPlugins, 10); // TODO: clear plugins list in left panel
|
||||||
|
|
|
@ -470,14 +470,15 @@ define([
|
||||||
getPanel: function (role, config) {
|
getPanel: function (role, config) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
function createTitleButton(iconid, slot, disabled, hintDirection, hintOffset) {
|
function createTitleButton(iconid, slot, disabled, hintDirection, hintOffset, hintTitle) {
|
||||||
return (new Common.UI.Button({
|
return (new Common.UI.Button({
|
||||||
cls: 'btn-header',
|
cls: 'btn-header',
|
||||||
iconCls: iconid,
|
iconCls: iconid,
|
||||||
disabled: disabled === true,
|
disabled: disabled === true,
|
||||||
dataHint:'0',
|
dataHint:'0',
|
||||||
dataHintDirection: hintDirection ? hintDirection : 'left',
|
dataHintDirection: hintDirection ? hintDirection : 'left',
|
||||||
dataHintOffset: hintOffset ? hintOffset : '10, 10'
|
dataHintOffset: hintOffset ? hintOffset : '10, 10',
|
||||||
|
dataHintTitle: hintTitle
|
||||||
})).render(slot);
|
})).render(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -532,7 +533,7 @@ define([
|
||||||
this.btnDownload = createTitleButton('toolbar__icon icon--inverse btn-download', $html.findById('#slot-hbtn-download'), undefined, 'bottom', 'big');
|
this.btnDownload = createTitleButton('toolbar__icon icon--inverse btn-download', $html.findById('#slot-hbtn-download'), undefined, 'bottom', 'big');
|
||||||
|
|
||||||
if ( config.canPrint )
|
if ( config.canPrint )
|
||||||
this.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-hbtn-print'), undefined, 'bottom', 'big');
|
this.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-hbtn-print'), undefined, 'bottom', 'big', 'P');
|
||||||
|
|
||||||
if ( config.canEdit && config.canRequestEditRights )
|
if ( config.canEdit && config.canRequestEditRights )
|
||||||
this.btnEdit = createTitleButton('toolbar__icon icon--inverse btn-edit', $html.findById('#slot-hbtn-edit'), undefined, 'bottom', 'big');
|
this.btnEdit = createTitleButton('toolbar__icon icon--inverse btn-edit', $html.findById('#slot-hbtn-edit'), undefined, 'bottom', 'big');
|
||||||
|
@ -567,12 +568,12 @@ define([
|
||||||
me.setUserName(me.options.userName);
|
me.setUserName(me.options.userName);
|
||||||
|
|
||||||
if ( config.canPrint && config.isEdit ) {
|
if ( config.canPrint && config.isEdit ) {
|
||||||
me.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-btn-dt-print'), true);
|
me.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-btn-dt-print'), true, undefined, undefined, 'P');
|
||||||
}
|
}
|
||||||
|
|
||||||
me.btnSave = createTitleButton('toolbar__icon icon--inverse btn-save', $html.findById('#slot-btn-dt-save'), true);
|
me.btnSave = createTitleButton('toolbar__icon icon--inverse btn-save', $html.findById('#slot-btn-dt-save'), true, undefined, undefined, 'S');
|
||||||
me.btnUndo = createTitleButton('toolbar__icon icon--inverse btn-undo', $html.findById('#slot-btn-dt-undo'), true);
|
me.btnUndo = createTitleButton('toolbar__icon icon--inverse btn-undo', $html.findById('#slot-btn-dt-undo'), true, undefined, undefined, 'Z');
|
||||||
me.btnRedo = createTitleButton('toolbar__icon icon--inverse btn-redo', $html.findById('#slot-btn-dt-redo'), true);
|
me.btnRedo = createTitleButton('toolbar__icon icon--inverse btn-redo', $html.findById('#slot-btn-dt-redo'), true, undefined, undefined, 'Y');
|
||||||
|
|
||||||
if ( me.btnSave.$icon.is('svg') ) {
|
if ( me.btnSave.$icon.is('svg') ) {
|
||||||
me.btnSave.$icon.addClass('icon-save btn-save');
|
me.btnSave.$icon.addClass('icon-save btn-save');
|
||||||
|
|
|
@ -3178,7 +3178,7 @@ define([
|
||||||
|
|
||||||
me.toolbar.render(_.extend({isCompactView: compactview}, config));
|
me.toolbar.render(_.extend({isCompactView: compactview}, config));
|
||||||
|
|
||||||
var tab = {action: 'review', caption: me.toolbar.textTabCollaboration};
|
var tab = {action: 'review', caption: me.toolbar.textTabCollaboration, dataHintTitle: 'U'};
|
||||||
var $panel = me.application.getController('Common.Controllers.ReviewChanges').createToolbarPanel();
|
var $panel = me.application.getController('Common.Controllers.ReviewChanges').createToolbarPanel();
|
||||||
if ( $panel ) {
|
if ( $panel ) {
|
||||||
me.toolbar.addTab(tab, $panel, 5);
|
me.toolbar.addTab(tab, $panel, 5);
|
||||||
|
@ -3204,7 +3204,7 @@ define([
|
||||||
|
|
||||||
if ( config.isDesktopApp ) {
|
if ( config.isDesktopApp ) {
|
||||||
if ( config.canProtect ) {
|
if ( config.canProtect ) {
|
||||||
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
tab = {action: 'protect', caption: me.toolbar.textTabProtect, dataHintTitle: 'T'};
|
||||||
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||||
|
|
||||||
if ($panel) me.toolbar.addTab(tab, $panel, 6);
|
if ($panel) me.toolbar.addTab(tab, $panel, 6);
|
||||||
|
@ -3217,7 +3217,7 @@ define([
|
||||||
}
|
}
|
||||||
if ( config.isEdit && config.canFeatureContentControl || config.isRestrictedEdit && config.canFillForms ) {
|
if ( config.isEdit && config.canFeatureContentControl || config.isRestrictedEdit && config.canFillForms ) {
|
||||||
if (config.canFeatureForms) {
|
if (config.canFeatureForms) {
|
||||||
tab = {caption: me.textTabForms, action: 'forms'};
|
tab = {caption: me.textTabForms, action: 'forms', dataHintTitle: 'M'};
|
||||||
var forms = me.getApplication().getController('FormsTab');
|
var forms = me.getApplication().getController('FormsTab');
|
||||||
forms.setApi(me.api).setConfig({toolbar: me, config: config});
|
forms.setApi(me.api).setConfig({toolbar: me, config: config});
|
||||||
$panel = forms.createToolbarPanel();
|
$panel = forms.createToolbarPanel();
|
||||||
|
|
|
@ -109,11 +109,11 @@ define([
|
||||||
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
||||||
template: _.template(template),
|
template: _.template(template),
|
||||||
tabs: [
|
tabs: [
|
||||||
{caption: me.textTabFile, action: 'file', extcls: 'canedit', haspanel:false},
|
{caption: me.textTabFile, action: 'file', extcls: 'canedit', haspanel:false, dataHintTitle: 'F'},
|
||||||
{caption: me.textTabHome, action: 'home', extcls: 'canedit'},
|
{caption: me.textTabHome, action: 'home', extcls: 'canedit', dataHintTitle: 'H'},
|
||||||
{caption: me.textTabInsert, action: 'ins', extcls: 'canedit'},
|
{caption: me.textTabInsert, action: 'ins', extcls: 'canedit', dataHintTitle: 'I'},
|
||||||
{caption: me.textTabLayout, action: 'layout', extcls: 'canedit'},
|
{caption: me.textTabLayout, action: 'layout', extcls: 'canedit', dataHintTitle: 'L'},
|
||||||
{caption: me.textTabLinks, action: 'links', extcls: 'canedit'}
|
{caption: me.textTabLinks, action: 'links', extcls: 'canedit', dataHintTitle: 'R'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1398,7 +1398,7 @@ define([
|
||||||
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
||||||
template: _.template(template_view),
|
template: _.template(template_view),
|
||||||
tabs: [
|
tabs: [
|
||||||
{caption: me.textTabFile, action: 'file', haspanel: false}
|
{caption: me.textTabFile, action: 'file', haspanel: false, dataHintTitle: 'F'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -2418,7 +2418,7 @@ define([
|
||||||
}
|
}
|
||||||
me.toolbar.render(_.extend({compactview: compactview}, config));
|
me.toolbar.render(_.extend({compactview: compactview}, config));
|
||||||
|
|
||||||
var tab = {action: 'review', caption: me.toolbar.textTabCollaboration};
|
var tab = {action: 'review', caption: me.toolbar.textTabCollaboration, dataHintTitle: 'U'};
|
||||||
var $panel = me.getApplication().getController('Common.Controllers.ReviewChanges').createToolbarPanel();
|
var $panel = me.getApplication().getController('Common.Controllers.ReviewChanges').createToolbarPanel();
|
||||||
if ( $panel ) {
|
if ( $panel ) {
|
||||||
me.toolbar.addTab(tab, $panel, 4);
|
me.toolbar.addTab(tab, $panel, 4);
|
||||||
|
@ -2449,7 +2449,7 @@ define([
|
||||||
|
|
||||||
if ( config.isDesktopApp ) {
|
if ( config.isDesktopApp ) {
|
||||||
if ( config.canProtect ) { // don't add protect panel to toolbar
|
if ( config.canProtect ) { // don't add protect panel to toolbar
|
||||||
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
tab = {action: 'protect', caption: me.toolbar.textTabProtect, dataHintTitle: 'T'};
|
||||||
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||||
if ($panel)
|
if ($panel)
|
||||||
me.toolbar.addTab(tab, $panel, 4);
|
me.toolbar.addTab(tab, $panel, 4);
|
||||||
|
|
|
@ -128,10 +128,10 @@ define([
|
||||||
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
||||||
template: _.template(template),
|
template: _.template(template),
|
||||||
tabs: [
|
tabs: [
|
||||||
{caption: me.textTabFile, action: 'file', extcls: 'canedit', haspanel:false},
|
{caption: me.textTabFile, action: 'file', extcls: 'canedit', haspanel:false, dataHintTitle: 'F'},
|
||||||
{caption: me.textTabHome, action: 'home', extcls: 'canedit'},
|
{caption: me.textTabHome, action: 'home', extcls: 'canedit', dataHintTitle: 'H'},
|
||||||
{caption: me.textTabInsert, action: 'ins', extcls: 'canedit'},
|
{caption: me.textTabInsert, action: 'ins', extcls: 'canedit', dataHintTitle: 'I'},
|
||||||
{caption: me.textTabTransitions, action: 'transit', extcls: 'canedit'}
|
{caption: me.textTabTransitions, action: 'transit', extcls: 'canedit', dataHintTitle: 'N'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1073,7 +1073,7 @@ define([
|
||||||
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
||||||
template: _.template(template_view),
|
template: _.template(template_view),
|
||||||
tabs: [
|
tabs: [
|
||||||
{caption: me.textTabFile, action: 'file', haspanel:false}
|
{caption: me.textTabFile, action: 'file', haspanel:false, dataHintTitle: 'F'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -3715,7 +3715,7 @@ define([
|
||||||
me.toolbar.render(_.extend({isCompactView: compactview}, config));
|
me.toolbar.render(_.extend({isCompactView: compactview}, config));
|
||||||
|
|
||||||
if ( !config.isEditDiagram && !config.isEditMailMerge ) {
|
if ( !config.isEditDiagram && !config.isEditMailMerge ) {
|
||||||
var tab = {action: 'review', caption: me.toolbar.textTabCollaboration};
|
var tab = {action: 'review', caption: me.toolbar.textTabCollaboration, dataHintTitle: 'U'};
|
||||||
var $panel = me.getApplication().getController('Common.Controllers.ReviewChanges').createToolbarPanel();
|
var $panel = me.getApplication().getController('Common.Controllers.ReviewChanges').createToolbarPanel();
|
||||||
if ($panel) {
|
if ($panel) {
|
||||||
me.toolbar.addTab(tab, $panel, 6);
|
me.toolbar.addTab(tab, $panel, 6);
|
||||||
|
@ -3755,7 +3755,7 @@ define([
|
||||||
Array.prototype.push.apply(me.toolbar.lockControls, formulatab.getButtons());
|
Array.prototype.push.apply(me.toolbar.lockControls, formulatab.getButtons());
|
||||||
|
|
||||||
if ( config.canFeaturePivot ) {
|
if ( config.canFeaturePivot ) {
|
||||||
tab = {action: 'pivot', caption: me.textPivot};
|
tab = {action: 'pivot', caption: me.textPivot, dataHintTitle: 'B'};
|
||||||
var pivottab = me.getApplication().getController('PivotTable');
|
var pivottab = me.getApplication().getController('PivotTable');
|
||||||
pivottab.setApi(me.api).setConfig({toolbar: me});
|
pivottab.setApi(me.api).setConfig({toolbar: me});
|
||||||
$panel = pivottab.createToolbarPanel();
|
$panel = pivottab.createToolbarPanel();
|
||||||
|
@ -3778,7 +3778,7 @@ define([
|
||||||
me.toolbar.btnCopy.$el.removeClass('split');
|
me.toolbar.btnCopy.$el.removeClass('split');
|
||||||
}
|
}
|
||||||
|
|
||||||
var tab = {action: 'protect', caption: me.toolbar.textTabProtect};
|
var tab = {action: 'protect', caption: me.toolbar.textTabProtect, dataHintTitle: 'T'};
|
||||||
var $panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
var $panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
|
||||||
if ($panel) {
|
if ($panel) {
|
||||||
config.canProtect && $panel.append($('<div class="separator long"></div>'));
|
config.canProtect && $panel.append($('<div class="separator long"></div>'));
|
||||||
|
|
|
@ -352,14 +352,14 @@ define([
|
||||||
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
||||||
template: _.template(template),
|
template: _.template(template),
|
||||||
tabs: [
|
tabs: [
|
||||||
{ caption: me.textTabFile, action: 'file', extcls: 'canedit', haspanel:false},
|
{ caption: me.textTabFile, action: 'file', extcls: 'canedit', haspanel:false, dataHintTitle: 'F'},
|
||||||
{ caption: me.textTabHome, action: 'home', extcls: 'canedit'},
|
{ caption: me.textTabHome, action: 'home', extcls: 'canedit', dataHintTitle: 'H'},
|
||||||
{ caption: me.textTabInsert, action: 'ins', extcls: 'canedit'},
|
{ caption: me.textTabInsert, action: 'ins', extcls: 'canedit', dataHintTitle: 'I'},
|
||||||
{caption: me.textTabLayout, action: 'layout', extcls: 'canedit'},
|
{caption: me.textTabLayout, action: 'layout', extcls: 'canedit', dataHintTitle: 'L'},
|
||||||
{caption: me.textTabFormula, action: 'formula', extcls: 'canedit'},
|
{caption: me.textTabFormula, action: 'formula', extcls: 'canedit', dataHintTitle: 'O'},
|
||||||
{caption: me.textTabData, action: 'data', extcls: 'canedit'},
|
{caption: me.textTabData, action: 'data', extcls: 'canedit', dataHintTitle: 'D'},
|
||||||
undefined, undefined, undefined,
|
undefined, undefined, undefined,
|
||||||
{caption: me.textTabView, action: 'view', extcls: 'canedit'}
|
{caption: me.textTabView, action: 'view', extcls: 'canedit', dataHintTitle: 'W'}
|
||||||
]}
|
]}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1615,7 +1615,7 @@ define([
|
||||||
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
Common.UI.Mixtbar.prototype.initialize.call(this, {
|
||||||
template: _.template(template_view),
|
template: _.template(template_view),
|
||||||
tabs: [
|
tabs: [
|
||||||
{caption: me.textTabFile, action: 'file', haspanel:false}
|
{caption: me.textTabFile, action: 'file', haspanel:false, dataHintTitle: 'F'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue