[DE PE SSE] View tab: fix zoom, add Show frozen panes shadow
This commit is contained in:
parent
25c5b79697
commit
e91a68a160
|
@ -113,7 +113,10 @@ define([
|
||||||
{ displayValue: "125%", value: 125 },
|
{ displayValue: "125%", value: 125 },
|
||||||
{ displayValue: "150%", value: 150 },
|
{ displayValue: "150%", value: 150 },
|
||||||
{ displayValue: "175%", value: 175 },
|
{ displayValue: "175%", value: 175 },
|
||||||
{ displayValue: "200%", value: 200 }
|
{ displayValue: "200%", value: 200 },
|
||||||
|
{ displayValue: "300%", value: 300 },
|
||||||
|
{ displayValue: "400%", value: 400 },
|
||||||
|
{ displayValue: "500%", value: 500 }
|
||||||
],
|
],
|
||||||
dataHint : '1',
|
dataHint : '1',
|
||||||
dataHintDirection: 'top',
|
dataHintDirection: 'top',
|
||||||
|
|
|
@ -98,7 +98,10 @@ define([
|
||||||
{ displayValue: "125%", value: 125 },
|
{ displayValue: "125%", value: 125 },
|
||||||
{ displayValue: "150%", value: 150 },
|
{ displayValue: "150%", value: 150 },
|
||||||
{ displayValue: "175%", value: 175 },
|
{ displayValue: "175%", value: 175 },
|
||||||
{ displayValue: "200%", value: 200 }
|
{ displayValue: "200%", value: 200 },
|
||||||
|
{ displayValue: "300%", value: 300 },
|
||||||
|
{ displayValue: "400%", value: 400 },
|
||||||
|
{ displayValue: "500%", value: 500 }
|
||||||
],
|
],
|
||||||
dataHint : '1',
|
dataHint : '1',
|
||||||
dataHintDirection: 'top',
|
dataHintDirection: 'top',
|
||||||
|
|
|
@ -85,6 +85,7 @@ define([
|
||||||
this.addListeners({
|
this.addListeners({
|
||||||
'ViewTab': {
|
'ViewTab': {
|
||||||
'viewtab:freeze': this.onFreeze,
|
'viewtab:freeze': this.onFreeze,
|
||||||
|
'viewtab:freezeshadow': this.onFreezeShadow,
|
||||||
'viewtab:formula': this.onViewSettings,
|
'viewtab:formula': this.onViewSettings,
|
||||||
'viewtab:headings': this.onViewSettings,
|
'viewtab:headings': this.onViewSettings,
|
||||||
'viewtab:gridlines': this.onViewSettings,
|
'viewtab:gridlines': this.onViewSettings,
|
||||||
|
@ -105,6 +106,11 @@ define([
|
||||||
'view:compact': _.bind(function (toolbar, state) {
|
'view:compact': _.bind(function (toolbar, state) {
|
||||||
this.view.chToolbar.setValue(!state, true);
|
this.view.chToolbar.setValue(!state, true);
|
||||||
}, this)
|
}, this)
|
||||||
|
},
|
||||||
|
'Common.Views.Header': {
|
||||||
|
'toolbar:freezeshadow': _.bind(function (isChecked) {
|
||||||
|
this.view.btnFreezePanes.menu.items[4].setChecked(isChecked, true);
|
||||||
|
}, this)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Common.NotificationCenter.on('layout:changed', _.bind(this.onLayoutChanged, this));
|
Common.NotificationCenter.on('layout:changed', _.bind(this.onLayoutChanged, this));
|
||||||
|
@ -137,6 +143,13 @@ define([
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.view);
|
Common.NotificationCenter.trigger('edit:complete', this.view);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onFreezeShadow: function (checked) {
|
||||||
|
this.api.asc_setFrozenPaneBorderType(checked ? Asc.c_oAscFrozenPaneBorderType.shadow : Asc.c_oAscFrozenPaneBorderType.line);
|
||||||
|
Common.localStorage.setBool('sse-freeze-shadow', checked);
|
||||||
|
this.view.fireEvent('freeze:shadow', [checked]);
|
||||||
|
Common.NotificationCenter.trigger('edit:complete', this.view);
|
||||||
|
},
|
||||||
|
|
||||||
onZoom: function(zoom) {
|
onZoom: function(zoom) {
|
||||||
if (this.api) {
|
if (this.api) {
|
||||||
this.api.asc_setZoom(zoom/100);
|
this.api.asc_setZoom(zoom/100);
|
||||||
|
|
|
@ -118,6 +118,11 @@ define([
|
||||||
if ( me.header.btnSave )
|
if ( me.header.btnSave )
|
||||||
me.header.btnSave.setDisabled(state);
|
me.header.btnSave.setDisabled(state);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'ViewTab': {
|
||||||
|
'freeze:shadow': function (checked) {
|
||||||
|
me.header.mnuitemFreezePanesShadow.setChecked(checked, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -511,6 +516,7 @@ define([
|
||||||
case 'freezepanesshadow':
|
case 'freezepanesshadow':
|
||||||
me.api.asc_setFrozenPaneBorderType(item.isChecked() ? Asc.c_oAscFrozenPaneBorderType.shadow : Asc.c_oAscFrozenPaneBorderType.line);
|
me.api.asc_setFrozenPaneBorderType(item.isChecked() ? Asc.c_oAscFrozenPaneBorderType.shadow : Asc.c_oAscFrozenPaneBorderType.line);
|
||||||
Common.localStorage.setBool('sse-freeze-shadow', item.isChecked());
|
Common.localStorage.setBool('sse-freeze-shadow', item.isChecked());
|
||||||
|
me.header.fireEvent('toolbar:freezeshadow', [item.isChecked()]);
|
||||||
break;
|
break;
|
||||||
case 'advanced': me.header.fireEvent('file:settings', me.header); break;
|
case 'advanced': me.header.fireEvent('file:settings', me.header); break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,11 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
me.btnFreezePanes.menu.on('item:click', function (menu, item, e) {
|
me.btnFreezePanes.menu.on('item:click', function (menu, item, e) {
|
||||||
me.fireEvent('viewtab:freeze', [item.value]);
|
if (item.value === 'shadow') {
|
||||||
|
me.fireEvent('viewtab:freezeshadow', [item.checked]);
|
||||||
|
} else {
|
||||||
|
me.fireEvent('viewtab:freeze', [item.value]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.chFormula.on('change', function (field, value) {
|
this.chFormula.on('change', function (field, value) {
|
||||||
me.fireEvent('viewtab:formula', [0, value]);
|
me.fireEvent('viewtab:formula', [0, value]);
|
||||||
|
@ -286,6 +290,13 @@ define([
|
||||||
{
|
{
|
||||||
caption: me.textFreezeCol,
|
caption: me.textFreezeCol,
|
||||||
value: Asc.c_oAscFrozenPaneAddType.firstCol
|
value: Asc.c_oAscFrozenPaneAddType.firstCol
|
||||||
|
},
|
||||||
|
{ caption: '--' },
|
||||||
|
{
|
||||||
|
caption: me.textShowFrozenPanesShadow,
|
||||||
|
value: 'shadow',
|
||||||
|
checkable: true,
|
||||||
|
checked: Common.localStorage.getBool('sse-freeze-shadow', true)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}));
|
}));
|
||||||
|
@ -403,6 +414,7 @@ define([
|
||||||
textCombineSheetAndStatusBars: 'Combine sheet and status bars',
|
textCombineSheetAndStatusBars: 'Combine sheet and status bars',
|
||||||
textAlwaysShowToolbar: 'Always show toolbar',
|
textAlwaysShowToolbar: 'Always show toolbar',
|
||||||
textInterfaceTheme: 'Interface theme',
|
textInterfaceTheme: 'Interface theme',
|
||||||
|
textShowFrozenPanesShadow: 'Show frozen panes shadow'
|
||||||
}
|
}
|
||||||
}()), SSE.Views.ViewTab || {}));
|
}()), SSE.Views.ViewTab || {}));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue