commit
0c23681b48
|
@ -133,6 +133,8 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiEditCell: function(state) {
|
onApiEditCell: function(state) {
|
||||||
|
if (this.viewmode) return; // signed file
|
||||||
|
|
||||||
if (state == Asc.c_oAscCellEditorState.editStart){
|
if (state == Asc.c_oAscCellEditorState.editStart){
|
||||||
this.api.isCellEdited = true;
|
this.api.isCellEdited = true;
|
||||||
this.editor.cellNameDisabled(true);
|
this.editor.cellNameDisabled(true);
|
||||||
|
@ -151,6 +153,8 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiSelectionChanged: function(info) {
|
onApiSelectionChanged: function(info) {
|
||||||
|
if (this.viewmode) return; // signed file
|
||||||
|
|
||||||
var seltype = info.asc_getSelectionType(),
|
var seltype = info.asc_getSelectionType(),
|
||||||
coauth_disable = (!this.mode.isEditMailMerge && !this.mode.isEditDiagram) ? (info.asc_getLocked() === true || info.asc_getLockedTable() === true || info.asc_getLockedPivotTable()===true) : false;
|
coauth_disable = (!this.mode.isEditMailMerge && !this.mode.isEditDiagram) ? (info.asc_getLocked() === true || info.asc_getLockedTable() === true || info.asc_getLockedPivotTable()===true) : false;
|
||||||
|
|
||||||
|
@ -241,6 +245,8 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onInsertFunction: function() {
|
onInsertFunction: function() {
|
||||||
|
if (this.viewmode) return; // signed file
|
||||||
|
|
||||||
if ( this.mode.isEdit && !this.editor.$btnfunc['hasClass']('disabled')) {
|
if ( this.mode.isEdit && !this.editor.$btnfunc['hasClass']('disabled')) {
|
||||||
var controller = this.getApplication().getController('FormulaDialog');
|
var controller = this.getApplication().getController('FormulaDialog');
|
||||||
if (controller) {
|
if (controller) {
|
||||||
|
@ -314,6 +320,13 @@ define([
|
||||||
disableEditing: function(disabled) {
|
disableEditing: function(disabled) {
|
||||||
this.editor.$btnfunc[!disabled?'removeClass':'addClass']('disabled');
|
this.editor.$btnfunc[!disabled?'removeClass':'addClass']('disabled');
|
||||||
this.editor.btnNamedRanges.setVisible(!disabled);
|
this.editor.btnNamedRanges.setVisible(!disabled);
|
||||||
|
},
|
||||||
|
|
||||||
|
setPreviewMode: function(mode) {
|
||||||
|
if (this.viewmode === mode) return;
|
||||||
|
this.viewmode = mode;
|
||||||
|
this.editor.$btnfunc[!mode?'removeClass':'addClass']('disabled');
|
||||||
|
this.editor.cellNameDisabled(mode);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -458,6 +458,7 @@ define([
|
||||||
var appConfig = me.viewport.mode;
|
var appConfig = me.viewport.mode;
|
||||||
if ( !!appConfig && !appConfig.isEditDiagram && !appConfig.isEditMailMerge ) {
|
if ( !!appConfig && !appConfig.isEditDiagram && !appConfig.isEditMailMerge ) {
|
||||||
if (index == this.api.asc_getActiveWorksheetIndex()) {
|
if (index == this.api.asc_getActiveWorksheetIndex()) {
|
||||||
|
locked = locked || me.viewmode;
|
||||||
me.header.mnuitemHideHeadings.setDisabled(locked);
|
me.header.mnuitemHideHeadings.setDisabled(locked);
|
||||||
me.header.mnuitemHideGridlines.setDisabled(locked);
|
me.header.mnuitemHideGridlines.setDisabled(locked);
|
||||||
me.header.mnuitemFreezePanes.setDisabled(locked);
|
me.header.mnuitemFreezePanes.setDisabled(locked);
|
||||||
|
@ -505,7 +506,10 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
disableEditing: function (disabled) {
|
disableEditing: function (disabled) {
|
||||||
this.header.btnOptions.menu.items[6].setDisabled(disabled);
|
this.viewmode = disabled;
|
||||||
|
this.header.mnuitemHideHeadings.setDisabled(disabled);
|
||||||
|
this.header.mnuitemHideGridlines.setDisabled(disabled);
|
||||||
|
this.header.mnuitemFreezePanes.setDisabled(disabled);
|
||||||
},
|
},
|
||||||
|
|
||||||
textHideFBar: 'Hide Formula Bar',
|
textHideFBar: 'Hide Formula Bar',
|
||||||
|
|
|
@ -388,6 +388,8 @@ define([
|
||||||
SSE.getController('Statusbar').SetDisabled(disable);
|
SSE.getController('Statusbar').SetDisabled(disable);
|
||||||
SSE.getController('Common.Controllers.ReviewChanges').SetDisabled(disable);
|
SSE.getController('Common.Controllers.ReviewChanges').SetDisabled(disable);
|
||||||
SSE.getController('DocumentHolder').SetDisabled(disable, true);
|
SSE.getController('DocumentHolder').SetDisabled(disable, true);
|
||||||
|
SSE.getController('CellEditor').setPreviewMode(disable);
|
||||||
|
SSE.getController('Viewport').disableEditing(disable);
|
||||||
|
|
||||||
// var leftMenu = SSE.getController('LeftMenu').leftMenu;
|
// var leftMenu = SSE.getController('LeftMenu').leftMenu;
|
||||||
// leftMenu.btnComments.setDisabled(disable);
|
// leftMenu.btnComments.setDisabled(disable);
|
||||||
|
|
|
@ -178,7 +178,7 @@ define([
|
||||||
//'tab:manual' : _.bind(this.onAddTabClick, this),
|
//'tab:manual' : _.bind(this.onAddTabClick, this),
|
||||||
'tab:contextmenu' : _.bind(this.onTabMenu, this),
|
'tab:contextmenu' : _.bind(this.onTabMenu, this),
|
||||||
'tab:dblclick' : _.bind(function () {
|
'tab:dblclick' : _.bind(function () {
|
||||||
if (me.editMode && (me.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.Chart) &&
|
if (me.editMode && !(me.mode && me.mode.isDisconnected) && (me.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.Chart) &&
|
||||||
(me.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.FormatTable)&&
|
(me.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.FormatTable)&&
|
||||||
(me.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.PrintTitles)) {
|
(me.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.PrintTitles)) {
|
||||||
me.fireEvent('sheet:changename');
|
me.fireEvent('sheet:changename');
|
||||||
|
@ -502,7 +502,7 @@ define([
|
||||||
label : me.api.asc_getWorksheetName(i),
|
label : me.api.asc_getWorksheetName(i),
|
||||||
// reorderable : !locked,
|
// reorderable : !locked,
|
||||||
cls : locked ? 'coauth-locked':'',
|
cls : locked ? 'coauth-locked':'',
|
||||||
isLockTheDrag : locked,
|
isLockTheDrag : locked || me.mode.isDisconnected,
|
||||||
iconCls : 'btn-sheet-view',
|
iconCls : 'btn-sheet-view',
|
||||||
iconTitle : name,
|
iconTitle : name,
|
||||||
iconVisible : name!==''
|
iconVisible : name!==''
|
||||||
|
|
Loading…
Reference in a new issue