commit
f63e61528c
|
@ -214,40 +214,7 @@ const PluginsController = inject('storeAppOptions')(observer(props => {
|
||||||
|
|
||||||
plugins.forEach(item => {
|
plugins.forEach(item => {
|
||||||
let plugin = new Asc.CPlugin();
|
let plugin = new Asc.CPlugin();
|
||||||
|
plugin.deserialize(item);
|
||||||
plugin.set_Name(item['name']);
|
|
||||||
plugin.set_Guid(item['guid']);
|
|
||||||
plugin.set_BaseUrl(item['baseUrl']);
|
|
||||||
plugin.set_MinVersion && plugin.set_MinVersion(item['minVersion']);
|
|
||||||
|
|
||||||
let variations = item['variations'],
|
|
||||||
variationsArr = [];
|
|
||||||
|
|
||||||
variations.forEach(itemVar => {
|
|
||||||
let variation = new Asc.CPluginVariation();
|
|
||||||
|
|
||||||
variation.set_Description(itemVar['description']);
|
|
||||||
variation.set_Url(itemVar['url']);
|
|
||||||
variation.set_Icons(itemVar['icons']);
|
|
||||||
variation.set_Visual(itemVar['isVisual']);
|
|
||||||
variation.set_CustomWindow(itemVar['isCustomWindow']);
|
|
||||||
variation.set_System(itemVar['isSystem']);
|
|
||||||
variation.set_Viewer(itemVar['isViewer']);
|
|
||||||
variation.set_EditorsSupport(itemVar['EditorsSupport']);
|
|
||||||
variation.set_Modal(itemVar['isModal']);
|
|
||||||
variation.set_InsideMode(itemVar['isInsideMode']);
|
|
||||||
variation.set_InitDataType(itemVar['initDataType']);
|
|
||||||
variation.set_InitData(itemVar['initData']);
|
|
||||||
variation.set_UpdateOleOnResize(itemVar['isUpdateOleOnResize']);
|
|
||||||
variation.set_Buttons(itemVar['buttons']);
|
|
||||||
variation.set_Size(itemVar['size']);
|
|
||||||
variation.set_InitOnSelectionChanged(itemVar['initOnSelectionChanged']);
|
|
||||||
variation.set_Events(itemVar['events']);
|
|
||||||
|
|
||||||
variationsArr.push(variation);
|
|
||||||
});
|
|
||||||
|
|
||||||
plugin["set_Variations"](variationsArr);
|
|
||||||
arr.push(plugin);
|
arr.push(plugin);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -131,8 +131,8 @@ define([
|
||||||
this.rightmenu.fireEvent('editcomplete', this.rightmenu);
|
this.rightmenu.fireEvent('editcomplete', this.rightmenu);
|
||||||
},
|
},
|
||||||
|
|
||||||
onFocusObject: function(SelectedObjects) {
|
onFocusObject: function(SelectedObjects, forceSignature) {
|
||||||
if (!this.editMode)
|
if (!this.editMode && !forceSignature)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var open = this._initSettings ? !Common.localStorage.getBool("de-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false;
|
var open = this._initSettings ? !Common.localStorage.getBool("de-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false;
|
||||||
|
@ -269,6 +269,7 @@ define([
|
||||||
if (priorityactive>-1) active = priorityactive;
|
if (priorityactive>-1) active = priorityactive;
|
||||||
else if (lastactive>=0 && currentactive<0) active = lastactive;
|
else if (lastactive>=0 && currentactive<0) active = lastactive;
|
||||||
else if (currentactive>=0) active = currentactive;
|
else if (currentactive>=0) active = currentactive;
|
||||||
|
else if (forceSignature && !this._settings[Common.Utils.documentSettingsType.Signature].hidden) active = Common.Utils.documentSettingsType.Signature;
|
||||||
else if (!this._settings[Common.Utils.documentSettingsType.MailMerge].hidden) active = Common.Utils.documentSettingsType.MailMerge;
|
else if (!this._settings[Common.Utils.documentSettingsType.MailMerge].hidden) active = Common.Utils.documentSettingsType.MailMerge;
|
||||||
|
|
||||||
if (active == undefined && open && lastactive>=0)
|
if (active == undefined && open && lastactive>=0)
|
||||||
|
@ -423,8 +424,9 @@ define([
|
||||||
}
|
}
|
||||||
this.rightmenu.chartSettings.disableControls(disabled);
|
this.rightmenu.chartSettings.disableControls(disabled);
|
||||||
|
|
||||||
if (!allowSignature && this.rightmenu.signatureSettings) {
|
if (this.rightmenu.signatureSettings) {
|
||||||
this.rightmenu.btnSignature.setDisabled(disabled);
|
!allowSignature && this.rightmenu.btnSignature.setDisabled(disabled);
|
||||||
|
allowSignature && disabled && this.onFocusObject([], true); // force press signature button
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
|
|
|
@ -1627,6 +1627,8 @@ define([
|
||||||
|
|
||||||
insertImage: function(data) { // gateway
|
insertImage: function(data) { // gateway
|
||||||
if (data && (data.url || data.images)) {
|
if (data && (data.url || data.images)) {
|
||||||
|
data.url && console.log("Obsolete: The 'url' parameter of the 'insertImage' method is deprecated. Please use 'images' parameter instead.");
|
||||||
|
|
||||||
var arr = [];
|
var arr = [];
|
||||||
if (data.images && data.images.length>0) {
|
if (data.images && data.images.length>0) {
|
||||||
for (var i=0; i<data.images.length; i++) {
|
for (var i=0; i<data.images.length; i++) {
|
||||||
|
|
|
@ -400,7 +400,7 @@ define([
|
||||||
allowMerge: false,
|
allowMerge: false,
|
||||||
allowSignature: true,
|
allowSignature: true,
|
||||||
allowProtect: true,
|
allowProtect: true,
|
||||||
rightMenu: {clear: disable && (DE.getController('RightMenu').rightmenu.GetActivePane() !== 'id-signature-settings'), disable: true},
|
rightMenu: {clear: false, disable: true},
|
||||||
statusBar: true,
|
statusBar: true,
|
||||||
leftMenu: {disable: false, previewMode: true},
|
leftMenu: {disable: false, previewMode: true},
|
||||||
fileMenu: false,
|
fileMenu: false,
|
||||||
|
|
|
@ -106,8 +106,8 @@ define([
|
||||||
this.rightmenu.fireEvent('editcomplete', this.rightmenu);
|
this.rightmenu.fireEvent('editcomplete', this.rightmenu);
|
||||||
},
|
},
|
||||||
|
|
||||||
onFocusObject: function(SelectedObjects) {
|
onFocusObject: function(SelectedObjects, forceSignature) {
|
||||||
if (!this.editMode)
|
if (!this.editMode && !forceSignature)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var open = this._initSettings ? !Common.localStorage.getBool("pe-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false;
|
var open = this._initSettings ? !Common.localStorage.getBool("pe-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false;
|
||||||
|
@ -194,6 +194,7 @@ define([
|
||||||
if (priorityactive>-1) active = priorityactive;
|
if (priorityactive>-1) active = priorityactive;
|
||||||
else if (currentactive>=0) active = currentactive;
|
else if (currentactive>=0) active = currentactive;
|
||||||
else if (lastactive>=0) active = lastactive;
|
else if (lastactive>=0) active = lastactive;
|
||||||
|
else if (forceSignature && !this._settings[Common.Utils.documentSettingsType.Signature].hidden) active = Common.Utils.documentSettingsType.Signature;
|
||||||
else active = Common.Utils.documentSettingsType.Slide;
|
else active = Common.Utils.documentSettingsType.Slide;
|
||||||
|
|
||||||
if (active !== undefined) {
|
if (active !== undefined) {
|
||||||
|
@ -226,8 +227,9 @@ define([
|
||||||
this.rightmenu.imageSettings.disableControls(disabled);
|
this.rightmenu.imageSettings.disableControls(disabled);
|
||||||
this.rightmenu.chartSettings.disableControls(disabled);
|
this.rightmenu.chartSettings.disableControls(disabled);
|
||||||
|
|
||||||
if (!allowSignature && this.rightmenu.signatureSettings) {
|
if (this.rightmenu.signatureSettings) {
|
||||||
this.rightmenu.btnSignature.setDisabled(disabled);
|
!allowSignature && this.rightmenu.btnSignature.setDisabled(disabled);
|
||||||
|
allowSignature && disabled && this.onFocusObject([], true); // force press signature button
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
|
|
|
@ -1627,6 +1627,8 @@ define([
|
||||||
|
|
||||||
insertImage: function(data) { // gateway
|
insertImage: function(data) { // gateway
|
||||||
if (data && (data.url || data.images)) {
|
if (data && (data.url || data.images)) {
|
||||||
|
data.url && console.log("Obsolete: The 'url' parameter of the 'insertImage' method is deprecated. Please use 'images' parameter instead.");
|
||||||
|
|
||||||
var arr = [];
|
var arr = [];
|
||||||
if (data.images && data.images.length>0) {
|
if (data.images && data.images.length>0) {
|
||||||
for (var i=0; i<data.images.length; i++) {
|
for (var i=0; i<data.images.length; i++) {
|
||||||
|
|
|
@ -350,7 +350,7 @@ define([
|
||||||
Common.NotificationCenter.trigger('editing:disable', disable, {
|
Common.NotificationCenter.trigger('editing:disable', disable, {
|
||||||
viewMode: disable,
|
viewMode: disable,
|
||||||
allowSignature: true,
|
allowSignature: true,
|
||||||
rightMenu: {clear: disable && (PE.getController('RightMenu').rightmenu.GetActivePane() !== 'id-signature-settings'), disable: true},
|
rightMenu: {clear: false, disable: true},
|
||||||
statusBar: true,
|
statusBar: true,
|
||||||
leftMenu: {disable: false, previewMode: true},
|
leftMenu: {disable: false, previewMode: true},
|
||||||
fileMenu: false,
|
fileMenu: false,
|
||||||
|
|
|
@ -168,14 +168,14 @@ define([
|
||||||
this.onFocusObject(SelectedObjects, cellInfo, formatTableInfo, sparkLineInfo, pivotInfo);
|
this.onFocusObject(SelectedObjects, cellInfo, formatTableInfo, sparkLineInfo, pivotInfo);
|
||||||
},
|
},
|
||||||
|
|
||||||
onFocusObject: function(SelectedObjects, cellInfo, formatTableInfo, sparkLineInfo, pivotInfo) {
|
onFocusObject: function(SelectedObjects, cellInfo, formatTableInfo, sparkLineInfo, pivotInfo, forceSignature) {
|
||||||
if (!this.editMode)
|
if (!this.editMode && !forceSignature)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var isCellLocked = cellInfo.asc_getLocked() || this._state.wsProps['FormatCells'],
|
var isCellLocked = cellInfo && cellInfo.asc_getLocked() || this._state.wsProps['FormatCells'],
|
||||||
isTableLocked = (cellInfo.asc_getLockedTable()===true || !this.rightmenu.mode.canModifyFilter) || this._state.wsProps['FormatCells'],
|
isTableLocked = (cellInfo && cellInfo.asc_getLockedTable()===true || !this.rightmenu.mode.canModifyFilter) || this._state.wsProps['FormatCells'],
|
||||||
isSparkLocked = (cellInfo.asc_getLockedSparkline()===true) || this._state.wsLock,
|
isSparkLocked = (cellInfo && cellInfo.asc_getLockedSparkline()===true) || this._state.wsLock,
|
||||||
isPivotLocked = (cellInfo.asc_getLockedPivotTable()===true) || this._state.wsProps['PivotTables'];
|
isPivotLocked = (cellInfo && cellInfo.asc_getLockedPivotTable()===true) || this._state.wsProps['PivotTables'];
|
||||||
|
|
||||||
for (var i=0; i<this._settings.length; ++i) {
|
for (var i=0; i<this._settings.length; ++i) {
|
||||||
if (i==Common.Utils.documentSettingsType.Signature) continue;
|
if (i==Common.Utils.documentSettingsType.Signature) continue;
|
||||||
|
@ -241,7 +241,7 @@ define([
|
||||||
this._settings[settingsType].hidden = 0;
|
this._settings[settingsType].hidden = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SelectedObjects.length<=0) { // cell is selected
|
if (SelectedObjects.length<=0 && cellInfo) { // cell is selected
|
||||||
settingsType = Common.Utils.documentSettingsType.Cell;
|
settingsType = Common.Utils.documentSettingsType.Cell;
|
||||||
this._settings[settingsType].props = cellInfo;
|
this._settings[settingsType].props = cellInfo;
|
||||||
this._settings[settingsType].locked = isCellLocked;
|
this._settings[settingsType].locked = isCellLocked;
|
||||||
|
@ -296,6 +296,7 @@ define([
|
||||||
if (priorityactive>-1) active = priorityactive;
|
if (priorityactive>-1) active = priorityactive;
|
||||||
else if (lastactive>=0 && currentactive<0) active = lastactive;
|
else if (lastactive>=0 && currentactive<0) active = lastactive;
|
||||||
else if (currentactive>=0) active = currentactive;
|
else if (currentactive>=0) active = currentactive;
|
||||||
|
else if (forceSignature && !this._settings[Common.Utils.documentSettingsType.Signature].hidden) active = Common.Utils.documentSettingsType.Signature;
|
||||||
|
|
||||||
if (active == undefined && this._openRightMenu && lastactive>=0)
|
if (active == undefined && this._openRightMenu && lastactive>=0)
|
||||||
active = lastactive;
|
active = lastactive;
|
||||||
|
@ -425,12 +426,9 @@ define([
|
||||||
this.rightmenu.cellSettings.disableControls(disabled);
|
this.rightmenu.cellSettings.disableControls(disabled);
|
||||||
this.rightmenu.slicerSettings.disableControls(disabled);
|
this.rightmenu.slicerSettings.disableControls(disabled);
|
||||||
|
|
||||||
if (!allowSignature && this.rightmenu.signatureSettings) {
|
if (this.rightmenu.signatureSettings) {
|
||||||
this.rightmenu.btnSignature.setDisabled(disabled);
|
!allowSignature && this.rightmenu.btnSignature.setDisabled(disabled);
|
||||||
}
|
allowSignature && disabled && this.onFocusObject([], undefined, undefined, undefined, undefined, true); // force press signature button
|
||||||
|
|
||||||
if (!allowSignature && this.rightmenu.signatureSettings) {
|
|
||||||
this.rightmenu.btnSignature.setDisabled(disabled);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
|
|
|
@ -908,6 +908,8 @@ define([
|
||||||
|
|
||||||
insertImage: function(data) { // gateway
|
insertImage: function(data) { // gateway
|
||||||
if (data && (data.url || data.images)) {
|
if (data && (data.url || data.images)) {
|
||||||
|
data.url && console.log("Obsolete: The 'url' parameter of the 'insertImage' method is deprecated. Please use 'images' parameter instead.");
|
||||||
|
|
||||||
var arr = [];
|
var arr = [];
|
||||||
if (data.images && data.images.length>0) {
|
if (data.images && data.images.length>0) {
|
||||||
for (var i=0; i<data.images.length; i++) {
|
for (var i=0; i<data.images.length; i++) {
|
||||||
|
|
|
@ -76,7 +76,6 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
|
||||||
Common.NotificationCenter.on('protect:sheet', _.bind(this.onSheetClick, this));
|
Common.NotificationCenter.on('protect:sheet', _.bind(this.onSheetClick, this));
|
||||||
},
|
},
|
||||||
setConfig: function (data, api) {
|
setConfig: function (data, api) {
|
||||||
|
@ -93,7 +92,6 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onChangeProtectWorksheet',_.bind(this.onChangeProtectSheet, this));
|
this.api.asc_registerCallback('asc_onChangeProtectWorksheet',_.bind(this.onChangeProtectSheet, this));
|
||||||
this.api.asc_registerCallback('asc_onActiveSheetChanged', _.bind(this.onActiveSheetChanged, this));
|
this.api.asc_registerCallback('asc_onActiveSheetChanged', _.bind(this.onActiveSheetChanged, this));
|
||||||
this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onApiSelectionChanged, this));
|
this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onApiSelectionChanged, this));
|
||||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -352,10 +350,6 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
onCoAuthoringDisconnect: function() {
|
|
||||||
this.SetDisabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, SSE.Controllers.WBProtection || {}));
|
}, SSE.Controllers.WBProtection || {}));
|
||||||
|
|
|
@ -397,7 +397,7 @@ define([
|
||||||
viewMode: disable,
|
viewMode: disable,
|
||||||
allowSignature: true,
|
allowSignature: true,
|
||||||
allowProtect: true,
|
allowProtect: true,
|
||||||
rightMenu: {clear: disable && (SSE.getController('RightMenu').rightmenu.GetActivePane() !== 'id-signature-settings'), disable: true},
|
rightMenu: {clear: false, disable: true},
|
||||||
statusBar: true,
|
statusBar: true,
|
||||||
leftMenu: {disable: false, previewMode: true},
|
leftMenu: {disable: false, previewMode: true},
|
||||||
fileMenu: false,
|
fileMenu: false,
|
||||||
|
|
Loading…
Reference in a new issue