Merge pull request #442 from ONLYOFFICE/feature/sse-freeze-shadow

Feature/sse freeze shadow
This commit is contained in:
Julia Radzhabova 2020-07-29 18:56:20 +03:00 committed by GitHub
commit 4e8c995782
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View file

@ -775,6 +775,7 @@ define([
if (!me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram) {
pluginsController.setApi(me.api);
this.api && this.api.asc_setFrozenPaneBorderType(Common.localStorage.getBool('sse-freeze-shadow') ? Asc.c_oAscFrozenPaneBorderType.shadow : Asc.c_oAscFrozenPaneBorderType.line);
}
leftMenuView.disableMenu('all',false);

View file

@ -235,6 +235,13 @@ define([
value : 'freezepanes'
});
me.header.mnuitemFreezePanesShadow = new Common.UI.MenuItem({
caption : me.textFreezePanesShadow,
checkable : true,
checked : Common.localStorage.getBool('sse-freeze-shadow'),
value : 'freezepanesshadow'
});
me.header.mnuZoom = new Common.UI.MenuItem({
template: _.template([
'<div id="hdr-menu-zoom" class="menu-zoom" style="height: 25px;" ',
@ -267,6 +274,7 @@ define([
me.header.mnuitemHideGridlines,
{caption:'--'},
me.header.mnuitemFreezePanes,
me.header.mnuitemFreezePanesShadow,
{caption:'--'},
me.header.mnuZoom,
{caption:'--'},
@ -281,7 +289,6 @@ define([
me.header.mnuitemHideGridlines.hide();
me.header.mnuitemFreezePanes.hide();
menu.items[5].hide();
menu.items[7].hide();
if (!config.canViewComments) { // show advanced settings for editing and commenting mode
// mnuitemAdvSettings.hide();
// menu.items[9].hide();
@ -456,6 +463,10 @@ define([
case 'headings': me.api.asc_setDisplayHeadings(!item.isChecked()); break;
case 'gridlines': me.api.asc_setDisplayGridlines(!item.isChecked()); break;
case 'freezepanes': me.api.asc_freezePane(); break;
case 'freezepanesshadow':
me.api.asc_setFrozenPaneBorderType(item.isChecked() ? Asc.c_oAscFrozenPaneBorderType.shadow : Asc.c_oAscFrozenPaneBorderType.line);
Common.localStorage.setBool('sse-freeze-shadow', item.isChecked());
break;
case 'advanced': me.header.fireEvent('file:settings', me.header); break;
}
},
@ -474,6 +485,7 @@ define([
textHideFBar: 'Hide Formula Bar',
textHideHeadings: 'Hide Headings',
textHideGridlines: 'Hide Gridlines',
textFreezePanes: 'Freeze Panes'
textFreezePanes: 'Freeze Panes',
textFreezePanesShadow: 'Show Freezed Panes Shadow'
}, SSE.Controllers.Viewport));
});

View file

@ -1203,6 +1203,7 @@
"SSE.Controllers.Toolbar.txtInsertCells": "Insert Cells",
"SSE.Controllers.Toolbar.txtDeleteCells": "Delete Cells",
"SSE.Controllers.Viewport.textFreezePanes": "Freeze Panes",
"SSE.Controllers.Viewport.textFreezePanesShadow:": "Show Freezed Panes Shadow",
"SSE.Controllers.Viewport.textHideFBar": "Hide Formula Bar",
"SSE.Controllers.Viewport.textHideGridlines": "Hide Gridlines",
"SSE.Controllers.Viewport.textHideHeadings": "Hide Headings",