Added style groups for table cells
This commit is contained in:
parent
b62144a886
commit
4236ed0ee7
|
@ -2198,6 +2198,13 @@ define([
|
||||||
var mainController = this.getApplication().getController('Main');
|
var mainController = this.getApplication().getController('Main');
|
||||||
var count = listStyles.menuPicker.store.length;
|
var count = listStyles.menuPicker.store.length;
|
||||||
var rec = listStyles.menuPicker.getSelectedRec();
|
var rec = listStyles.menuPicker.getSelectedRec();
|
||||||
|
var groups = [];
|
||||||
|
for (let i = 0; i < 4; i++) { groups.push('menu-style-group-color'); }
|
||||||
|
for (let i = 0; i < 8; i++) { groups.push('menu-style-group-model'); }
|
||||||
|
for (let i = 0; i < 6; i++) { groups.push('menu-style-group-title'); }
|
||||||
|
for (let i = 0; i < 24; i++) { groups.push('menu-style-group-themed'); }
|
||||||
|
for (let i = 0; i < 5; i++) { groups.push('menu-style-group-number'); }
|
||||||
|
|
||||||
if (count>0 && count==styles.length) {
|
if (count>0 && count==styles.length) {
|
||||||
var data = listStyles.menuPicker.dataViewItems;
|
var data = listStyles.menuPicker.dataViewItems;
|
||||||
data && _.each(styles, function(style, index){
|
data && _.each(styles, function(style, index){
|
||||||
|
@ -2211,14 +2218,22 @@ define([
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var arr = [];
|
var arr = [];
|
||||||
_.each(styles, function(style){
|
var countCustomStyles = 0;
|
||||||
|
_.each(styles, function(style, index){
|
||||||
arr.push({
|
arr.push({
|
||||||
imageUrl: style.asc_getImage(),
|
imageUrl: style.asc_getImage(),
|
||||||
name : style.asc_getName(),
|
name : style.asc_getName(),
|
||||||
|
group : (style.asc_getType() == 0 ? groups[index - countCustomStyles] : 'menu-style-group-custom'),
|
||||||
tip : mainController.translationTable[style.get_Name()] || style.get_Name(),
|
tip : mainController.translationTable[style.get_Name()] || style.get_Name(),
|
||||||
uid : Common.UI.getId()
|
uid : Common.UI.getId()
|
||||||
});
|
});
|
||||||
|
if(style.asc_getType() == 1){
|
||||||
|
countCustomStyles += 1;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if(countCustomStyles == 0){
|
||||||
|
listStyles.groups.remove(listStyles.groups.models.find(style => style.id === 'menu-style-group-custom'));
|
||||||
|
}
|
||||||
listStyles.menuPicker.store.reset(arr);
|
listStyles.menuPicker.store.reset(arr);
|
||||||
}
|
}
|
||||||
if (listStyles.menuPicker.store.length > 0 && listStyles.rendered) {
|
if (listStyles.menuPicker.store.length > 0 && listStyles.rendered) {
|
||||||
|
|
|
@ -1285,7 +1285,15 @@ define([
|
||||||
itemWidth : 112,
|
itemWidth : 112,
|
||||||
itemHeight : 40,
|
itemHeight : 40,
|
||||||
style: 'min-width:158px;',
|
style: 'min-width:158px;',
|
||||||
menuMaxHeight : 226,
|
groups: new Common.UI.DataViewGroupStore([
|
||||||
|
{id: 'menu-style-group-custom', caption: this.textCustom },
|
||||||
|
{id: 'menu-style-group-color', caption: this.textGoodBadAndNeutral },
|
||||||
|
{id: 'menu-style-group-model', caption: this.textDataAndModel },
|
||||||
|
{id: 'menu-style-group-title', caption: this.textTitlesAndHeadings },
|
||||||
|
{id: 'menu-style-group-themed', caption: this.textThemedCallStyles },
|
||||||
|
{id: 'menu-style-group-number', caption: this.textNumberFormat }
|
||||||
|
]),
|
||||||
|
menuMaxHeight : 350,
|
||||||
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set['FormatCells']],
|
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selSlicer, _set.lostConnect, _set.coAuth, _set['FormatCells']],
|
||||||
dataHint : '1',
|
dataHint : '1',
|
||||||
dataHintDirection: 'bottom',
|
dataHintDirection: 'bottom',
|
||||||
|
@ -3280,6 +3288,12 @@ define([
|
||||||
textDone: 'Done',
|
textDone: 'Done',
|
||||||
tipTextFormatting: 'More text formatting tools',
|
tipTextFormatting: 'More text formatting tools',
|
||||||
tipHAligh: 'Horizontal Align',
|
tipHAligh: 'Horizontal Align',
|
||||||
tipVAligh: 'Vertical Align'
|
tipVAligh: 'Vertical Align',
|
||||||
|
textCustom: 'Custom',
|
||||||
|
textGoodBadAndNeutral: 'Good, Bad, and Neutral',
|
||||||
|
textDataAndModel: 'Data and Model',
|
||||||
|
textTitlesAndHeadings: 'Titles and Headings',
|
||||||
|
textThemedCallStyles: 'Themed Call Styles',
|
||||||
|
textNumberFormat: 'Number Format'
|
||||||
}, SSE.Views.Toolbar || {}));
|
}, SSE.Views.Toolbar || {}));
|
||||||
});
|
});
|
|
@ -3449,6 +3449,12 @@
|
||||||
"SSE.Views.Toolbar.textVertical": "Вертикальный текст",
|
"SSE.Views.Toolbar.textVertical": "Вертикальный текст",
|
||||||
"SSE.Views.Toolbar.textWidth": "Ширина",
|
"SSE.Views.Toolbar.textWidth": "Ширина",
|
||||||
"SSE.Views.Toolbar.textZoom": "Масштаб",
|
"SSE.Views.Toolbar.textZoom": "Масштаб",
|
||||||
|
"SSE.Views.Toolbar.textCustom": "Пользовательский",
|
||||||
|
"SSE.Views.Toolbar.textGoodBadAndNeutral": "Хороший, плохой и нейтральный",
|
||||||
|
"SSE.Views.Toolbar.textDataAndModel": "Данные и модель",
|
||||||
|
"SSE.Views.Toolbar.textTitlesAndHeadings": "Названия и заголовки",
|
||||||
|
"SSE.Views.Toolbar.textThemedCallStyles": "Стили ячеек с темой",
|
||||||
|
"SSE.Views.Toolbar.textNumberFormat": "Числовой формат",
|
||||||
"SSE.Views.Toolbar.tipAlignBottom": "Выровнять по нижнему краю",
|
"SSE.Views.Toolbar.tipAlignBottom": "Выровнять по нижнему краю",
|
||||||
"SSE.Views.Toolbar.tipAlignCenter": "Выровнять по центру",
|
"SSE.Views.Toolbar.tipAlignCenter": "Выровнять по центру",
|
||||||
"SSE.Views.Toolbar.tipAlignJust": "Выровнять по ширине",
|
"SSE.Views.Toolbar.tipAlignJust": "Выровнять по ширине",
|
||||||
|
|
|
@ -146,3 +146,21 @@
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.combo-styles {
|
||||||
|
.menu-picker-container .dataview {
|
||||||
|
padding: 10px 0 0 2px;
|
||||||
|
}
|
||||||
|
.dropdown-menu {
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataview {
|
||||||
|
padding: 0 0 0 2px;
|
||||||
|
|
||||||
|
.group-description {
|
||||||
|
padding: 3px 0 3px 10px;
|
||||||
|
.font-weight-bold();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue