[SSE] Debug grouping objects

This commit is contained in:
Julia Radzhabova 2018-06-28 15:42:01 +03:00
parent 685a0a42d3
commit 2ff4e6ae97
3 changed files with 36 additions and 10 deletions

View file

@ -1741,7 +1741,7 @@ define([
onApiPageOrient: function(orient) {
if (this._state.pgorient !== orient) {
this.toolbar.btnPageOrient.menu.items[orient].setChecked(true);
this.toolbar.btnPageOrient.menu.items[orient == Asc.c_oAscPageOrientation.PagePortrait ? 0 : 1].setChecked(true);
this._state.pgorient = orient;
}
},
@ -1897,8 +1897,13 @@ define([
need_disable = (selectionType == Asc.c_oAscSelectionType.RangeCells || selectionType == Asc.c_oAscSelectionType.RangeCol ||
selectionType == Asc.c_oAscSelectionType.RangeRow || selectionType == Asc.c_oAscSelectionType.RangeMax);
toolbar.lockToolbar(SSE.enumLock.selRange, need_disable, { array: [toolbar.btnImgAlign, toolbar.btnImgBackward, toolbar.btnImgForward, toolbar.btnImgGroup]});
toolbar.btnImgGroup.menu.items[0].setDisabled(!this.api.asc_canGroupGraphicsObjects());
toolbar.btnImgGroup.menu.items[1].setDisabled(!this.api.asc_canUnGroupGraphicsObjects());
var cangroup = this.api.asc_canGroupGraphicsObjects(),
canungroup = this.api.asc_canUnGroupGraphicsObjects();
toolbar.lockToolbar(SSE.enumLock.cantGroupUngroup, !cangroup && !canungroup, { array: [toolbar.btnImgGroup]});
toolbar.btnImgGroup.menu.items[0].setDisabled(!cangroup);
toolbar.btnImgGroup.menu.items[1].setDisabled(!canungroup);
toolbar.lockToolbar(SSE.enumLock.cantGroup, !cangroup, { array: [toolbar.btnImgAlign]});
if (editOptionsDisabled) return;
@ -3140,7 +3145,12 @@ define([
onPageSizeClick: function(menu, item, state) {
if (this.api && state) {
this._state.pgsize = [0, 0];
// this.api.change_DocSize(item.value[0], item.value[1]);
// var props = new Asc.asc_CPageOptions(),
// opt = new Asc.asc_CPageSetup();
// opt.asc_setWidth(item.value[0]);
// opt.asc_setHeight(item.value[1]);
// props.asc_setPageSetup(opt);
// this.api.asc_setPageOptions(props, this.api.asc_getActiveWorksheetIndex());
Common.component.Analytics.trackEvent('ToolBar', 'Page Size');
}
@ -3193,7 +3203,11 @@ define([
onPageOrientSelect: function(menu, item) {
this._state.pgorient = undefined;
if (this.api && item.checked) {
// this.api.change_PageOrient(item.value);
// var props = new Asc.asc_CPageOptions(),
// opt = new Asc.asc_CPageSetup();
// opt.asc_setOrientation(item.value);
// props.asc_setPageSetup(opt);
// this.api.asc_setPageOptions(props, this.api.asc_getActiveWorksheetIndex());
}
Common.NotificationCenter.trigger('edit:complete', this.toolbar);

View file

@ -81,7 +81,9 @@ define([
multiselect: 'is-multiselect',
cantHyperlink: 'cant-hyperlink',
commentLock: 'can-comment',
cantModifyFilter: 'cant-filter'
cantModifyFilter: 'cant-filter',
cantGroup: 'cant-group',
cantGroupUngroup: 'cant-group-ungroup',
};
SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({
@ -1219,14 +1221,14 @@ define([
iconCls: 'mnu-orient-portrait',
checkable: true,
toggleGroup: 'menuOrient',
value: true
value: Asc.c_oAscPageOrientation.PagePortrait
},
{
caption: me.textLandscape,
iconCls: 'mnu-orient-landscape',
checkable: true,
toggleGroup: 'menuOrient',
value: false
value: Asc.c_oAscPageOrientation.PageLandscape
}
]
})
@ -1407,7 +1409,7 @@ define([
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'btn-img-align',
caption: me.capImgAlign,
lock : [_set.selRange, _set.selRangeEdit, _set.lostConnect, _set.coAuth],
lock : [_set.selRange, _set.selRangeEdit, _set.cantGroup, _set.lostConnect, _set.coAuth],
menu: true
});
@ -1415,7 +1417,7 @@ define([
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'btn-img-group',
caption: me.capImgGroup,
lock : [_set.selRange, _set.selRangeEdit, _set.lostConnect, _set.coAuth],
lock : [_set.selRange, _set.selRangeEdit, _set.cantGroupUngroup, _set.lostConnect, _set.coAuth],
menu: true
});
me.btnImgForward = new Common.UI.Button({

View file

@ -210,6 +210,16 @@
.menu-btn-icon(mnu-text-subscript, 38, @menu-icon-size);
.menu-btn-icon(mnu-text-superscript, 39, @menu-icon-size);
.menu-btn-icon(mnu-orient-portrait, 19, @menu-icon-size);
.menu-btn-icon(mnu-orient-landscape, 20, @menu-icon-size);
.menu-btn-icon(mnu-img-align-center, 0, @menu-icon-size);
.menu-btn-icon(mnu-img-align-left, 2, @menu-icon-size);
.menu-btn-icon(mnu-img-align-right, 3, @menu-icon-size);
.menu-btn-icon(mnu-img-align-bottom, 4, @menu-icon-size);
.menu-btn-icon(mnu-img-align-middle, 5, @menu-icon-size);
.menu-btn-icon(mnu-img-align-top, 6, @menu-icon-size);
.username-tip {
background-color: #ee3525;
border: none;