[SSE] Tooltips for cell styles.

This commit is contained in:
Julia Radzhabova 2017-06-27 12:52:29 +03:00
parent 0492d169c8
commit bccc2b7187
3 changed files with 10 additions and 8 deletions

View file

@ -105,6 +105,7 @@ define([
var me = this;
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseWarning: false};
this.translationTable = [];
if (!Common.Utils.isBrowserSupported()){
Common.Utils.showBrowserRestriction();
@ -129,16 +130,16 @@ define([
'Your text here': this.txtArt
};
styleNames.forEach(function(item){
translate[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item;
translate[item] = me.translationTable[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item;
});
translate['Currency [0]'] = me.txtStyle_Currency + ' [0]';
translate['Comma [0]'] = me.txtStyle_Comma + ' [0]';
translate['Currency [0]'] = me.translationTable['Currency [0]'] = me.txtStyle_Currency + ' [0]';
translate['Comma [0]'] = me.translationTable['Comma [0]'] = me.txtStyle_Comma + ' [0]';
for (var i=1; i<7; i++) {
translate['Accent'+i] = me.txtAccent + i;
translate['20% - Accent'+i] = '20% - ' + me.txtAccent + i;
translate['40% - Accent'+i] = '40% - ' + me.txtAccent + i;
translate['60% - Accent'+i] = '60% - ' + me.txtAccent + i;
translate['Accent'+i] = me.translationTable['Accent'+i] = me.txtAccent + i;
translate['20% - Accent'+i] = me.translationTable['20% - Accent'+i] = '20% - ' + me.txtAccent + i;
translate['40% - Accent'+i] = me.translationTable['40% - Accent'+i] = '40% - ' + me.txtAccent + i;
translate['60% - Accent'+i] = me.translationTable['60% - Accent'+i] = '60% - ' + me.txtAccent + i;
}
this.api = new Asc.spreadsheet_api({

View file

@ -1538,11 +1538,13 @@ define([
listStyles.menuPicker.store.reset([]); // remove all
var mainController = this.getApplication().getController('Main');
var merged_array = styles.asc_getDefaultStyles().concat(styles.asc_getDocStyles());
_.each(merged_array, function(style){
listStyles.menuPicker.store.add({
imageUrl: style.asc_getImage(),
name : style.asc_getName(),
tip : mainController.translationTable[style.get_Name()] || style.get_Name(),
uid : Common.UI.getId()
});
});

View file

@ -727,7 +727,6 @@ define([
enableKeyEvents : true,
itemWidth : 112,
itemHeight : 38,
hint : this.tipCellStyle,
menuMaxHeight : 226,
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth],
beforeOpenHandler: function(e) {