Fix Bug 37511
This commit is contained in:
parent
b8d0f3832f
commit
24b03043f4
|
@ -89,6 +89,7 @@ define([
|
||||||
me.api.asc_registerCallback('asc_onConnectionStateChanged', _.bind(me.onApiUserConnection, me));
|
me.api.asc_registerCallback('asc_onConnectionStateChanged', _.bind(me.onApiUserConnection, me));
|
||||||
me.api.asc_registerCallback('asc_onDocumentContentReady', _.bind(me.onApiDocumentContentReady, me));
|
me.api.asc_registerCallback('asc_onDocumentContentReady', _.bind(me.onApiDocumentContentReady, me));
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
Common.NotificationCenter.on('api:disconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
||||||
|
me.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(me.onCoAuthoringDisconnect,me));
|
||||||
me.api.asc_coAuthoringGetUsers();
|
me.api.asc_coAuthoringGetUsers();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -278,6 +278,7 @@ define([
|
||||||
old_rights = this._state.lostEditingRights;
|
old_rights = this._state.lostEditingRights;
|
||||||
this._state.lostEditingRights = !this._state.lostEditingRights;
|
this._state.lostEditingRights = !this._state.lostEditingRights;
|
||||||
this.api.asc_coAuthoringDisconnect();
|
this.api.asc_coAuthoringDisconnect();
|
||||||
|
Common.NotificationCenter.trigger('api:disconnect');
|
||||||
|
|
||||||
if (!old_rights) {
|
if (!old_rights) {
|
||||||
uiApp.alert(
|
uiApp.alert(
|
||||||
|
|
|
@ -79,6 +79,7 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onCanUndo', _.bind(this.onApiCanRevert, this, 'undo'));
|
this.api.asc_registerCallback('asc_onCanUndo', _.bind(this.onApiCanRevert, this, 'undo'));
|
||||||
this.api.asc_registerCallback('asc_onCanRedo', _.bind(this.onApiCanRevert, this, 'redo'));
|
this.api.asc_registerCallback('asc_onCanRedo', _.bind(this.onApiCanRevert, this, 'redo'));
|
||||||
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObject, this));
|
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObject, this));
|
||||||
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -176,6 +177,12 @@ define([
|
||||||
|
|
||||||
onCoAuthoringDisconnect: function() {
|
onCoAuthoringDisconnect: function() {
|
||||||
this.isDisconnected = true;
|
this.isDisconnected = true;
|
||||||
|
this.deactivateEditControls();
|
||||||
|
$('#toolbar-undo').toggleClass('disabled', true);
|
||||||
|
$('#toolbar-redo').toggleClass('disabled', true);
|
||||||
|
DE.getController('AddContainer').hideModal();
|
||||||
|
DE.getController('EditContainer').hideModal();
|
||||||
|
DE.getController('Settings').hideModal();
|
||||||
},
|
},
|
||||||
|
|
||||||
dlgLeaveTitleText : 'You leave the application',
|
dlgLeaveTitleText : 'You leave the application',
|
||||||
|
|
|
@ -82,6 +82,7 @@ define([
|
||||||
me.api.asc_registerCallback('asc_onHidePopMenu', _.bind(me.onApiHidePopMenu, me));
|
me.api.asc_registerCallback('asc_onHidePopMenu', _.bind(me.onApiHidePopMenu, me));
|
||||||
me.api.asc_registerCallback('asc_onDocumentContentReady', _.bind(me.onApiDocumentContentReady, me));
|
me.api.asc_registerCallback('asc_onDocumentContentReady', _.bind(me.onApiDocumentContentReady, me));
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
Common.NotificationCenter.on('api:disconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
||||||
|
me.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(me.onCoAuthoringDisconnect,me));
|
||||||
},
|
},
|
||||||
|
|
||||||
setMode: function (mode) {
|
setMode: function (mode) {
|
||||||
|
|
|
@ -79,6 +79,7 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onCanUndo', _.bind(this.onApiCanRevert, this, 'undo'));
|
this.api.asc_registerCallback('asc_onCanUndo', _.bind(this.onApiCanRevert, this, 'undo'));
|
||||||
this.api.asc_registerCallback('asc_onCanRedo', _.bind(this.onApiCanRevert, this, 'redo'));
|
this.api.asc_registerCallback('asc_onCanRedo', _.bind(this.onApiCanRevert, this, 'redo'));
|
||||||
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObject, this));
|
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObject, this));
|
||||||
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -187,6 +188,12 @@ define([
|
||||||
|
|
||||||
onCoAuthoringDisconnect: function() {
|
onCoAuthoringDisconnect: function() {
|
||||||
this.isDisconnected = true;
|
this.isDisconnected = true;
|
||||||
|
this.deactivateEditControls();
|
||||||
|
$('#toolbar-undo').toggleClass('disabled', true);
|
||||||
|
$('#toolbar-redo').toggleClass('disabled', true);
|
||||||
|
PE.getController('AddContainer').hideModal();
|
||||||
|
PE.getController('EditContainer').hideModal();
|
||||||
|
PE.getController('Settings').hideModal();
|
||||||
},
|
},
|
||||||
|
|
||||||
dlgLeaveTitleText : 'You leave the application',
|
dlgLeaveTitleText : 'You leave the application',
|
||||||
|
|
|
@ -84,8 +84,8 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onSelectionNameChanged', _.bind(this.onApiCellSelection, this));
|
this.api.asc_registerCallback('asc_onSelectionNameChanged', _.bind(this.onApiCellSelection, this));
|
||||||
this.api.asc_registerCallback('asc_onEditCell', _.bind(this.onApiEditCell, this));
|
this.api.asc_registerCallback('asc_onEditCell', _.bind(this.onApiEditCell, this));
|
||||||
this.api.asc_registerCallback('asc_onFormulaCompleteMenu', _.bind(this.onFormulaCompleteMenu, this));
|
this.api.asc_registerCallback('asc_onFormulaCompleteMenu', _.bind(this.onFormulaCompleteMenu, this));
|
||||||
// this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiDisconnect,this));
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiDisconnect,this));
|
||||||
// Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiDisconnect, this));
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiDisconnect, this));
|
||||||
// Common.NotificationCenter.on('cells:range', _.bind(this.onCellsRange, this));
|
// Common.NotificationCenter.on('cells:range', _.bind(this.onCellsRange, this));
|
||||||
// this.api.asc_registerCallback('asc_onInputKeyDown', _.bind(this.onInputKeyDown, this));
|
// this.api.asc_registerCallback('asc_onInputKeyDown', _.bind(this.onInputKeyDown, this));
|
||||||
|
|
||||||
|
@ -133,16 +133,7 @@ define([
|
||||||
|
|
||||||
onApiDisconnect: function() {
|
onApiDisconnect: function() {
|
||||||
this.mode.isEdit = false;
|
this.mode.isEdit = false;
|
||||||
|
$('#ce-function').addClass('disabled');
|
||||||
var controller = this.getApplication().getController('FormulaDialog');
|
|
||||||
if (controller) {
|
|
||||||
controller.hideDialog();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.mode.isEdit) {
|
|
||||||
$('#ce-func-label', this.editor.el).addClass('disabled');
|
|
||||||
this.editor.btnNamedRanges.setVisible(false);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onCellsRange: function(status) {
|
onCellsRange: function(status) {
|
||||||
|
|
|
@ -83,6 +83,7 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onShowPopMenu', _.bind(this.onApiShowPopMenu, this));
|
this.api.asc_registerCallback('asc_onShowPopMenu', _.bind(this.onApiShowPopMenu, this));
|
||||||
this.api.asc_registerCallback('asc_onHidePopMenu', _.bind(this.onApiHidePopMenu, this));
|
this.api.asc_registerCallback('asc_onHidePopMenu', _.bind(this.onApiHidePopMenu, this));
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect,this));
|
||||||
},
|
},
|
||||||
|
|
||||||
setMode: function (mode) {
|
setMode: function (mode) {
|
||||||
|
|
|
@ -279,6 +279,7 @@ define([
|
||||||
old_rights = this._state.lostEditingRights;
|
old_rights = this._state.lostEditingRights;
|
||||||
this._state.lostEditingRights = !this._state.lostEditingRights;
|
this._state.lostEditingRights = !this._state.lostEditingRights;
|
||||||
this.api.asc_coAuthoringDisconnect();
|
this.api.asc_coAuthoringDisconnect();
|
||||||
|
Common.NotificationCenter.trigger('api:disconnect');
|
||||||
|
|
||||||
if (!old_rights) {
|
if (!old_rights) {
|
||||||
uiApp.alert(
|
uiApp.alert(
|
||||||
|
|
|
@ -100,7 +100,7 @@ define([
|
||||||
setApi: function(api) {
|
setApi: function(api) {
|
||||||
this.api = api;
|
this.api = api;
|
||||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiDisconnect, this));
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiDisconnect, this));
|
||||||
// Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiDisconnect, this));
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiDisconnect, this));
|
||||||
// this.api.asc_registerCallback('asc_onUpdateTabColor', _.bind(this.onApiUpdateTabColor, this));
|
// this.api.asc_registerCallback('asc_onUpdateTabColor', _.bind(this.onApiUpdateTabColor, this));
|
||||||
// this.api.asc_registerCallback('asc_onEditCell', _.bind(this.onApiEditCell, this));
|
// this.api.asc_registerCallback('asc_onEditCell', _.bind(this.onApiEditCell, this));
|
||||||
this.api.asc_registerCallback('asc_onWorkbookLocked', _.bind(this.onWorkbookLocked, this));
|
this.api.asc_registerCallback('asc_onWorkbookLocked', _.bind(this.onWorkbookLocked, this));
|
||||||
|
|
|
@ -86,6 +86,7 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onWorkbookLocked', _.bind(this.onApiWorkbookLocked, this));
|
this.api.asc_registerCallback('asc_onWorkbookLocked', _.bind(this.onApiWorkbookLocked, this));
|
||||||
this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onApiWorksheetLocked, this));
|
this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onApiWorksheetLocked, this));
|
||||||
this.api.asc_registerCallback('asc_onActiveSheetChanged', _.bind(this.onApiActiveSheetChanged, this));
|
this.api.asc_registerCallback('asc_onActiveSheetChanged', _.bind(this.onApiActiveSheetChanged, this));
|
||||||
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
|
|
||||||
Common.NotificationCenter.on('sheet:active', this.onApiActiveSheetChanged.bind(this));
|
Common.NotificationCenter.on('sheet:active', this.onApiActiveSheetChanged.bind(this));
|
||||||
|
@ -210,6 +211,12 @@ define([
|
||||||
|
|
||||||
onCoAuthoringDisconnect: function() {
|
onCoAuthoringDisconnect: function() {
|
||||||
this.isDisconnected = true;
|
this.isDisconnected = true;
|
||||||
|
this.deactivateEditControls();
|
||||||
|
$('#toolbar-undo').toggleClass('disabled', true);
|
||||||
|
$('#toolbar-redo').toggleClass('disabled', true);
|
||||||
|
SSE.getController('AddContainer').hideModal();
|
||||||
|
SSE.getController('EditContainer').hideModal();
|
||||||
|
SSE.getController('Settings').hideModal();
|
||||||
},
|
},
|
||||||
|
|
||||||
dlgLeaveTitleText : 'You leave the application',
|
dlgLeaveTitleText : 'You leave the application',
|
||||||
|
|
Loading…
Reference in a new issue