Merge branch 'develop' into feature/sse-slicer
This commit is contained in:
commit
69042abd2b
|
@ -134,7 +134,10 @@
|
|||
spellcheck: true,
|
||||
compatibleFeatures: false,
|
||||
unit: 'cm' // cm, pt, inch,
|
||||
mentionShare : true // customize tooltip for mention
|
||||
mentionShare : true // customize tooltip for mention,
|
||||
macros: true // can run macros in document
|
||||
plugins: true // can run plugins in document
|
||||
macrosMode: 'warn' // warn about automatic macros, 'enable', 'disable', 'warn'
|
||||
},
|
||||
plugins: {
|
||||
autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'],
|
||||
|
|
|
@ -225,7 +225,7 @@ define([
|
|||
}
|
||||
}
|
||||
}
|
||||
!tab.disabled && Common.NotificationCenter.trigger('edit:complete', this.bar);
|
||||
!tab.disabled && Common.NotificationCenter.trigger('edit:complete', 'tab');
|
||||
}, this),
|
||||
dblclick: $.proxy(function() {
|
||||
this.trigger('tab:dblclick', this, this.tabs.indexOf(tab), tab);
|
||||
|
|
|
@ -136,7 +136,8 @@
|
|||
var Common = {};
|
||||
|
||||
define([
|
||||
'common/main/lib/component/BaseView'
|
||||
'common/main/lib/component/BaseView',
|
||||
'common/main/lib/component/CheckBox'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
|
|
|
@ -151,6 +151,7 @@ define([
|
|||
setApi: function(api) {
|
||||
this.api = api;
|
||||
|
||||
if (!this.appOptions.customization || (this.appOptions.customization.plugins!==false)) {
|
||||
this.api.asc_registerCallback("asc_onPluginShow", _.bind(this.onPluginShow, this));
|
||||
this.api.asc_registerCallback("asc_onPluginClose", _.bind(this.onPluginClose, this));
|
||||
this.api.asc_registerCallback("asc_onPluginResize", _.bind(this.onPluginResize, this));
|
||||
|
@ -160,6 +161,7 @@ define([
|
|||
this.api.asc_registerCallback('asc_onPluginsInit', _.bind(this.onPluginsInit, this));
|
||||
|
||||
this.loadPlugins();
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
|
|
|
@ -82,6 +82,7 @@ define([
|
|||
|
||||
setMode: function(mode) {
|
||||
this.appConfig = mode;
|
||||
if (!this.appConfig.customization || (this.appConfig.customization.plugins!==false))
|
||||
this.loadPlugins();
|
||||
},
|
||||
|
||||
|
|
|
@ -99,6 +99,12 @@ DE.ApplicationController = new(function(){
|
|||
docInfo.put_VKey(docConfig.vkey);
|
||||
docInfo.put_Token(docConfig.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_EncryptedInfo(config.encryptionKeys);
|
||||
|
||||
var enable = !config.customization || (config.customization.macros!==false);
|
||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||
enable = !config.customization || (config.customization.plugins!==false);
|
||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
||||
|
||||
var type = /^(?:(pdf|djvu|xps))$/.exec(docConfig.fileType);
|
||||
if (type && typeof type[1] === 'string') {
|
||||
|
@ -107,6 +113,7 @@ DE.ApplicationController = new(function(){
|
|||
|
||||
if (api) {
|
||||
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
||||
api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses);
|
||||
api.asc_setDocInfo(docInfo);
|
||||
api.asc_getEditorPermissions(config.licenseUrl, config.customerId);
|
||||
api.asc_enableKeyEvents(true);
|
||||
|
@ -481,6 +488,11 @@ DE.ApplicationController = new(function(){
|
|||
if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true));
|
||||
}
|
||||
|
||||
function onRunAutostartMacroses() {
|
||||
if (!config.customization || (config.customization.macros!==false))
|
||||
if (api) api.asc_runAutostartMacroses();
|
||||
}
|
||||
|
||||
// Helpers
|
||||
// -------------------------
|
||||
|
||||
|
|
|
@ -490,6 +490,10 @@ define([
|
|||
value = Common.localStorage.getBool("de-settings-spellcheck", true);
|
||||
Common.Utils.InternalSettings.set("de-settings-spellcheck", value);
|
||||
this.api.asc_setSpellCheck(value);
|
||||
|
||||
value = parseInt(Common.localStorage.getItem("de-settings-paste-button"));
|
||||
Common.Utils.InternalSettings.set("de-settings-paste-button", value);
|
||||
this.api.asc_setVisiblePasteButton(!!value);
|
||||
}
|
||||
|
||||
this.api.put_ShowSnapLines(Common.Utils.InternalSettings.get("de-settings-showsnaplines"));
|
||||
|
|
|
@ -384,6 +384,14 @@ define([
|
|||
$('#editor-container').append('<div class="doc-placeholder">' + '<div class="line"></div>'.repeat(20) + '</div>');
|
||||
}
|
||||
|
||||
var value = Common.localStorage.getItem("de-macros-mode");
|
||||
if (value === null) {
|
||||
value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn';
|
||||
value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0);
|
||||
} else
|
||||
value = parseInt(value);
|
||||
Common.Utils.InternalSettings.set("de-macros-mode", value);
|
||||
|
||||
Common.Controllers.Desktop.init(this.appOptions);
|
||||
},
|
||||
|
||||
|
@ -415,6 +423,11 @@ define([
|
|||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
|
||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
||||
// docInfo.put_Review(this.permissions.review);
|
||||
|
||||
var type = /^(?:(pdf|djvu|xps))$/.exec(data.doc.fileType);
|
||||
|
@ -425,6 +438,7 @@ define([
|
|||
|
||||
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
|
||||
this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this));
|
||||
this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this));
|
||||
this.api.asc_setDocInfo(docInfo);
|
||||
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
|
||||
|
||||
|
@ -1034,6 +1048,11 @@ define([
|
|||
me.api.asc_setIsForceSaveOnUserSave(me.appOptions.forcesave);
|
||||
}
|
||||
|
||||
value = Common.localStorage.getItem("de-settings-paste-button");
|
||||
if (value===null) value = '1';
|
||||
Common.Utils.InternalSettings.set("de-settings-paste-button", parseInt(value));
|
||||
me.api.asc_setVisiblePasteButton(!!parseInt(value));
|
||||
|
||||
if (me.needToUpdateVersion)
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
var timer_sl = setInterval(function(){
|
||||
|
@ -2236,6 +2255,36 @@ define([
|
|||
Common.Utils.warningDocumentIsLocked({disablefunc: _disable_ui});
|
||||
},
|
||||
|
||||
onRunAutostartMacroses: function() {
|
||||
var me = this,
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
if (enable) {
|
||||
var value = Common.Utils.InternalSettings.get("de-macros-mode");
|
||||
if (value==1)
|
||||
this.api.asc_runAutostartMacroses();
|
||||
else if (value === 0) {
|
||||
Common.UI.warning({
|
||||
msg: this.textHasMacros + '<br>',
|
||||
buttons: ['yes', 'no'],
|
||||
primary: 'yes',
|
||||
dontshow: true,
|
||||
textDontShow: this.textRemember,
|
||||
callback: function(btn, dontshow){
|
||||
if (dontshow) {
|
||||
Common.Utils.InternalSettings.set("de-macros-mode", (btn == 'yes') ? 1 : 2);
|
||||
Common.localStorage.setItem("de-macros-mode", (btn == 'yes') ? 1 : 2);
|
||||
}
|
||||
if (btn == 'yes') {
|
||||
setTimeout(function() {
|
||||
me.api.asc_runAutostartMacroses();
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||
criticalErrorTitle: 'Error',
|
||||
notcriticalErrorTitle: 'Warning',
|
||||
|
@ -2587,7 +2636,9 @@ define([
|
|||
textApplyAll: 'Apply to all equations',
|
||||
textLearnMore: 'Learn More',
|
||||
txtEnterDate: 'Enter a date.',
|
||||
txtTypeEquation: 'Type equation here.'
|
||||
txtTypeEquation: 'Type equation here.',
|
||||
textHasMacros: 'The file contains automatic macros.<br>Do you want to run macros?',
|
||||
textRemember: 'Remember my choice'
|
||||
}
|
||||
})(), DE.Controllers.Main || {}))
|
||||
});
|
|
@ -234,6 +234,16 @@ define([
|
|||
'<td class="left"><label><%= scope.strUnit %></label></td>',
|
||||
'<td class="right"><span id="fms-cmb-unit" /></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="edit">',
|
||||
'<td class="left"><label><%= scope.strPaste %></label></td>',
|
||||
'<td class="right"><div id="fms-chb-paste-settings"/></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="macros">',
|
||||
'<td class="left"><label><%= scope.strMacrosSettings %></label></td>',
|
||||
'<td class="right">',
|
||||
'<div><div id="fms-cmb-macros" style="display: inline-block; margin-right: 15px;vertical-align: middle;"/>',
|
||||
'<label id="fms-lbl-macros" style="vertical-align: middle;"><%= scope.txtWarnMacrosDesc %></label></div></td>',
|
||||
'</tr>','<tr class="divider macros"></tr>',
|
||||
'<tr>',
|
||||
'<td class="left"></td>',
|
||||
'<td class="right"><button id="fms-btn-apply" class="btn normal dlg-btn primary"><%= scope.okButtonText %></button></td>',
|
||||
|
@ -388,6 +398,26 @@ define([
|
|||
]
|
||||
});
|
||||
|
||||
this.cmbMacros = new Common.UI.ComboBox({
|
||||
el : $markup.findById('#fms-cmb-macros'),
|
||||
style : 'width: 160px;',
|
||||
editable : false,
|
||||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ value: 2, displayValue: this.txtStopMacros, descValue: this.txtStopMacrosDesc },
|
||||
{ value: 0, displayValue: this.txtWarnMacros, descValue: this.txtWarnMacrosDesc },
|
||||
{ value: 1, displayValue: this.txtRunMacros, descValue: this.txtRunMacrosDesc }
|
||||
]
|
||||
}).on('selected', function(combo, record) {
|
||||
me.lblMacrosDesc.text(record.descValue);
|
||||
});
|
||||
this.lblMacrosDesc = $markup.findById('#fms-lbl-macros');
|
||||
|
||||
this.chPaste = new Common.UI.CheckBox({
|
||||
el: $markup.findById('#fms-chb-paste-settings'),
|
||||
labelText: this.strPasteButton
|
||||
});
|
||||
|
||||
this.btnApply = new Common.UI.Button({
|
||||
el: $markup.findById('#fms-btn-apply')
|
||||
});
|
||||
|
@ -425,6 +455,8 @@ define([
|
|||
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide']();
|
||||
$('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide']();
|
||||
/** coauthoring end **/
|
||||
|
||||
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
|
||||
},
|
||||
|
||||
updateSettings: function() {
|
||||
|
@ -475,6 +507,12 @@ define([
|
|||
this.chSpell.setValue(Common.Utils.InternalSettings.get("de-settings-spellcheck"));
|
||||
this.chAlignGuides.setValue(Common.Utils.InternalSettings.get("de-settings-showsnaplines"));
|
||||
this.chCompatible.setValue(Common.Utils.InternalSettings.get("de-settings-compatible"));
|
||||
|
||||
item = this.cmbMacros.store.findWhere({value: Common.Utils.InternalSettings.get("de-macros-mode")});
|
||||
this.cmbMacros.setValue(item ? item.get('value') : 0);
|
||||
this.lblMacrosDesc.text(item ? item.get('descValue') : this.txtWarnMacrosDesc);
|
||||
|
||||
this.chPaste.setValue(Common.Utils.InternalSettings.get("de-settings-paste-button"));
|
||||
},
|
||||
|
||||
applySettings: function() {
|
||||
|
@ -501,6 +539,12 @@ define([
|
|||
Common.localStorage.setItem("de-settings-compatible", this.chCompatible.isChecked() ? 1 : 0);
|
||||
Common.Utils.InternalSettings.set("de-settings-compatible", this.chCompatible.isChecked() ? 1 : 0);
|
||||
Common.Utils.InternalSettings.set("de-settings-showsnaplines", this.chAlignGuides.isChecked());
|
||||
|
||||
Common.localStorage.setItem("de-macros-mode", this.cmbMacros.getValue());
|
||||
Common.Utils.InternalSettings.set("de-macros-mode", Common.localStorage.getItem("de-macros-mode"));
|
||||
|
||||
Common.localStorage.setItem("de-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
|
||||
|
||||
Common.localStorage.save();
|
||||
|
||||
if (this.menu) {
|
||||
|
@ -575,7 +619,16 @@ define([
|
|||
strResolvedComment: 'Turn on display of the resolved comments',
|
||||
textCompatible: 'Compatibility',
|
||||
textOldVersions: 'Make the files compatible with older MS Word versions when saved as DOCX',
|
||||
txtCacheMode: 'Default cache mode'
|
||||
txtCacheMode: 'Default cache mode',
|
||||
strMacrosSettings: 'Macros Settings',
|
||||
txtWarnMacros: 'Show Notification',
|
||||
txtRunMacros: 'Enable All',
|
||||
txtStopMacros: 'Disable All',
|
||||
txtWarnMacrosDesc: 'Disable all macros with notification',
|
||||
txtRunMacrosDesc: 'Enable all macros without notification',
|
||||
txtStopMacrosDesc: 'Disable all macros without notification',
|
||||
strPaste: 'Cut, copy and paste',
|
||||
strPasteButton: 'Show Paste Options button when content is pasted'
|
||||
}, DE.Views.FileMenuPanels.Settings || {}));
|
||||
|
||||
DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -750,6 +750,8 @@
|
|||
"DE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
|
||||
"DE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
|
||||
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
||||
"DE.Controllers.Main.textHasMacros": "The file contains automatic macros.<br>Do you want to run macros?",
|
||||
"DE.Controllers.Main.textRemember": "Remember my choice",
|
||||
"DE.Controllers.Navigation.txtBeginning": "Beginning of document",
|
||||
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
|
||||
"DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked",
|
||||
|
@ -1569,6 +1571,15 @@
|
|||
"DE.Views.FileMenuPanels.Settings.txtPt": "Point",
|
||||
"DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking",
|
||||
"DE.Views.FileMenuPanels.Settings.txtWin": "as Windows",
|
||||
"DE.Views.FileMenuPanels.Settings.strMacrosSettings": "Macros Settings",
|
||||
"DE.Views.FileMenuPanels.Settings.txtWarnMacros": "Show Notification",
|
||||
"DE.Views.FileMenuPanels.Settings.txtRunMacros": "Enable All",
|
||||
"DE.Views.FileMenuPanels.Settings.txtStopMacros": "Disable All",
|
||||
"DE.Views.FileMenuPanels.Settings.txtWarnMacrosDesc": "Disable all macros with notification",
|
||||
"DE.Views.FileMenuPanels.Settings.txtRunMacrosDesc": "Enable all macros without notification",
|
||||
"DE.Views.FileMenuPanels.Settings.txtStopMacrosDesc": "Disable all macros without notification",
|
||||
"DE.Views.FileMenuPanels.Settings.strPaste": "Cut, copy and paste",
|
||||
"DE.Views.FileMenuPanels.Settings.strPasteButton": "Show Paste Options button when content is pasted",
|
||||
"DE.Views.HeaderFooterSettings.textBottomCenter": "Bottom center",
|
||||
"DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom left",
|
||||
"DE.Views.HeaderFooterSettings.textBottomPage": "Bottom of Page",
|
||||
|
|
|
@ -224,6 +224,14 @@ define([
|
|||
if (!me.editorConfig.customization || !(me.editorConfig.customization.loaderName || me.editorConfig.customization.loaderLogo))
|
||||
$('#editor-container').append('<div class="doc-placeholder"><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div></div>');
|
||||
|
||||
var value = Common.localStorage.getItem("de-mobile-macros-mode");
|
||||
if (value === null) {
|
||||
value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn';
|
||||
value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0);
|
||||
} else
|
||||
value = parseInt(value);
|
||||
Common.Utils.InternalSettings.set("de-mobile-macros-mode", value);
|
||||
|
||||
// if (this.appOptions.location == 'us' || this.appOptions.location == 'ca')
|
||||
// Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch);
|
||||
},
|
||||
|
@ -255,6 +263,11 @@ define([
|
|||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
|
||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
||||
|
||||
var type = /^(?:(pdf|djvu|xps))$/.exec(data.doc.fileType);
|
||||
if (type && typeof type[1] === 'string') {
|
||||
this.permissions.edit = this.permissions.review = false;
|
||||
|
@ -263,6 +276,7 @@ define([
|
|||
|
||||
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
|
||||
this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this));
|
||||
this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this));
|
||||
this.api.asc_setDocInfo(docInfo);
|
||||
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
|
||||
|
||||
|
@ -1369,6 +1383,51 @@ define([
|
|||
return false;
|
||||
},
|
||||
|
||||
onRunAutostartMacroses: function() {
|
||||
var me = this,
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
if (enable) {
|
||||
var value = Common.Utils.InternalSettings.get("de-mobile-macros-mode");
|
||||
if (value==1)
|
||||
this.api.asc_runAutostartMacroses();
|
||||
else if (value === 0) {
|
||||
uiApp.modal({
|
||||
title: this.notcriticalErrorTitle,
|
||||
text: this.textHasMacros,
|
||||
afterText: '<label class="label-checkbox item-content no-ripple">' +
|
||||
'<input type="checkbox" name="checkbox-show-macros">' +
|
||||
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
|
||||
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + this.textRemember + '</span>' +
|
||||
'</div>' +
|
||||
'</label>',
|
||||
buttons: [{
|
||||
text: this.textYes,
|
||||
onClick: function () {
|
||||
var dontshow = $('input[name="checkbox-show-macros"]').prop('checked');
|
||||
if (dontshow) {
|
||||
Common.Utils.InternalSettings.set("de-mobile-macros-mode", 1);
|
||||
Common.localStorage.setItem("de-mobile-macros-mode", 1);
|
||||
}
|
||||
setTimeout(function() {
|
||||
me.api.asc_runAutostartMacroses();
|
||||
}, 1);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: this.textNo,
|
||||
onClick: function () {
|
||||
var dontshow = $('input[name="checkbox-show-macros"]').prop('checked');
|
||||
if (dontshow) {
|
||||
Common.Utils.InternalSettings.set("de-mobile-macros-mode", 2);
|
||||
Common.localStorage.setItem("de-mobile-macros-mode", 2);
|
||||
}
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||
criticalErrorTitle: 'Error',
|
||||
notcriticalErrorTitle: 'Warning',
|
||||
|
@ -1496,7 +1555,11 @@ define([
|
|||
waitText: 'Please, wait...',
|
||||
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.',
|
||||
errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.<br>Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.',
|
||||
errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.'
|
||||
errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.',
|
||||
textHasMacros: 'The file contains automatic macros.<br>Do you want to run macros?',
|
||||
textRemember: 'Remember my choice',
|
||||
textYes: 'Yes',
|
||||
textNo: 'No'
|
||||
}
|
||||
})(), DE.Controllers.Main || {}))
|
||||
});
|
|
@ -254,6 +254,9 @@ define([
|
|||
} else if ('#margins-view' == pageId) {
|
||||
me.initPageMargin();
|
||||
Common.Utils.addScrollIfNeed('.page[data-page=margin-view]', '.page[data-page=margin-view] .page-content');
|
||||
} else if ('#macros-settings-view' == pageId) {
|
||||
me.initPageMacrosSettings();
|
||||
Common.Utils.addScrollIfNeed('.page[data-page=macros-settings-view]', '.page[data-page=macros-settings-view] .page-content');
|
||||
} else {
|
||||
$('#settings-readermode input:checkbox').attr('checked', Common.SharedSettings.get('readerMode'));
|
||||
$('#settings-search').single('click', _.bind(me.onSearch, me));
|
||||
|
@ -273,6 +276,20 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
initPageMacrosSettings: function() {
|
||||
var me = this,
|
||||
$pageMacrosSettings = $('.page[data-page="macros-settings-view"] input:radio[name=macros-settings]'),
|
||||
value = Common.Utils.InternalSettings.get("de-mobile-macros-mode") || 0;
|
||||
$pageMacrosSettings.single('change', _.bind(me.onChangeMacrosSettings, me));
|
||||
$pageMacrosSettings.val([value]);
|
||||
},
|
||||
|
||||
onChangeMacrosSettings: function(e) {
|
||||
var value = parseInt($(e.currentTarget).val());
|
||||
Common.Utils.InternalSettings.set("de-mobile-macros-mode", value);
|
||||
Common.localStorage.setItem("de-mobile-macros-mode", value);
|
||||
},
|
||||
|
||||
onChangeDisplayComments: function(e) {
|
||||
var displayComments = $(e.currentTarget).is(':checked');
|
||||
if (!displayComments) {
|
||||
|
|
|
@ -770,6 +770,20 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="list-block display-view">
|
||||
<ul>
|
||||
<li>
|
||||
<a id="settings-macros" class="item-link item-content" data-page="#macros-settings-view">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title"><%= scope.textMacrosSettings %></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -873,3 +887,54 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Macros Settings view -->
|
||||
<div id="macros-settings-view">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
|
||||
<div class="center sliding"><%= scope.textMacrosSettings %></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pages">
|
||||
<div class="page page-macros-settings" data-page="macros-settings-view">
|
||||
<div class="page-content">
|
||||
<div class="list-block">
|
||||
<ul>
|
||||
<li class="media-item">
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="macros-settings" value="2">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textDisableAll %></div>
|
||||
<div class="item-subtitle"><%= scope.textDisableAllMacrosWithoutNotification %></div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
<li class="media-item">
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="macros-settings" value="0">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textShowNotification %></div>
|
||||
<div class="item-subtitle"><%= scope.textDisableAllMacrosWithNotification %></div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
<li class="media-item">
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="macros-settings" value="1">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textEnableAll %></div>
|
||||
<div class="item-subtitle"><%= scope.textEnableAllMacrosWithoutNotification %></div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -59,7 +59,8 @@ define([
|
|||
_canHelp = true,
|
||||
_canPrint = false,
|
||||
_canReview = false,
|
||||
_isReviewOnly = false;
|
||||
_isReviewOnly = false,
|
||||
_isShowMacros = true;
|
||||
|
||||
return {
|
||||
// el: '.view-main',
|
||||
|
@ -120,6 +121,7 @@ define([
|
|||
|
||||
if (mode.customization) {
|
||||
_canHelp = (mode.customization.help!==false);
|
||||
_isShowMacros = (mode.customization.macros!==false);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -149,6 +151,7 @@ define([
|
|||
if (!_canPrint) $layour.find('#settings-print').hide();
|
||||
if (!_canReview) $layour.find('#settings-review').hide();
|
||||
if (_isReviewOnly) $layour.find('#settings-review').addClass('disabled');
|
||||
if (!_isShowMacros) $layour.find('#settings-macros').hide();
|
||||
|
||||
return $layour.html();
|
||||
}
|
||||
|
@ -332,7 +335,14 @@ define([
|
|||
textUploaded: 'Uploaded',
|
||||
textLastModified: 'Last Modified',
|
||||
textLastModifiedBy: 'Last Modified By',
|
||||
textCreated: 'Created'
|
||||
textCreated: 'Created',
|
||||
textMacrosSettings: 'Macros Settings',
|
||||
textDisableAll: 'Disable All',
|
||||
textDisableAllMacrosWithoutNotification: 'Disable all macros without notification',
|
||||
textShowNotification: 'Show Notification',
|
||||
textDisableAllMacrosWithNotification: 'Disable all macros with notification',
|
||||
textEnableAll: 'Enable All',
|
||||
textEnableAllMacrosWithoutNotification: 'Enable all macros without notification'
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -282,6 +282,10 @@
|
|||
"DE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
|
||||
"DE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
|
||||
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
||||
"DE.Controllers.Main.textHasMacros": "The file contains automatic macros.<br>Do you want to run macros?",
|
||||
"DE.Controllers.Main.textRemember": "Remember my choice",
|
||||
"DE.Controllers.Main.textYes": "Yes",
|
||||
"DE.Controllers.Main.textNo": "No",
|
||||
"DE.Controllers.Search.textNoTextFound": "Text not Found",
|
||||
"DE.Controllers.Search.textReplaceAll": "Replace All",
|
||||
"DE.Controllers.Settings.notcriticalErrorTitle": "Warning",
|
||||
|
@ -570,5 +574,12 @@
|
|||
"DE.Views.Settings.textVersion": "Version",
|
||||
"DE.Views.Settings.textWords": "Words",
|
||||
"DE.Views.Settings.unknownText": "Unknown",
|
||||
"DE.Views.Settings.textMacrosSettings": "Macros Settings",
|
||||
"DE.Views.Settings.textDisableAll": "Disable All",
|
||||
"DE.Views.Settings.textDisableAllMacrosWithoutNotification": "Disable all macros without notification",
|
||||
"DE.Views.Settings.textShowNotification": "Show Notification",
|
||||
"DE.Views.Settings.textDisableAllMacrosWithNotification": "Disable all macros with notification",
|
||||
"DE.Views.Settings.textEnableAll": "Enable All",
|
||||
"DE.Views.Settings.textEnableAllMacrosWithoutNotification": "Enable all macros without notification",
|
||||
"DE.Views.Toolbar.textBack": "Back"
|
||||
}
|
|
@ -7785,3 +7785,10 @@ html.pixel-ratio-3 .numbers li {
|
|||
-o-animation: flickerAnimation 2s infinite ease-in-out;
|
||||
animation: flickerAnimation 2s infinite ease-in-out;
|
||||
}
|
||||
.page-macros-settings[data-page="macros-settings-view"] .list-block li.media-item .item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.page-macros-settings[data-page="macros-settings-view"] .list-block li.media-item .item-subtitle {
|
||||
font-size: 14px;
|
||||
color: #8e8e93;
|
||||
}
|
||||
|
|
|
@ -7646,3 +7646,10 @@ html.pixel-ratio-3 .numbers li {
|
|||
-o-animation: flickerAnimation 2s infinite ease-in-out;
|
||||
animation: flickerAnimation 2s infinite ease-in-out;
|
||||
}
|
||||
.page-macros-settings[data-page="macros-settings-view"] .list-block li.media-item .item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.page-macros-settings[data-page="macros-settings-view"] .list-block li.media-item .item-subtitle {
|
||||
font-size: 14px;
|
||||
color: #9e9e9e;
|
||||
}
|
||||
|
|
|
@ -276,3 +276,18 @@ input, textarea {
|
|||
animation: flickerAnimation 2s infinite ease-in-out;
|
||||
}
|
||||
}
|
||||
|
||||
// Macros settings
|
||||
.page-macros-settings[data-page="macros-settings-view"] {
|
||||
.list-block {
|
||||
li.media-item {
|
||||
.item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.item-subtitle {
|
||||
font-size: 14px;
|
||||
color: @gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -275,3 +275,18 @@ input, textarea {
|
|||
animation: flickerAnimation 2s infinite ease-in-out;
|
||||
}
|
||||
}
|
||||
|
||||
// Macros settings
|
||||
.page-macros-settings[data-page="macros-settings-view"] {
|
||||
.list-block {
|
||||
li.media-item {
|
||||
.item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.item-subtitle {
|
||||
font-size: 14px;
|
||||
color: @gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,9 +100,16 @@ PE.ApplicationController = new(function(){
|
|||
docInfo.put_VKey(docConfig.vkey);
|
||||
docInfo.put_Token(docConfig.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_EncryptedInfo(config.encryptionKeys);
|
||||
|
||||
var enable = !config.customization || (config.customization.macros!==false);
|
||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||
enable = !config.customization || (config.customization.plugins!==false);
|
||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
||||
|
||||
if (api) {
|
||||
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
||||
api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses);
|
||||
api.asc_setDocInfo(docInfo);
|
||||
api.asc_getEditorPermissions(config.licenseUrl, config.customerId);
|
||||
api.asc_enableKeyEvents(true);
|
||||
|
@ -580,6 +587,12 @@ PE.ApplicationController = new(function(){
|
|||
}
|
||||
if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PPTX, true));
|
||||
}
|
||||
|
||||
function onRunAutostartMacroses() {
|
||||
if (!config.customization || (config.customization.macros!==false))
|
||||
if (api) api.asc_runAutostartMacroses();
|
||||
}
|
||||
|
||||
// Helpers
|
||||
// -------------------------
|
||||
|
||||
|
|
|
@ -326,6 +326,10 @@ define([
|
|||
value = Common.localStorage.getBool("pe-settings-spellcheck", true);
|
||||
Common.Utils.InternalSettings.set("pe-settings-spellcheck", value);
|
||||
this.api.asc_setSpellCheck(value);
|
||||
|
||||
value = parseInt(Common.localStorage.getItem("pe-settings-paste-button"));
|
||||
Common.Utils.InternalSettings.set("pe-settings-paste-button", value);
|
||||
this.api.asc_setVisiblePasteButton(!!value);
|
||||
}
|
||||
|
||||
this.api.put_ShowSnapLines(Common.Utils.InternalSettings.get("pe-settings-showsnaplines"));
|
||||
|
|
|
@ -342,6 +342,14 @@ define([
|
|||
$('#editor-container').append('<div class="doc-placeholder"><div class="slide-h"><div class="slide-v"><div class="slide-container"><div class="line"></div><div class="line empty"></div><div class="line"></div></div></div></div></div>');
|
||||
}
|
||||
|
||||
var value = Common.localStorage.getItem("pe-macros-mode");
|
||||
if (value === null) {
|
||||
value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn';
|
||||
value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0);
|
||||
} else
|
||||
value = parseInt(value);
|
||||
Common.Utils.InternalSettings.set("pe-macros-mode", value);
|
||||
|
||||
Common.Controllers.Desktop.init(this.appOptions);
|
||||
},
|
||||
|
||||
|
@ -373,10 +381,16 @@ define([
|
|||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
|
||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
||||
}
|
||||
|
||||
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
|
||||
this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this));
|
||||
this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this));
|
||||
this.api.asc_setDocInfo(docInfo);
|
||||
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
|
||||
|
||||
|
@ -760,6 +774,11 @@ define([
|
|||
me.api.asc_setIsForceSaveOnUserSave(me.appOptions.forcesave);
|
||||
}
|
||||
|
||||
value = Common.localStorage.getItem("pe-settings-paste-button");
|
||||
if (value===null) value = '1';
|
||||
Common.Utils.InternalSettings.set("pe-settings-paste-button", parseInt(value));
|
||||
me.api.asc_setVisiblePasteButton(!!parseInt(value));
|
||||
|
||||
if (me.needToUpdateVersion)
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
var timer_sl = setInterval(function(){
|
||||
|
@ -1883,6 +1902,36 @@ define([
|
|||
}});
|
||||
},
|
||||
|
||||
onRunAutostartMacroses: function() {
|
||||
var me = this,
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
if (enable) {
|
||||
var value = Common.Utils.InternalSettings.get("pe-macros-mode");
|
||||
if (value==1)
|
||||
this.api.asc_runAutostartMacroses();
|
||||
else if (value === 0) {
|
||||
Common.UI.warning({
|
||||
msg: this.textHasMacros + '<br>',
|
||||
buttons: ['yes', 'no'],
|
||||
primary: 'yes',
|
||||
dontshow: true,
|
||||
textDontShow: this.textRemember,
|
||||
callback: function(btn, dontshow){
|
||||
if (dontshow) {
|
||||
Common.Utils.InternalSettings.set("pe-macros-mode", (btn == 'yes') ? 1 : 2);
|
||||
Common.localStorage.setItem("pe-macros-mode", (btn == 'yes') ? 1 : 2);
|
||||
}
|
||||
if (btn == 'yes') {
|
||||
setTimeout(function() {
|
||||
me.api.asc_runAutostartMacroses();
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Translation
|
||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||
criticalErrorTitle: 'Error',
|
||||
|
@ -2234,7 +2283,9 @@ define([
|
|||
textCustomLoader: 'Please note that according to the terms of the license you are not entitled to change the loader.<br>Please contact our Sales Department to get a quote.',
|
||||
waitText: 'Please, wait...',
|
||||
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.',
|
||||
errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.<br>Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.'
|
||||
errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.<br>Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.',
|
||||
textHasMacros: 'The file contains automatic macros.<br>Do you want to run macros?',
|
||||
textRemember: 'Remember my choice'
|
||||
}
|
||||
})(), PE.Controllers.Main || {}))
|
||||
});
|
||||
|
|
|
@ -208,6 +208,16 @@ define([
|
|||
'<td class="left"><label><%= scope.strUnit %></label></td>',
|
||||
'<td class="right"><span id="fms-cmb-unit" /></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="edit">',
|
||||
'<td class="left"><label><%= scope.strPaste %></label></td>',
|
||||
'<td class="right"><div id="fms-chb-paste-settings"/></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="macros">',
|
||||
'<td class="left"><label><%= scope.strMacrosSettings %></label></td>',
|
||||
'<td class="right">',
|
||||
'<div><div id="fms-cmb-macros" style="display: inline-block; margin-right: 15px;vertical-align: middle;"/>',
|
||||
'<label id="fms-lbl-macros" style="vertical-align: middle;"><%= scope.txtWarnMacrosDesc %></label></div></td>',
|
||||
'</tr>','<tr class="divider macros"></tr>',
|
||||
'<tr>',
|
||||
'<td class="left"></td>',
|
||||
'<td class="right"><button id="fms-btn-apply" class="btn normal dlg-btn primary"><%= scope.okButtonText %></button></td>',
|
||||
|
@ -331,6 +341,26 @@ define([
|
|||
]
|
||||
});
|
||||
|
||||
this.cmbMacros = new Common.UI.ComboBox({
|
||||
el : $markup.findById('#fms-cmb-macros'),
|
||||
style : 'width: 160px;',
|
||||
editable : false,
|
||||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ value: 2, displayValue: this.txtStopMacros, descValue: this.txtStopMacrosDesc },
|
||||
{ value: 0, displayValue: this.txtWarnMacros, descValue: this.txtWarnMacrosDesc },
|
||||
{ value: 1, displayValue: this.txtRunMacros, descValue: this.txtRunMacrosDesc }
|
||||
]
|
||||
}).on('selected', function(combo, record) {
|
||||
me.lblMacrosDesc.text(record.descValue);
|
||||
});
|
||||
this.lblMacrosDesc = $markup.findById('#fms-lbl-macros');
|
||||
|
||||
this.chPaste = new Common.UI.CheckBox({
|
||||
el: $markup.findById('#fms-chb-paste-settings'),
|
||||
labelText: this.strPasteButton
|
||||
});
|
||||
|
||||
this.btnApply = new Common.UI.Button({
|
||||
el: $markup.findById('#fms-btn-apply')
|
||||
});
|
||||
|
@ -367,6 +397,7 @@ define([
|
|||
/** coauthoring begin **/
|
||||
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide']();
|
||||
/** coauthoring end **/
|
||||
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
|
||||
},
|
||||
|
||||
updateSettings: function() {
|
||||
|
@ -409,6 +440,12 @@ define([
|
|||
}
|
||||
|
||||
this.chAlignGuides.setValue(Common.Utils.InternalSettings.get("pe-settings-showsnaplines"));
|
||||
|
||||
item = this.cmbMacros.store.findWhere({value: Common.Utils.InternalSettings.get("pe-macros-mode")});
|
||||
this.cmbMacros.setValue(item ? item.get('value') : 0);
|
||||
this.lblMacrosDesc.text(item ? item.get('descValue') : this.txtWarnMacrosDesc);
|
||||
|
||||
this.chPaste.setValue(Common.Utils.InternalSettings.get("pe-settings-paste-button"));
|
||||
},
|
||||
|
||||
applySettings: function() {
|
||||
|
@ -430,6 +467,11 @@ define([
|
|||
Common.localStorage.setItem("pe-settings-forcesave", this.chForcesave.isChecked() ? 1 : 0);
|
||||
Common.Utils.InternalSettings.set("pe-settings-showsnaplines", this.chAlignGuides.isChecked());
|
||||
|
||||
Common.localStorage.setItem("pe-macros-mode", this.cmbMacros.getValue());
|
||||
Common.Utils.InternalSettings.set("pe-macros-mode", Common.localStorage.getItem("pe-macros-mode"));
|
||||
|
||||
Common.localStorage.setItem("pe-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
|
||||
|
||||
Common.localStorage.save();
|
||||
|
||||
if (this.menu) {
|
||||
|
@ -484,7 +526,16 @@ define([
|
|||
strForcesave: 'Always save to server (otherwise save to server on document close)',
|
||||
txtSpellCheck: 'Spell Checking',
|
||||
strSpellCheckMode: 'Turn on spell checking option',
|
||||
txtCacheMode: 'Default cache mode'
|
||||
txtCacheMode: 'Default cache mode',
|
||||
strMacrosSettings: 'Macros Settings',
|
||||
txtWarnMacros: 'Show Notification',
|
||||
txtRunMacros: 'Enable All',
|
||||
txtStopMacros: 'Disable All',
|
||||
txtWarnMacrosDesc: 'Disable all macros with notification',
|
||||
txtRunMacrosDesc: 'Enable all macros without notification',
|
||||
txtStopMacrosDesc: 'Disable all macros without notification',
|
||||
strPaste: 'Cut, copy and paste',
|
||||
strPasteButton: 'Show Paste Options button when content is pasted'
|
||||
}, PE.Views.FileMenuPanels.Settings || {}));
|
||||
|
||||
PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -625,6 +625,8 @@
|
|||
"PE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
|
||||
"PE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
|
||||
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
||||
"PE.Controllers.Main.textHasMacros": "The file contains automatic macros.<br>Do you want to run macros?",
|
||||
"PE.Controllers.Main.textRemember": "Remember my choice",
|
||||
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
|
||||
"PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
|
||||
"PE.Controllers.Toolbar.textAccent": "Accents",
|
||||
|
@ -1259,6 +1261,15 @@
|
|||
"PE.Views.FileMenuPanels.Settings.txtPt": "Point",
|
||||
"PE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking",
|
||||
"PE.Views.FileMenuPanels.Settings.txtWin": "as Windows",
|
||||
"PE.Views.FileMenuPanels.Settings.strMacrosSettings": "Macros Settings",
|
||||
"PE.Views.FileMenuPanels.Settings.txtWarnMacros": "Show Notification",
|
||||
"PE.Views.FileMenuPanels.Settings.txtRunMacros": "Enable All",
|
||||
"PE.Views.FileMenuPanels.Settings.txtStopMacros": "Disable All",
|
||||
"PE.Views.FileMenuPanels.Settings.txtWarnMacrosDesc": "Disable all macros with notification",
|
||||
"PE.Views.FileMenuPanels.Settings.txtRunMacrosDesc": "Enable all macros without notification",
|
||||
"PE.Views.FileMenuPanels.Settings.txtStopMacrosDesc": "Disable all macros without notification",
|
||||
"PE.Views.FileMenuPanels.Settings.strPaste": "Cut, copy and paste",
|
||||
"PE.Views.FileMenuPanels.Settings.strPasteButton": "Show Paste Options button when content is pasted",
|
||||
"PE.Views.HeaderFooterDialog.applyAllText": "Apply to all",
|
||||
"PE.Views.HeaderFooterDialog.applyText": "Apply",
|
||||
"PE.Views.HeaderFooterDialog.diffLanguage": "You can’t use a date format in a different language than the slide master.<br>To change the master, click 'Apply to all' instead of 'Apply'",
|
||||
|
|
|
@ -227,6 +227,14 @@ define([
|
|||
if (!me.editorConfig.customization || !(me.editorConfig.customization.loaderName || me.editorConfig.customization.loaderLogo))
|
||||
$('#editor_sdk').append('<div class="doc-placeholder"><div class="slide-h"><div class="slide-v"><div class="slide-container"><div class="line"></div><div class="line empty"></div><div class="line"></div></div></div></div></div>');
|
||||
|
||||
var value = Common.localStorage.getItem("pe-mobile-macros-mode");
|
||||
if (value === null) {
|
||||
value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn';
|
||||
value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0);
|
||||
} else
|
||||
value = parseInt(value);
|
||||
Common.Utils.InternalSettings.set("pe-mobile-macros-mode", value);
|
||||
|
||||
// if (this.appOptions.location == 'us' || this.appOptions.location == 'ca')
|
||||
// Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch);
|
||||
},
|
||||
|
@ -257,10 +265,16 @@ define([
|
|||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
|
||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
||||
}
|
||||
|
||||
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
|
||||
this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this));
|
||||
this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this));
|
||||
this.api.asc_setDocInfo(docInfo);
|
||||
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
|
||||
|
||||
|
@ -1278,6 +1292,51 @@ define([
|
|||
return false;
|
||||
},
|
||||
|
||||
onRunAutostartMacroses: function() {
|
||||
var me = this,
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
if (enable) {
|
||||
var value = Common.Utils.InternalSettings.get("pe-mobile-macros-mode");
|
||||
if (value==1)
|
||||
this.api.asc_runAutostartMacroses();
|
||||
else if (value === 0) {
|
||||
uiApp.modal({
|
||||
title: this.notcriticalErrorTitle,
|
||||
text: this.textHasMacros,
|
||||
afterText: '<label class="label-checkbox item-content no-ripple">' +
|
||||
'<input type="checkbox" name="checkbox-show-macros">' +
|
||||
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
|
||||
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + this.textRemember + '</span>' +
|
||||
'</div>' +
|
||||
'</label>',
|
||||
buttons: [{
|
||||
text: this.textYes,
|
||||
onClick: function () {
|
||||
var dontshow = $('input[name="checkbox-show-macros"]').prop('checked');
|
||||
if (dontshow) {
|
||||
Common.Utils.InternalSettings.set("pe-mobile-macros-mode", 1);
|
||||
Common.localStorage.setItem("pe-mobile-macros-mode", 1);
|
||||
}
|
||||
setTimeout(function() {
|
||||
me.api.asc_runAutostartMacroses();
|
||||
}, 1);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: this.textNo,
|
||||
onClick: function () {
|
||||
var dontshow = $('input[name="checkbox-show-macros"]').prop('checked');
|
||||
if (dontshow) {
|
||||
Common.Utils.InternalSettings.set("pe-mobile-macros-mode", 2);
|
||||
Common.localStorage.setItem("pe-mobile-macros-mode", 2);
|
||||
}
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Translation
|
||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||
criticalErrorTitle: 'Error',
|
||||
|
@ -1442,7 +1501,11 @@ define([
|
|||
waitText: 'Please, wait...',
|
||||
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.',
|
||||
errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.<br>Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.',
|
||||
errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.'
|
||||
errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.',
|
||||
textHasMacros: 'The file contains automatic macros.<br>Do you want to run macros?',
|
||||
textRemember: 'Remember my choice',
|
||||
textYes: 'Yes',
|
||||
textNo: 'No'
|
||||
}
|
||||
})(), PE.Controllers.Main || {}))
|
||||
});
|
|
@ -176,6 +176,7 @@ define([
|
|||
Common.Utils.addScrollIfNeed('.page[data-page=settings-info-view]', '.page[data-page=settings-info-view] .page-content');
|
||||
Common.Utils.addScrollIfNeed('.page[data-page=settings-about-view]', '.page[data-page=settings-about-view] .page-content');
|
||||
Common.Utils.addScrollIfNeed('.page[data-page=color-schemes-view]', '.page[data-page=color-schemes-view] .page-content');
|
||||
Common.Utils.addScrollIfNeed('.page[data-page=settings-macros-view]', '.page[data-page=settings-macros-view] .page-content');
|
||||
|
||||
me.initSettings(pageId);
|
||||
},
|
||||
|
@ -193,9 +194,25 @@ define([
|
|||
me.initPageColorSchemes();
|
||||
} else if ('#settings-info-view' == pageId) {
|
||||
me.initPageInfo();
|
||||
} else if ('#settings-macros-view' == pageId) {
|
||||
me.initPageMacrosSettings();
|
||||
}
|
||||
},
|
||||
|
||||
initPageMacrosSettings: function() {
|
||||
var me = this,
|
||||
$pageMacrosSettings = $('.page[data-page="settings-macros-view"] input:radio[name=macros-settings]'),
|
||||
value = Common.Utils.InternalSettings.get("pe-mobile-macros-mode") || 0;
|
||||
$pageMacrosSettings.single('change', _.bind(me.onChangeMacrosSettings, me));
|
||||
$pageMacrosSettings.val([value]);
|
||||
},
|
||||
|
||||
onChangeMacrosSettings: function(e) {
|
||||
var value = parseInt($(e.currentTarget).val());
|
||||
Common.Utils.InternalSettings.set("pe-mobile-macros-mode", value);
|
||||
Common.localStorage.setItem("pe-mobile-macros-mode", value);
|
||||
},
|
||||
|
||||
initPageInfo: function() {
|
||||
var document = Common.SharedSettings.get('document') || {},
|
||||
info = document.info || {};
|
||||
|
|
|
@ -476,7 +476,6 @@
|
|||
<div class="page-content">
|
||||
<div class="content-block-title"><%= scope.textUnitOfMeasurement %></div>
|
||||
<div class="list-block">
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<label class="label-radio item-content">
|
||||
|
@ -522,6 +521,19 @@
|
|||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="list-block display-view">
|
||||
<ul>
|
||||
<li>
|
||||
<a id="settings-macros" class="item-link item-content" data-page="#settings-macros-view">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title"><%= scope.textMacrosSettings %></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -545,3 +557,54 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Macros Settings view -->
|
||||
<div id="settings-macros-view">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
|
||||
<div class="center sliding"><%= scope.textMacrosSettings %></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pages">
|
||||
<div class="page page-macros-settings" data-page="settings-macros-view">
|
||||
<div class="page-content">
|
||||
<div class="list-block">
|
||||
<ul>
|
||||
<li class="media-item">
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="macros-settings" value="2">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textDisableAll %></div>
|
||||
<div class="item-subtitle"><%= scope.textDisableAllMacrosWithoutNotification %></div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
<li class="media-item">
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="macros-settings" value="0">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textShowNotification %></div>
|
||||
<div class="item-subtitle"><%= scope.textDisableAllMacrosWithNotification %></div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
<li class="media-item">
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="macros-settings" value="1">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textEnableAll %></div>
|
||||
<div class="item-subtitle"><%= scope.textEnableAllMacrosWithoutNotification %></div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -55,7 +55,8 @@ define([
|
|||
canDownload = false,
|
||||
canAbout = true,
|
||||
canHelp = true,
|
||||
canPrint = false;
|
||||
canPrint = false,
|
||||
isShowMacros = true;
|
||||
|
||||
return {
|
||||
// el: '.view-main',
|
||||
|
@ -117,6 +118,7 @@ define([
|
|||
|
||||
if (mode.customization) {
|
||||
canHelp = (mode.customization.help!==false);
|
||||
isShowMacros = (mode.customization.macros!==false);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -129,7 +131,6 @@ define([
|
|||
$layour.find('#settings-readermode').hide();
|
||||
$layour.find('#settings-search .item-title').text(this.textFindAndReplace)
|
||||
} else {
|
||||
$layour.find('#settings-application').hide();
|
||||
$layour.find('#settings-spellcheck').hide();
|
||||
$layour.find('#settings-presentation-setup').hide();
|
||||
$layour.find('#settings-readermode input:checkbox')
|
||||
|
@ -140,6 +141,7 @@ define([
|
|||
if (!canAbout) $layour.find('#settings-about').hide();
|
||||
if (!canHelp) $layour.find('#settings-help').hide();
|
||||
if (!canPrint) $layour.find('#settings-print').hide();
|
||||
if (!isShowMacros) $layour.find('#settings-macros').hide();
|
||||
|
||||
return $layour.html();
|
||||
}
|
||||
|
@ -186,6 +188,10 @@ define([
|
|||
this.showPage('#settings-history-view');
|
||||
},
|
||||
|
||||
showMacros: function () {
|
||||
this.showPage('#settings-macros-view');
|
||||
},
|
||||
|
||||
showHelp: function () {
|
||||
var url = '{{HELP_URL}}';
|
||||
if (url.charAt(url.length-1) !== '/') {
|
||||
|
@ -213,6 +219,10 @@ define([
|
|||
|
||||
showSetApp: function () {
|
||||
this.showPage('#settings-application-view');
|
||||
$('.page[data-page=settings-application-view] .page-content > :not(.display-view)').hide();
|
||||
if (isShowMacros) {
|
||||
$('#settings-macros').single('click', _.bind(this.showMacros, this));
|
||||
}
|
||||
},
|
||||
|
||||
loadDocument: function (data) {
|
||||
|
@ -295,7 +305,14 @@ define([
|
|||
textLastModified: 'Last Modified',
|
||||
textLastModifiedBy: 'Last Modified By',
|
||||
textUploaded: 'Uploaded',
|
||||
textLocation: 'Location'
|
||||
textLocation: 'Location',
|
||||
textMacrosSettings: 'Macros Settings',
|
||||
textDisableAll: 'Disable All',
|
||||
textDisableAllMacrosWithoutNotification: 'Disable all macros without notification',
|
||||
textShowNotification: 'Show Notification',
|
||||
textDisableAllMacrosWithNotification: 'Disable all macros with notification',
|
||||
textEnableAll: 'Enable All',
|
||||
textEnableAllMacrosWithoutNotification: 'Enable all macros without notification'
|
||||
}
|
||||
})(), PE.Views.Settings || {}))
|
||||
});
|
|
@ -252,6 +252,10 @@
|
|||
"PE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
|
||||
"PE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
|
||||
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
||||
"PE.Controllers.Main.textHasMacros": "The file contains automatic macros.<br>Do you want to run macros?",
|
||||
"PE.Controllers.Main.textRemember": "Remember my choice",
|
||||
"PE.Controllers.Main.textYes": "Yes",
|
||||
"PE.Controllers.Main.textNo": "No",
|
||||
"PE.Controllers.Search.textNoTextFound": "Text not Found",
|
||||
"PE.Controllers.Search.textReplaceAll": "Replace All",
|
||||
"PE.Controllers.Settings.notcriticalErrorTitle": "Warning",
|
||||
|
@ -547,5 +551,12 @@
|
|||
"PE.Views.Settings.textUploaded": "Uploaded",
|
||||
"PE.Views.Settings.textVersion": "Version",
|
||||
"PE.Views.Settings.unknownText": "Unknown",
|
||||
"PE.Views.Settings.textMacrosSettings": "Macros Settings",
|
||||
"PE.Views.Settings.textDisableAll": "Disable All",
|
||||
"PE.Views.Settings.textDisableAllMacrosWithoutNotification": "Disable all macros without notification",
|
||||
"PE.Views.Settings.textShowNotification": "Show Notification",
|
||||
"PE.Views.Settings.textDisableAllMacrosWithNotification": "Disable all macros with notification",
|
||||
"PE.Views.Settings.textEnableAll": "Enable All",
|
||||
"PE.Views.Settings.textEnableAllMacrosWithoutNotification": "Enable all macros without notification",
|
||||
"PE.Views.Toolbar.textBack": "Back"
|
||||
}
|
|
@ -7752,3 +7752,10 @@ html.pixel-ratio-3 .numbers li {
|
|||
.doc-placeholder .slide-container > .line.empty {
|
||||
background: transparent;
|
||||
}
|
||||
.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-subtitle {
|
||||
font-size: 14px;
|
||||
color: #8e8e93;
|
||||
}
|
||||
|
|
|
@ -7662,3 +7662,10 @@ html.pixel-ratio-3 .numbers li {
|
|||
.doc-placeholder .slide-container > .line.empty {
|
||||
background: transparent;
|
||||
}
|
||||
.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-subtitle {
|
||||
font-size: 14px;
|
||||
color: #9e9e9e;
|
||||
}
|
||||
|
|
|
@ -322,3 +322,18 @@ input, textarea {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Macros settings
|
||||
.page-macros-settings[data-page="settings-macros-view"] {
|
||||
.list-block {
|
||||
li.media-item {
|
||||
.item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.item-subtitle {
|
||||
font-size: 14px;
|
||||
color: @gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -321,3 +321,18 @@ input, textarea {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Macros settings
|
||||
.page-macros-settings[data-page="settings-macros-view"] {
|
||||
.list-block {
|
||||
li.media-item {
|
||||
.item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.item-subtitle {
|
||||
font-size: 14px;
|
||||
color: @gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -98,9 +98,16 @@ SSE.ApplicationController = new(function(){
|
|||
docInfo.put_VKey(docConfig.vkey);
|
||||
docInfo.put_Token(docConfig.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_EncryptedInfo(config.encryptionKeys);
|
||||
|
||||
var enable = !config.customization || (config.customization.macros!==false);
|
||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||
enable = !config.customization || (config.customization.plugins!==false);
|
||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
||||
|
||||
if (api) {
|
||||
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
||||
api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses);
|
||||
api.asc_setDocInfo(docInfo);
|
||||
api.asc_getEditorPermissions(config.licenseUrl, config.customerId);
|
||||
api.asc_enableKeyEvents(true);
|
||||
|
@ -531,6 +538,11 @@ SSE.ApplicationController = new(function(){
|
|||
}
|
||||
}
|
||||
|
||||
function onRunAutostartMacroses() {
|
||||
if (!config.customization || (config.customization.macros!==false))
|
||||
if (api) api.asc_runAutostartMacroses();
|
||||
}
|
||||
|
||||
// Helpers
|
||||
// -------------------------
|
||||
|
||||
|
|
|
@ -389,6 +389,10 @@ define([
|
|||
value = parseInt(Common.localStorage.getItem("sse-settings-autosave"));
|
||||
Common.Utils.InternalSettings.set("sse-settings-autosave", value);
|
||||
this.api.asc_setAutoSaveGap(value);
|
||||
|
||||
value = parseInt(Common.localStorage.getItem("sse-settings-paste-button"));
|
||||
Common.Utils.InternalSettings.set("sse-settings-paste-button", value);
|
||||
this.api.asc_setVisiblePasteButton(!!value);
|
||||
}
|
||||
|
||||
var reg = Common.localStorage.getItem("sse-settings-reg-settings"),
|
||||
|
|
|
@ -393,6 +393,14 @@ define([
|
|||
$('#editor_sdk').append('<div class="doc-placeholder">' + '<div class="columns"></div>'.repeat(2) + '</div>');
|
||||
}
|
||||
|
||||
var value = Common.localStorage.getItem("sse-macros-mode");
|
||||
if (value === null) {
|
||||
value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn';
|
||||
value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0);
|
||||
} else
|
||||
value = parseInt(value);
|
||||
Common.Utils.InternalSettings.set("sse-macros-mode", value);
|
||||
|
||||
this.isFrameClosed = (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge);
|
||||
Common.Controllers.Desktop.init(this.appOptions);
|
||||
},
|
||||
|
@ -425,6 +433,11 @@ define([
|
|||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
|
||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
||||
|
||||
this.headerView && this.headerView.setDocumentCaption(data.doc.title);
|
||||
|
||||
Common.Utils.InternalSettings.set("sse-doc-info-key", data.doc.key);
|
||||
|
@ -432,6 +445,7 @@ define([
|
|||
|
||||
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
|
||||
this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this));
|
||||
this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this));
|
||||
this.api.asc_setDocInfo(docInfo);
|
||||
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
|
||||
},
|
||||
|
@ -797,6 +811,11 @@ define([
|
|||
me.api.asc_setIsForceSaveOnUserSave(me.appOptions.forcesave);
|
||||
}
|
||||
|
||||
value = Common.localStorage.getItem("sse-settings-paste-button");
|
||||
if (value===null) value = '1';
|
||||
Common.Utils.InternalSettings.set("sse-settings-paste-button", parseInt(value));
|
||||
me.api.asc_setVisiblePasteButton(!!parseInt(value));
|
||||
|
||||
if (me.needToUpdateVersion) {
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
toolbarController.onApiCoAuthoringDisconnect();
|
||||
|
@ -2186,6 +2205,36 @@ define([
|
|||
}});
|
||||
},
|
||||
|
||||
onRunAutostartMacroses: function() {
|
||||
var me = this,
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
if (enable) {
|
||||
var value = Common.Utils.InternalSettings.get("sse-macros-mode");
|
||||
if (value==1)
|
||||
this.api.asc_runAutostartMacroses();
|
||||
else if (value === 0) {
|
||||
Common.UI.warning({
|
||||
msg: this.textHasMacros + '<br>',
|
||||
buttons: ['yes', 'no'],
|
||||
primary: 'yes',
|
||||
dontshow: true,
|
||||
textDontShow: this.textRemember,
|
||||
callback: function(btn, dontshow){
|
||||
if (dontshow) {
|
||||
Common.Utils.InternalSettings.set("sse-macros-mode", (btn == 'yes') ? 1 : 2);
|
||||
Common.localStorage.setItem("sse-macros-mode", (btn == 'yes') ? 1 : 2);
|
||||
}
|
||||
if (btn == 'yes') {
|
||||
setTimeout(function() {
|
||||
me.api.asc_runAutostartMacroses();
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||
criticalErrorTitle: 'Error',
|
||||
notcriticalErrorTitle: 'Warning',
|
||||
|
@ -2554,7 +2603,9 @@ define([
|
|||
errRemDuplicates: 'Duplicate values found and deleted: {0}, unique values left: {1}.',
|
||||
txtMultiSelect: 'Multi-Select (Alt+S)',
|
||||
txtClearFilter: 'Clear Filter (Alt+C)',
|
||||
txtBlank: '(blank)'
|
||||
txtBlank: '(blank)',
|
||||
textHasMacros: 'The file contains automatic macros.<br>Do you want to run macros?',
|
||||
textRemember: 'Remember my choice'
|
||||
}
|
||||
})(), SSE.Controllers.Main || {}))
|
||||
});
|
||||
|
|
|
@ -3127,8 +3127,8 @@ define([
|
|||
var me = this;
|
||||
|
||||
Common.NotificationCenter.on({
|
||||
'edit:complete': function () {
|
||||
if (me.api && me.modeAlwaysSetStyle) {
|
||||
'edit:complete': function (cmp) {
|
||||
if (me.api && me.modeAlwaysSetStyle && cmp!=='tab') {
|
||||
me.api.asc_formatPainter(AscCommon.c_oAscFormatPainterState.kOff);
|
||||
me.toolbar.btnCopyStyle.toggle(false, true);
|
||||
me.modeAlwaysSetStyle = false;
|
||||
|
|
|
@ -667,6 +667,16 @@ define([
|
|||
'<td class="left"></td>',
|
||||
'<td class="right"><div id="fms-thousands-separator"/><label class="label-separator" style="margin-left: 10px; padding-top: 4px;"><%= scope.strThousandsSeparator %></label></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="edit">',
|
||||
'<td class="left"><label><%= scope.strPaste %></label></td>',
|
||||
'<td class="right"><div id="fms-chb-paste-settings"/></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="macros">',
|
||||
'<td class="left"><label><%= scope.strMacrosSettings %></label></td>',
|
||||
'<td class="right">',
|
||||
'<div><div id="fms-cmb-macros" style="display: inline-block; margin-right: 15px;vertical-align: middle;"/>',
|
||||
'<label id="fms-lbl-macros" style="vertical-align: middle;"><%= scope.txtWarnMacrosDesc %></label></div></td>',
|
||||
'</tr>','<tr class="divider macros"></tr>',
|
||||
'<tr>',
|
||||
'<td class="left"></td>',
|
||||
'<td class="right"><button id="fms-btn-apply" class="btn normal dlg-btn primary"><%= scope.okButtonText %></button></td>',
|
||||
|
@ -897,6 +907,26 @@ define([
|
|||
var $thousandsSeparatorInput = this.inputThousandsSeparator.$el.find('input');
|
||||
$thousandsSeparatorInput.on('keydown', keyDown);
|
||||
|
||||
this.cmbMacros = new Common.UI.ComboBox({
|
||||
el : $markup.findById('#fms-cmb-macros'),
|
||||
style : 'width: 160px;',
|
||||
editable : false,
|
||||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ value: 2, displayValue: this.txtStopMacros, descValue: this.txtStopMacrosDesc },
|
||||
{ value: 0, displayValue: this.txtWarnMacros, descValue: this.txtWarnMacrosDesc },
|
||||
{ value: 1, displayValue: this.txtRunMacros, descValue: this.txtRunMacrosDesc }
|
||||
]
|
||||
}).on('selected', function(combo, record) {
|
||||
me.lblMacrosDesc.text(record.descValue);
|
||||
});
|
||||
this.lblMacrosDesc = $markup.findById('#fms-lbl-macros');
|
||||
|
||||
this.chPaste = new Common.UI.CheckBox({
|
||||
el: $markup.findById('#fms-chb-paste-settings'),
|
||||
labelText: this.strPasteButton
|
||||
});
|
||||
|
||||
this.btnApply = new Common.UI.Button({
|
||||
el: $markup.findById('#fms-btn-apply')
|
||||
});
|
||||
|
@ -932,6 +962,7 @@ define([
|
|||
$('tr.forcesave', this.el)[mode.canForcesave ? 'show' : 'hide']();
|
||||
$('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide']();
|
||||
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring? 'show' : 'hide']();
|
||||
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
|
||||
},
|
||||
|
||||
setApi: function(api) {
|
||||
|
@ -1016,6 +1047,12 @@ define([
|
|||
} else {
|
||||
this.$el.find('.label-separator').removeClass('disabled');
|
||||
}
|
||||
|
||||
item = this.cmbMacros.store.findWhere({value: Common.Utils.InternalSettings.get("sse-macros-mode")});
|
||||
this.cmbMacros.setValue(item ? item.get('value') : 0);
|
||||
this.lblMacrosDesc.text(item ? item.get('descValue') : this.txtWarnMacrosDesc);
|
||||
|
||||
this.chPaste.setValue(Common.Utils.InternalSettings.get("sse-settings-paste-button"));
|
||||
},
|
||||
|
||||
applySettings: function() {
|
||||
|
@ -1056,6 +1093,11 @@ define([
|
|||
Common.localStorage.setBool("sse-settings-use-base-separator", isChecked);
|
||||
Common.Utils.InternalSettings.set("sse-settings-use-base-separator", isChecked);
|
||||
|
||||
Common.localStorage.setItem("sse-macros-mode", this.cmbMacros.getValue());
|
||||
Common.Utils.InternalSettings.set("sse-macros-mode", Common.localStorage.getItem("sse-macros-mode"));
|
||||
|
||||
Common.localStorage.setItem("sse-settings-paste-button", this.chPaste.isChecked() ? 1 : 0);
|
||||
|
||||
Common.localStorage.save();
|
||||
if (this.menu) {
|
||||
this.menu.fireEvent('settings:apply', [this.menu]);
|
||||
|
@ -1150,7 +1192,16 @@ define([
|
|||
strUseSeparatorsBasedOnRegionalSettings: 'Use separators based on regional settings',
|
||||
strDecimalSeparator: 'Decimal separator',
|
||||
strThousandsSeparator: 'Thousands separator',
|
||||
txtCacheMode: 'Default cache mode'
|
||||
txtCacheMode: 'Default cache mode',
|
||||
strMacrosSettings: 'Macros Settings',
|
||||
txtWarnMacros: 'Show Notification',
|
||||
txtRunMacros: 'Enable All',
|
||||
txtStopMacros: 'Disable All',
|
||||
txtWarnMacrosDesc: 'Disable all macros with notification',
|
||||
txtRunMacrosDesc: 'Enable all macros without notification',
|
||||
txtStopMacrosDesc: 'Disable all macros without notification',
|
||||
strPaste: 'Cut, copy and paste',
|
||||
strPasteButton: 'Show Paste Options button when content is pasted'
|
||||
}, SSE.Views.FileMenuPanels.MainSettingsGeneral || {}));
|
||||
|
||||
SSE.Views.FileMenuPanels.MainSpellCheckSettings = Common.UI.BaseView.extend(_.extend({
|
||||
|
|
|
@ -817,6 +817,8 @@
|
|||
"SSE.Controllers.Main.txtMultiSelect": "Multi-Select (Alt+S)",
|
||||
"SSE.Controllers.Main.txtClearFilter": "Clear Filter (Alt+C)",
|
||||
"SSE.Controllers.Main.txtBlank": "(blank)",
|
||||
"SSE.Controllers.Main.textHasMacros": "The file contains automatic macros.<br>Do you want to run macros?",
|
||||
"SSE.Controllers.Main.textRemember": "Remember my choice",
|
||||
"SSE.Controllers.Print.strAllSheets": "All Sheets",
|
||||
"SSE.Controllers.Print.textFirstCol": "First column",
|
||||
"SSE.Controllers.Print.textFirstRow": "First row",
|
||||
|
@ -1694,6 +1696,15 @@
|
|||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Point",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Russian",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "as Windows",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strMacrosSettings": "Macros Settings",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWarnMacros": "Show Notification",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRunMacros": "Enable All",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtStopMacros": "Disable All",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWarnMacrosDesc": "Disable all macros with notification",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRunMacrosDesc": "Enable all macros without notification",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtStopMacrosDesc": "Disable all macros without notification",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strPaste": "Cut, copy and paste",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strPasteButton": "Show Paste Options button when content is pasted",
|
||||
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.okButtonText": "Apply",
|
||||
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.strDictionaryLanguage": "Dictionary language",
|
||||
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.strIgnoreWordsInUPPERCASE": "Ignore words in UPPERCASE",
|
||||
|
|
|
@ -224,8 +224,8 @@ button:active:not(.disabled) .btn-change-shape {background-position: -56px -
|
|||
}
|
||||
|
||||
.list-item > div:nth-child(1) {
|
||||
width:70px;
|
||||
padding-right: 5px;
|
||||
width:65px;
|
||||
padding-right: 0;
|
||||
display: inline-block;
|
||||
white-space: pre;
|
||||
overflow: hidden;
|
||||
|
@ -235,9 +235,9 @@ button:active:not(.disabled) .btn-change-shape {background-position: -56px -
|
|||
|
||||
.listitem-icon {
|
||||
vertical-align: middle;
|
||||
width: 16px;
|
||||
width: 22px;
|
||||
height: 16px;
|
||||
background-position: -1px -274px;
|
||||
background-position: 1px -274px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -243,6 +243,14 @@ define([
|
|||
|
||||
if (!me.editorConfig.customization || !(me.editorConfig.customization.loaderName || me.editorConfig.customization.loaderLogo))
|
||||
$('#editor_sdk').append('<div class="doc-placeholder">' + '<div class="columns"></div>'.repeat(2) + '</div>');
|
||||
|
||||
var value = Common.localStorage.getItem("sse-mobile-macros-mode");
|
||||
if (value === null) {
|
||||
value = this.editorConfig.customization ? this.editorConfig.customization.macrosMode : 'warn';
|
||||
value = (value == 'enable') ? 1 : (value == 'disable' ? 2 : 0);
|
||||
} else
|
||||
value = parseInt(value);
|
||||
Common.Utils.InternalSettings.set("sse-mobile-macros-mode", value);
|
||||
},
|
||||
|
||||
loadDocument: function(data) {
|
||||
|
@ -270,10 +278,16 @@ define([
|
|||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
|
||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
||||
}
|
||||
|
||||
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
|
||||
this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this));
|
||||
this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this));
|
||||
this.api.asc_setDocInfo(docInfo);
|
||||
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
|
||||
|
||||
|
@ -1483,6 +1497,51 @@ define([
|
|||
return false;
|
||||
},
|
||||
|
||||
onRunAutostartMacroses: function() {
|
||||
var me = this,
|
||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
if (enable) {
|
||||
var value = Common.Utils.InternalSettings.get("sse-mobile-macros-mode");
|
||||
if (value==1)
|
||||
this.api.asc_runAutostartMacroses();
|
||||
else if (value === 0) {
|
||||
uiApp.modal({
|
||||
title: this.notcriticalErrorTitle,
|
||||
text: this.textHasMacros,
|
||||
afterText: '<label class="label-checkbox item-content no-ripple">' +
|
||||
'<input type="checkbox" name="checkbox-show-macros">' +
|
||||
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
|
||||
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + this.textRemember + '</span>' +
|
||||
'</div>' +
|
||||
'</label>',
|
||||
buttons: [{
|
||||
text: this.textYes,
|
||||
onClick: function () {
|
||||
var dontshow = $('input[name="checkbox-show-macros"]').prop('checked');
|
||||
if (dontshow) {
|
||||
Common.Utils.InternalSettings.set("sse-mobile-macros-mode", 1);
|
||||
Common.localStorage.setItem("sse-mobile-macros-mode", 1);
|
||||
}
|
||||
setTimeout(function() {
|
||||
me.api.asc_runAutostartMacroses();
|
||||
}, 1);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: this.textNo,
|
||||
onClick: function () {
|
||||
var dontshow = $('input[name="checkbox-show-macros"]').prop('checked');
|
||||
if (dontshow) {
|
||||
Common.Utils.InternalSettings.set("sse-mobile-macros-mode", 2);
|
||||
Common.localStorage.setItem("sse-mobile-macros-mode", 2);
|
||||
}
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||
criticalErrorTitle: 'Error',
|
||||
notcriticalErrorTitle: 'Warning',
|
||||
|
@ -1666,7 +1725,11 @@ define([
|
|||
waitText: 'Please, wait...',
|
||||
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.',
|
||||
errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.<br>Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.',
|
||||
errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.'
|
||||
errorOpensource: 'Files can be opened for viewing only. Mobile web editors are not available in the Open Source version.',
|
||||
textHasMacros: 'The file contains automatic macros.<br>Do you want to run macros?',
|
||||
textRemember: 'Remember my choice',
|
||||
textYes: 'Yes',
|
||||
textNo: 'No'
|
||||
}
|
||||
})(), SSE.Controllers.Main || {}))
|
||||
});
|
|
@ -258,6 +258,8 @@ define([
|
|||
me.initRegSettings();
|
||||
} else if ('#settings-info-view' == pageId) {
|
||||
me.initPageInfo();
|
||||
} else if ('#settings-macros-view' == pageId) {
|
||||
me.initPageMacrosSettings();
|
||||
} else {
|
||||
var _userCount = SSE.getController('Main').returnUserCount();
|
||||
if (_userCount > 0) {
|
||||
|
@ -266,6 +268,20 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
initPageMacrosSettings: function() {
|
||||
var me = this,
|
||||
$pageMacrosSettings = $('.page[data-page="settings-macros-view"] input:radio[name=macros-settings]'),
|
||||
value = Common.Utils.InternalSettings.get("sse-mobile-macros-mode") || 0;
|
||||
$pageMacrosSettings.single('change', _.bind(me.onChangeMacrosSettings, me));
|
||||
$pageMacrosSettings.val([value]);
|
||||
},
|
||||
|
||||
onChangeMacrosSettings: function(e) {
|
||||
var value = parseInt($(e.currentTarget).val());
|
||||
Common.Utils.InternalSettings.set("sse-mobile-macros-mode", value);
|
||||
Common.localStorage.setItem("sse-mobile-macros-mode", value);
|
||||
},
|
||||
|
||||
initPageInfo: function() {
|
||||
var document = Common.SharedSettings.get('document') || {},
|
||||
info = document.info || {};
|
||||
|
|
|
@ -579,6 +579,19 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="list-block display-view">
|
||||
<ul>
|
||||
<li>
|
||||
<a id="settings-macros" class="item-link item-content" data-page="#settings-macros-view">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title"><%= scope.textMacrosSettings %></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -845,3 +858,54 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Macros Settings view -->
|
||||
<div id="settings-macros-view">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
|
||||
<div class="center sliding"><%= scope.textMacrosSettings %></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pages">
|
||||
<div class="page page-macros-settings" data-page="settings-macros-view">
|
||||
<div class="page-content">
|
||||
<div class="list-block">
|
||||
<ul>
|
||||
<li class="media-item">
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="macros-settings" value="2">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textDisableAll %></div>
|
||||
<div class="item-subtitle"><%= scope.textDisableAllMacrosWithoutNotification %></div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
<li class="media-item">
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="macros-settings" value="0">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textShowNotification %></div>
|
||||
<div class="item-subtitle"><%= scope.textDisableAllMacrosWithNotification %></div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
<li class="media-item">
|
||||
<label class="label-radio item-content">
|
||||
<input type="radio" name="macros-settings" value="1">
|
||||
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textEnableAll %></div>
|
||||
<div class="item-subtitle"><%= scope.textEnableAllMacrosWithoutNotification %></div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -54,7 +54,8 @@ define([
|
|||
canDownload = false,
|
||||
canAbout = true,
|
||||
canHelp = true,
|
||||
canPrint = false;
|
||||
canPrint = false,
|
||||
isShowMacros = true;
|
||||
|
||||
return {
|
||||
// el: '.view-main',
|
||||
|
@ -126,6 +127,7 @@ define([
|
|||
|
||||
if (mode.customization) {
|
||||
canHelp = (mode.customization.help!==false);
|
||||
isShowMacros = (mode.customization.macros!==false);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -143,6 +145,7 @@ define([
|
|||
if (!canAbout) $layout.find('#settings-about').hide();
|
||||
if (!canHelp) $layout.find('#settings-help').hide();
|
||||
if (!canPrint) $layout.find('#settings-print').hide();
|
||||
if (!isShowMacros) $layour.find('#settings-macros').hide();
|
||||
|
||||
return $layout.html();
|
||||
}
|
||||
|
@ -173,6 +176,10 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
showMacros: function () {
|
||||
this.showPage('#settings-macros-view');
|
||||
},
|
||||
|
||||
showSetApp: function() {
|
||||
this.showPage('#settings-application-view');
|
||||
$('#language-formula').single('click', _.bind(this.showFormulaLanguage, this));
|
||||
|
@ -180,6 +187,9 @@ define([
|
|||
if (!isEdit) {
|
||||
$('.page[data-page=settings-application-view] .page-content > :not(.display-view)').hide();
|
||||
}
|
||||
if (isShowMacros) {
|
||||
$('#settings-macros').single('click', _.bind(this.showMacros, this));
|
||||
}
|
||||
},
|
||||
|
||||
showFormulaLanguage: function () {
|
||||
|
@ -421,7 +431,14 @@ define([
|
|||
textLastModified: 'Last Modified',
|
||||
textLastModifiedBy: 'Last Modified By',
|
||||
textUploaded: 'Uploaded',
|
||||
textLocation: 'Location'
|
||||
textLocation: 'Location',
|
||||
textMacrosSettings: 'Macros Settings',
|
||||
textDisableAll: 'Disable All',
|
||||
textDisableAllMacrosWithoutNotification: 'Disable all macros without notification',
|
||||
textShowNotification: 'Show Notification',
|
||||
textDisableAllMacrosWithNotification: 'Disable all macros with notification',
|
||||
textEnableAll: 'Enable All',
|
||||
textEnableAllMacrosWithoutNotification: 'Enable all macros without notification'
|
||||
}
|
||||
})(), SSE.Views.Settings || {}))
|
||||
});
|
|
@ -312,6 +312,10 @@
|
|||
"SSE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
|
||||
"SSE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
|
||||
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
|
||||
"SSE.Controllers.Main.textHasMacros": "The file contains automatic macros.<br>Do you want to run macros?",
|
||||
"SSE.Controllers.Main.textRemember": "Remember my choice",
|
||||
"SSE.Controllers.Main.textYes": "Yes",
|
||||
"SSE.Controllers.Main.textNo": "No",
|
||||
"SSE.Controllers.Search.textNoTextFound": "Text not found",
|
||||
"SSE.Controllers.Search.textReplaceAll": "Replace All",
|
||||
"SSE.Controllers.Settings.notcriticalErrorTitle": "Warning",
|
||||
|
@ -623,5 +627,12 @@
|
|||
"SSE.Views.Settings.textUploaded": "Uploaded",
|
||||
"SSE.Views.Settings.textVersion": "Version",
|
||||
"SSE.Views.Settings.unknownText": "Unknown",
|
||||
"SSE.Views.Settings.textMacrosSettings": "Macros Settings",
|
||||
"SSE.Views.Settings.textDisableAll": "Disable All",
|
||||
"SSE.Views.Settings.textDisableAllMacrosWithoutNotification": "Disable all macros without notification",
|
||||
"SSE.Views.Settings.textShowNotification": "Show Notification",
|
||||
"SSE.Views.Settings.textDisableAllMacrosWithNotification": "Disable all macros with notification",
|
||||
"SSE.Views.Settings.textEnableAll": "Enable All",
|
||||
"SSE.Views.Settings.textEnableAllMacrosWithoutNotification": "Enable all macros without notification",
|
||||
"SSE.Views.Toolbar.textBack": "Back"
|
||||
}
|
|
@ -8343,3 +8343,10 @@ html.pixel-ratio-3 .cell-styles.dataview .row li {
|
|||
.picker-modal.container-view-comment .pages {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-subtitle {
|
||||
font-size: 14px;
|
||||
color: #8e8e93;
|
||||
}
|
||||
|
|
|
@ -8286,3 +8286,10 @@ html.pixel-ratio-3 .cell-styles.dataview .row li {
|
|||
.picker-modal.container-view-comment .pages {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.page-macros-settings[data-page="settings-macros-view"] .list-block li.media-item .item-subtitle {
|
||||
font-size: 14px;
|
||||
color: #9e9e9e;
|
||||
}
|
||||
|
|
|
@ -355,3 +355,18 @@ input, textarea {
|
|||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
// Macros settings
|
||||
.page-macros-settings[data-page="settings-macros-view"] {
|
||||
.list-block {
|
||||
li.media-item {
|
||||
.item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.item-subtitle {
|
||||
font-size: 14px;
|
||||
color: @gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -356,3 +356,18 @@ input, textarea {
|
|||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
// Macros settings
|
||||
.page-macros-settings[data-page="settings-macros-view"] {
|
||||
.list-block {
|
||||
li.media-item {
|
||||
.item-title {
|
||||
font-weight: normal;
|
||||
}
|
||||
.item-subtitle {
|
||||
font-size: 14px;
|
||||
color: @gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue