commit
09f0ccd20e
|
@ -646,20 +646,24 @@ define([
|
||||||
warn = false;
|
warn = false;
|
||||||
if (plugins.plugins && plugins.plugins.length>0)
|
if (plugins.plugins && plugins.plugins.length>0)
|
||||||
arr = plugins.plugins;
|
arr = plugins.plugins;
|
||||||
|
if (plugins && plugins.config) {
|
||||||
var val = plugins.config.autostart || plugins.config.autoStartGuid;
|
var val = plugins.config.autostart || plugins.config.autoStartGuid;
|
||||||
if (typeof (val) == 'string')
|
if (typeof (val) == 'string')
|
||||||
val = [val];
|
val = [val];
|
||||||
warn = !!plugins.config.autoStartGuid;
|
warn = !!plugins.config.autoStartGuid;
|
||||||
autostart = val || [];
|
autostart = val || [];
|
||||||
|
}
|
||||||
|
|
||||||
plugins = this.serverPlugins;
|
plugins = this.serverPlugins;
|
||||||
if (plugins.plugins && plugins.plugins.length>0)
|
if (plugins.plugins && plugins.plugins.length>0)
|
||||||
arr = arr.concat(plugins.plugins);
|
arr = arr.concat(plugins.plugins);
|
||||||
|
if (plugins && plugins.config) {
|
||||||
val = plugins.config.autostart || plugins.config.autoStartGuid;
|
val = plugins.config.autostart || plugins.config.autoStartGuid;
|
||||||
if (typeof (val) == 'string')
|
if (typeof (val) == 'string')
|
||||||
val = [val];
|
val = [val];
|
||||||
(warn || plugins.config.autoStartGuid) && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration.");
|
(warn || plugins.config.autoStartGuid) && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration.");
|
||||||
autostart = autostart.concat(val || []);
|
autostart = autostart.concat(val || []);
|
||||||
|
}
|
||||||
|
|
||||||
this.autostart = autostart;
|
this.autostart = autostart;
|
||||||
this.parsePlugins(arr, false);
|
this.parsePlugins(arr, false);
|
||||||
|
|
|
@ -156,7 +156,7 @@ define([
|
||||||
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
|
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
|
||||||
});
|
});
|
||||||
|
|
||||||
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false};
|
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false, isDocModified: false};
|
||||||
this.languages = null;
|
this.languages = null;
|
||||||
|
|
||||||
// Initialize viewport
|
// Initialize viewport
|
||||||
|
@ -1798,7 +1798,7 @@ define([
|
||||||
if (window.document.title != title)
|
if (window.document.title != title)
|
||||||
window.document.title = title;
|
window.document.title = title;
|
||||||
|
|
||||||
Common.Gateway.setDocumentModified(isModified);
|
this._isDocReady && (this._state.isDocModified !== isModified) && Common.Gateway.setDocumentModified(isModified);
|
||||||
if (isModified && (!this._state.fastCoauth || this._state.usersCount<2))
|
if (isModified && (!this._state.fastCoauth || this._state.usersCount<2))
|
||||||
this.getApplication().getController('Statusbar').setStatusCaption('', true);
|
this.getApplication().getController('Statusbar').setStatusCaption('', true);
|
||||||
|
|
||||||
|
@ -1809,7 +1809,7 @@ define([
|
||||||
onDocumentModifiedChanged: function() {
|
onDocumentModifiedChanged: function() {
|
||||||
var isModified = this.api.asc_isDocumentCanSave();
|
var isModified = this.api.asc_isDocumentCanSave();
|
||||||
if (this._state.isDocModified !== isModified) {
|
if (this._state.isDocModified !== isModified) {
|
||||||
Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
this._isDocReady && Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateWindowTitle();
|
this.updateWindowTitle();
|
||||||
|
|
|
@ -80,7 +80,8 @@ define([
|
||||||
usersCount : 1,
|
usersCount : 1,
|
||||||
fastCoauth : true,
|
fastCoauth : true,
|
||||||
lostEditingRights : false,
|
lostEditingRights : false,
|
||||||
licenseType : false
|
licenseType : false,
|
||||||
|
isDocModified: false
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialize viewport
|
// Initialize viewport
|
||||||
|
@ -1144,7 +1145,7 @@ define([
|
||||||
if (window.document.title != title)
|
if (window.document.title != title)
|
||||||
window.document.title = title;
|
window.document.title = title;
|
||||||
|
|
||||||
Common.Gateway.setDocumentModified(isModified);
|
this._isDocReady && (this._state.isDocModified !== isModified) && Common.Gateway.setDocumentModified(isModified);
|
||||||
this._state.isDocModified = isModified;
|
this._state.isDocModified = isModified;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1152,7 +1153,7 @@ define([
|
||||||
onDocumentModifiedChanged: function() {
|
onDocumentModifiedChanged: function() {
|
||||||
var isModified = this.api.asc_isDocumentCanSave();
|
var isModified = this.api.asc_isDocumentCanSave();
|
||||||
if (this._state.isDocModified !== isModified) {
|
if (this._state.isDocModified !== isModified) {
|
||||||
Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
this._isDocReady && Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateWindowTitle();
|
this.updateWindowTitle();
|
||||||
|
|
|
@ -134,7 +134,7 @@ define([
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false};
|
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false, isDocModified: false};
|
||||||
this.languages = null;
|
this.languages = null;
|
||||||
|
|
||||||
window.storagename = 'presentation';
|
window.storagename = 'presentation';
|
||||||
|
@ -1469,7 +1469,7 @@ define([
|
||||||
if ( window.document.title != title )
|
if ( window.document.title != title )
|
||||||
window.document.title = title;
|
window.document.title = title;
|
||||||
|
|
||||||
Common.Gateway.setDocumentModified(isModified);
|
this._isDocReady && (this._state.isDocModified !== isModified) && Common.Gateway.setDocumentModified(isModified);
|
||||||
if (isModified && (!this._state.fastCoauth || this._state.usersCount<2))
|
if (isModified && (!this._state.fastCoauth || this._state.usersCount<2))
|
||||||
this.getApplication().getController('Statusbar').setStatusCaption('', true);
|
this.getApplication().getController('Statusbar').setStatusCaption('', true);
|
||||||
|
|
||||||
|
@ -1483,7 +1483,7 @@ define([
|
||||||
onDocumentModifiedChanged: function() {
|
onDocumentModifiedChanged: function() {
|
||||||
var isModified = this.api.asc_isDocumentCanSave();
|
var isModified = this.api.asc_isDocumentCanSave();
|
||||||
if (this._state.isDocModified !== isModified) {
|
if (this._state.isDocModified !== isModified) {
|
||||||
Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
this._isDocReady && Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateWindowTitle();
|
this.updateWindowTitle();
|
||||||
|
|
|
@ -80,7 +80,8 @@ define([
|
||||||
usersCount : 1,
|
usersCount : 1,
|
||||||
fastCoauth : true,
|
fastCoauth : true,
|
||||||
lostEditingRights : false,
|
lostEditingRights : false,
|
||||||
licenseType : false
|
licenseType : false,
|
||||||
|
isDocModified: false
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialize viewport
|
// Initialize viewport
|
||||||
|
@ -1063,7 +1064,7 @@ define([
|
||||||
if (window.document.title != title)
|
if (window.document.title != title)
|
||||||
window.document.title = title;
|
window.document.title = title;
|
||||||
|
|
||||||
Common.Gateway.setDocumentModified(isModified);
|
this._isDocReady && (this._state.isDocModified !== isModified) && Common.Gateway.setDocumentModified(isModified);
|
||||||
this._state.isDocModified = isModified;
|
this._state.isDocModified = isModified;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1071,7 +1072,7 @@ define([
|
||||||
onDocumentModifiedChanged: function() {
|
onDocumentModifiedChanged: function() {
|
||||||
var isModified = this.api.asc_isDocumentCanSave();
|
var isModified = this.api.asc_isDocumentCanSave();
|
||||||
if (this._state.isDocModified !== isModified) {
|
if (this._state.isDocModified !== isModified) {
|
||||||
Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
this._isDocReady && Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateWindowTitle();
|
this.updateWindowTitle();
|
||||||
|
|
|
@ -161,7 +161,7 @@ define([
|
||||||
// $(document.body).css('position', 'absolute');
|
// $(document.body).css('position', 'absolute');
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false};
|
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false, isDocModified: false};
|
||||||
|
|
||||||
if (!Common.Utils.isBrowserSupported()){
|
if (!Common.Utils.isBrowserSupported()){
|
||||||
Common.Utils.showBrowserRestriction();
|
Common.Utils.showBrowserRestriction();
|
||||||
|
@ -1739,7 +1739,7 @@ define([
|
||||||
window.document.title = title;
|
window.document.title = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common.Gateway.setDocumentModified(change);
|
this._isDocReady && (this._state.isDocModified !== change) && Common.Gateway.setDocumentModified(change);
|
||||||
|
|
||||||
this._state.isDocModified = change;
|
this._state.isDocModified = change;
|
||||||
}
|
}
|
||||||
|
@ -1750,7 +1750,9 @@ define([
|
||||||
|
|
||||||
onDocumentModifiedChanged: function(change) {
|
onDocumentModifiedChanged: function(change) {
|
||||||
this.updateWindowTitle(change);
|
this.updateWindowTitle(change);
|
||||||
Common.Gateway.setDocumentModified(change);
|
if (this._state.isDocModified !== change) {
|
||||||
|
this._isDocReady && Common.Gateway.setDocumentModified(change);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.toolbarView && this.toolbarView.btnCollabChanges && this.api) {
|
if (this.toolbarView && this.toolbarView.btnCollabChanges && this.api) {
|
||||||
var isSyncButton = this.toolbarView.btnCollabChanges.cmpEl.hasClass('notify'),
|
var isSyncButton = this.toolbarView.btnCollabChanges.cmpEl.hasClass('notify'),
|
||||||
|
|
|
@ -81,7 +81,8 @@ define([
|
||||||
usersCount : 1,
|
usersCount : 1,
|
||||||
fastCoauth : true,
|
fastCoauth : true,
|
||||||
lostEditingRights : false,
|
lostEditingRights : false,
|
||||||
licenseType : false
|
licenseType : false,
|
||||||
|
isDocModified: false
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialize viewport
|
// Initialize viewport
|
||||||
|
@ -1209,7 +1210,7 @@ define([
|
||||||
if (window.document.title != title)
|
if (window.document.title != title)
|
||||||
window.document.title = title;
|
window.document.title = title;
|
||||||
|
|
||||||
Common.Gateway.setDocumentModified(isModified);
|
this._isDocReady && (this._state.isDocModified !== isModified) && Common.Gateway.setDocumentModified(isModified);
|
||||||
this._state.isDocModified = isModified;
|
this._state.isDocModified = isModified;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1217,7 +1218,7 @@ define([
|
||||||
onDocumentModifiedChanged: function() {
|
onDocumentModifiedChanged: function() {
|
||||||
var isModified = this.api.asc_isDocumentCanSave();
|
var isModified = this.api.asc_isDocumentCanSave();
|
||||||
if (this._state.isDocModified !== isModified) {
|
if (this._state.isDocModified !== isModified) {
|
||||||
Common.Gateway.setDocumentModified(this.api.asc_isDocumentModified());
|
this._isDocReady && Common.Gateway.setDocumentModified(this.api.asc_isDocumentModified());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateWindowTitle();
|
this.updateWindowTitle();
|
||||||
|
|
Loading…
Reference in a new issue