\ No newline at end of file
diff --git a/apps/documenteditor/main/app/template/LeftMenu.template b/apps/documenteditor/main/app/template/LeftMenu.template
index 2466925d3..96827d295 100644
--- a/apps/documenteditor/main/app/template/LeftMenu.template
+++ b/apps/documenteditor/main/app/template/LeftMenu.template
@@ -12,10 +12,10 @@
-
-
+
+
-
-
+
+
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/template/RightMenu.template b/apps/documenteditor/main/app/template/RightMenu.template
index 306a80310..7b4bb1ba8 100644
--- a/apps/documenteditor/main/app/template/RightMenu.template
+++ b/apps/documenteditor/main/app/template/RightMenu.template
@@ -20,7 +20,7 @@
'
].join(''));
this.paragraphControls.push(this.listStyles);
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index e52505a4d..30b809527 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -65,8 +65,8 @@
"Common.Controllers.ReviewChanges.textSubScript": "Subscript",
"Common.Controllers.ReviewChanges.textSuperScript": "Superscript",
"Common.Controllers.ReviewChanges.textTableChanged": "Table Settings Changed",
- "Common.Controllers.ReviewChanges.textTableRowsAdd": "Table Rows Added",
- "Common.Controllers.ReviewChanges.textTableRowsDel": "Table Rows Deleted",
+ "Common.Controllers.ReviewChanges.textTableRowsAdd": "Table Rows Added",
+ "Common.Controllers.ReviewChanges.textTableRowsDel": "Table Rows Deleted",
"Common.Controllers.ReviewChanges.textTabs": "Change tabs",
"Common.Controllers.ReviewChanges.textUnderline": "Underline",
"Common.Controllers.ReviewChanges.textUrl": "Paste a document URL",
@@ -135,7 +135,7 @@
"Common.UI.SearchDialog.txtBtnReplace": "Replace",
"Common.UI.SearchDialog.txtBtnReplaceAll": "Replace All",
"Common.UI.SynchronizeTip.textDontShow": "Don't show this message again",
- "Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user. Please click to save your changes and reload the updates.",
+ "Common.UI.SynchronizeTip.textSynchronize": "The document has been changed by another user. Please click to save your changes and reload the updates.",
"Common.UI.ThemeColorPalette.textStandartColors": "Standard Colors",
"Common.UI.ThemeColorPalette.textThemeColors": "Theme Colors",
"Common.UI.Window.cancelButtonText": "Cancel",
@@ -750,6 +750,9 @@
"DE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server. 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. 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. Do you want to run macros?",
+ "DE.Controllers.Main.textRemember": "Remember my choice",
+ "DE.Controllers.Main.errorPasteSlicerError": "Table slicers cannot be copied from one workbook to another. Try again by selecting the entire table and the slicers.",
"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 +1572,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",
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-higlight.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-higlight.png
index 120f35613..3150a56b0 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-higlight.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-higlight.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-mailmerge.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-mailmerge.png
index d7c8c847f..5756b4966 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-mailmerge.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-mailmerge.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-menu-header.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-menu-header.png
index 2099b1d31..755824efd 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-menu-header.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-menu-header.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-multilevels.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-multilevels.png
index 3ef428059..0fdf99822 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-multilevels.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-multilevels.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-plaintext.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-plaintext.png
index a06586d6f..19d241035 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-plaintext.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-plaintext.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-remove.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-remove.png
index a01ae131e..25ff8e812 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-remove.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-remove.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-richtext.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-richtext.png
index 0e2b571a8..90efc38fb 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-richtext.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/cc-richtext.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-left.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-left.png
index 3349221ec..718d59b0b 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-left.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-left.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-one.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-one.png
index 334ddde32..3e6d9519a 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-one.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-one.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-right.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-right.png
index 4b1d7c9d4..e83695c3a 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-right.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-right.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-three.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-three.png
index 94141dbeb..887ec8a11 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-three.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-three.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-two.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-two.png
index daf2a1161..bf355e754 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-two.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/columns-two.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-inmargin.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-inmargin.png
index 90b34b2f6..2b8716c10 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-inmargin.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-inmargin.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-intext.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-intext.png
index c0c17b5f4..2887f8879 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-intext.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/dropcap-intext.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-behind.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-behind.png
index 003c08c56..928b7e6ca 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-behind.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-behind.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-infront.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-infront.png
index 8f05371c0..08b6c50ec 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-infront.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-infront.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-inline.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-inline.png
index 188880bc1..f56e4d559 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-inline.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-inline.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-square.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-square.png
index 03d1c6d0f..be6828378 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-square.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-square.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-through.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-through.png
index 91a175042..f252026f4 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-through.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-through.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-tight.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-tight.png
index 034f82d43..4ce614615 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-tight.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-tight.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-topandbottom.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-topandbottom.png
index 4ee37e9c5..65477dfc3 100644
Binary files a/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-topandbottom.png and b/apps/documenteditor/main/resources/img/toolbar/1.75x/wrap-topandbottom.png differ
diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js
index 7de2d59fe..1a0faebbc 100644
--- a/apps/documenteditor/mobile/app/controller/Main.js
+++ b/apps/documenteditor/mobile/app/controller/Main.js
@@ -224,6 +224,14 @@ define([
if (!me.editorConfig.customization || !(me.editorConfig.customization.loaderName || me.editorConfig.customization.loaderLogo))
$('#editor-container').append('
');
+ 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: '' +
+ '' +
+ '
' +
+ '' + this.textRemember + '' +
+ '
' +
+ '',
+ 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. Please contact your Document Server administrator for details.',
errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed. 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. Do you want to run macros?',
+ textRemember: 'Remember my choice',
+ textYes: 'Yes',
+ textNo: 'No'
}
})(), DE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js
index c058d65bd..3b59d6245 100644
--- a/apps/documenteditor/mobile/app/controller/Settings.js
+++ b/apps/documenteditor/mobile/app/controller/Settings.js
@@ -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) {
diff --git a/apps/documenteditor/mobile/app/controller/add/AddOther.js b/apps/documenteditor/mobile/app/controller/add/AddOther.js
index 24f9b2553..1eaa9c01d 100644
--- a/apps/documenteditor/mobile/app/controller/add/AddOther.js
+++ b/apps/documenteditor/mobile/app/controller/add/AddOther.js
@@ -91,10 +91,13 @@ define([
},
initEvents: function () {
- this.view.hideInsertComments = this.isHideInsertComment();
+ this.setDisableMenuItem();
},
- isHideInsertComment: function() {
+ setDisableMenuItem: function() {
+ var isDisableComment = true,
+ isDisableBreak = false,
+ isDisableFootnote = false;
var stack = this.api.getSelectedElements();
var isText = false,
isTable = false,
@@ -133,9 +136,14 @@ define([
});
if (stack.length > 0) {
var isObject = isShape || isChart || isImage || isTable;
- return (this.api.can_AddQuotedComment() === false || lockedText || lockedTable || lockedImage || lockedHeader || (!isText && isObject));
+ isDisableComment = (this.api.can_AddQuotedComment() === false || lockedText || lockedTable || lockedImage || lockedHeader || (!isText && isObject));
+ if (isShape && isText) {
+ isDisableBreak = isDisableFootnote = true;
+ }
}
- return true;
+ this.view.isDisableComment = isDisableComment;
+ this.view.isDisableBreak = isDisableBreak;
+ this.view.isDisableFootnote = isDisableFootnote;
},
onPageShow: function (view, pageId) {
@@ -194,7 +202,7 @@ define([
},
onDoneComment: function(documentFlag) {
- var value = $('#comment-text').val();
+ var value = $('#comment-text').val().trim();
if (value.length > 0) {
DE.getController('Common.Controllers.Collaboration').onAddNewComment(value, documentFlag);
DE.getController('AddContainer').hideModal();
diff --git a/apps/documenteditor/mobile/app/template/AddOther.template b/apps/documenteditor/mobile/app/template/AddOther.template
index b67fdcf51..773bdfd58 100644
--- a/apps/documenteditor/mobile/app/template/AddOther.template
+++ b/apps/documenteditor/mobile/app/template/AddOther.template
@@ -38,7 +38,7 @@
-
' + this.criticalErrorExtText;
config.callback = function(btn) {
if (btn == 'ok') {
Common.NotificationCenter.trigger('goback', true);
@@ -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 + ' ',
+ 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. Please contact our Sales Department to get a quote.',
waitText: 'Please, wait...',
errorFileSizeExceed: 'The file size exceeds the limitation set for your server. Please contact your Document Server administrator for details.',
- errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed. 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. 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. Do you want to run macros?',
+ textRemember: 'Remember my choice'
}
})(), PE.Controllers.Main || {}))
});
diff --git a/apps/presentationeditor/main/app/template/FileMenu.template b/apps/presentationeditor/main/app/template/FileMenu.template
index d67b35cfe..a2c9eb462 100644
--- a/apps/presentationeditor/main/app/template/FileMenu.template
+++ b/apps/presentationeditor/main/app/template/FileMenu.template
@@ -1,36 +1,36 @@
\ No newline at end of file
diff --git a/apps/presentationeditor/main/app/template/LeftMenu.template b/apps/presentationeditor/main/app/template/LeftMenu.template
index 33401f1b9..7471d770d 100644
--- a/apps/presentationeditor/main/app/template/LeftMenu.template
+++ b/apps/presentationeditor/main/app/template/LeftMenu.template
@@ -12,9 +12,9 @@
-
-
+
+
-
+
\ No newline at end of file
diff --git a/apps/presentationeditor/main/app/template/RightMenu.template b/apps/presentationeditor/main/app/template/RightMenu.template
index 83a4bdf86..a1e1e9c5d 100644
--- a/apps/presentationeditor/main/app/template/RightMenu.template
+++ b/apps/presentationeditor/main/app/template/RightMenu.template
@@ -18,7 +18,7 @@
'
].join(''))
diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json
index 05c8e526d..cd66ef7f1 100644
--- a/apps/presentationeditor/main/locale/en.json
+++ b/apps/presentationeditor/main/locale/en.json
@@ -625,6 +625,8 @@
"PE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server. 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. 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. 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. The text style will be displayed using one of the system fonts, the saved font will be used when it is available. 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. To change the master, click 'Apply to all' instead of 'Apply'",
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-changeslide.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-changeslide.png
index 982b2b1dc..acdcc6fe6 100644
Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-changeslide.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-changeslide.png differ
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-ic-zoomtoslide.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-ic-zoomtoslide.png
index afaad7999..2026ad226 100644
Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-ic-zoomtoslide.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-ic-zoomtoslide.png differ
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-slide.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-slide.png
index 484c844a4..3004ea3ae 100644
Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-slide.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-slide.png differ
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-thumbs.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-thumbs.png
index 011fab989..67136e3d7 100644
Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-thumbs.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-menu-thumbs.png differ
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-presenter-view.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-presenter-view.png
index b1a5c4f15..2ce1bb2aa 100644
Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-presenter-view.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-presenter-view.png differ
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-preview.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-preview.png
index a16b87683..c84bb8308 100644
Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-preview.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-preview.png differ
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe- exit-fullscreen.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe- exit-fullscreen.png
index 90f29a8bf..569de1241 100644
Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe- exit-fullscreen.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe- exit-fullscreen.png differ
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-fullscreen.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-fullscreen.png
index 7d242b17e..e9c8abd51 100644
Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-fullscreen.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-fullscreen.png differ
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-pause.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-pause.png
index 8f152d01e..78d36feba 100644
Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-pause.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-pause.png differ
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-play.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-play.png
index 1734c9b9a..44730da76 100644
Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-play.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-previwe-play.png differ
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-slidesize.png b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-slidesize.png
index 7cb166b8a..8f0bf6074 100644
Binary files a/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-slidesize.png and b/apps/presentationeditor/main/resources/img/toolbar/1.75x/btn-slidesize.png differ
diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js
index 6cb144489..9ebdba405 100644
--- a/apps/presentationeditor/mobile/app/controller/Main.js
+++ b/apps/presentationeditor/mobile/app/controller/Main.js
@@ -227,6 +227,14 @@ define([
if (!me.editorConfig.customization || !(me.editorConfig.customization.loaderName || me.editorConfig.customization.loaderLogo))
$('#editor_sdk').append('
' +
+ '',
+ 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. Please contact your Document Server administrator for details.',
errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed. 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. Do you want to run macros?',
+ textRemember: 'Remember my choice',
+ textYes: 'Yes',
+ textNo: 'No'
}
})(), PE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/presentationeditor/mobile/app/controller/Settings.js b/apps/presentationeditor/mobile/app/controller/Settings.js
index d902cdc49..c939fd041 100644
--- a/apps/presentationeditor/mobile/app/controller/Settings.js
+++ b/apps/presentationeditor/mobile/app/controller/Settings.js
@@ -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 || {};
diff --git a/apps/presentationeditor/mobile/app/controller/add/AddOther.js b/apps/presentationeditor/mobile/app/controller/add/AddOther.js
index 77308a714..675a89dd0 100644
--- a/apps/presentationeditor/mobile/app/controller/add/AddOther.js
+++ b/apps/presentationeditor/mobile/app/controller/add/AddOther.js
@@ -168,7 +168,7 @@ define([
},
onDoneComment: function(documentFlag) {
- var value = $('#comment-text').val();
+ var value = $('#comment-text').val().trim();
if (value.length > 0) {
PE.getController('Common.Controllers.Collaboration').onAddNewComment(value, documentFlag);
PE.getController('AddContainer').hideModal();
diff --git a/apps/presentationeditor/mobile/app/template/Settings.template b/apps/presentationeditor/mobile/app/template/Settings.template
index aa13a05ab..20012e9a2 100644
--- a/apps/presentationeditor/mobile/app/template/Settings.template
+++ b/apps/presentationeditor/mobile/app/template/Settings.template
@@ -476,7 +476,6 @@
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/template/ChartSettingsDlg.template b/apps/spreadsheeteditor/main/app/template/ChartSettingsDlg.template
index 3f2e877d2..afad9d985 100644
--- a/apps/spreadsheeteditor/main/app/template/ChartSettingsDlg.template
+++ b/apps/spreadsheeteditor/main/app/template/ChartSettingsDlg.template
@@ -41,7 +41,7 @@
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/template/LeftMenu.template b/apps/spreadsheeteditor/main/app/template/LeftMenu.template
index e01779e68..e39aeb9a5 100644
--- a/apps/spreadsheeteditor/main/app/template/LeftMenu.template
+++ b/apps/spreadsheeteditor/main/app/template/LeftMenu.template
@@ -12,10 +12,10 @@
-
-
-
+
+
+
-
+
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/template/PrintSettings.template b/apps/spreadsheeteditor/main/app/template/PrintSettings.template
index 370f4af71..f64b909a1 100644
--- a/apps/spreadsheeteditor/main/app/template/PrintSettings.template
+++ b/apps/spreadsheeteditor/main/app/template/PrintSettings.template
@@ -1,20 +1,20 @@
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/template/SlicerSettings.template b/apps/spreadsheeteditor/main/app/template/SlicerSettings.template
new file mode 100644
index 000000000..db9953804
--- /dev/null
+++ b/apps/spreadsheeteditor/main/app/template/SlicerSettings.template
@@ -0,0 +1,129 @@
+
+
+
+ <%= scope.textWidth %>
+
+
+
+
+
+
+ <%= scope.textHeight %>
+
+
+
+
+
+
+
+ <%= scope.textPosition %>
+
+
+
+
+ <%= scope.textHor %>
+
+
+
+ <%= scope.textVert %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%= scope.textButtons %>
+
+
+
+
+ <%= scope.textColumns %>
+
+
+
+
+
+ <%= scope.textWidth %>
+
+
+
+ <%= scope.textHeight %>
+
+
+
+
+
+
+
+
+
+
+ <%= scope.textStyle %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%= scope.strSorting %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%= scope.textAdvanced %>
+
+
+
+
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.template b/apps/spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.template
new file mode 100644
index 000000000..d61f2be90
--- /dev/null
+++ b/apps/spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.template
@@ -0,0 +1,119 @@
+
+
+
+
+ <%= scope.textHeader %>
+
+
+
+
+
<%= scope.strStyle %>
+
+
+
+
<%= scope.strSize %>
+
+
+ <%= scope.strWidth %>
+
+
+
+
+ <%= scope.strHeight %>
+
+
+
+
<%= scope.strButtons %>
+
+
+ <%= scope.strColumns %>
+
+
+
+ <%= scope.strHeight %>
+
+
+
+
+
+
+
+
+ <%= scope.textSort %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%= scope.textSourceName %>
+
+
+
+ <%= scope.textFormulaName %>
+
+
+
+ <%= scope.textName %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%= scope.textAltTitle %>
+
+
+
+
+
+ <%= scope.textAltDescription %>
+
+
+
+
+
+ <%= scope.textAltTip %>
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/template/StatusBar.template b/apps/spreadsheeteditor/main/app/template/StatusBar.template
index 0d913dd6d..0988bde4b 100644
--- a/apps/spreadsheeteditor/main/app/template/StatusBar.template
+++ b/apps/spreadsheeteditor/main/app/template/StatusBar.template
@@ -10,7 +10,7 @@
' + comment.username + '
' + - '' + comment.date + '
'; + template += '' + me.sliceQuote(comment.quote) + '
'; - template += ''; _.each(comment.replys, function (reply) { @@ -202,8 +202,8 @@ define([ if (isAndroid) { template += '' + reply.userInitials + ' '
}
- template += '' + reply.username + ' ' +
+ ' ' +
' ';
if (isAndroid) {
template += '';
@@ -212,7 +212,7 @@ define([
template += ' ';
}
template += '' +
- ' ' +
+ ' ' +
'';
});
template += '
' @@ -249,8 +249,8 @@ define([ '' + reply.username + '
' + - ' ' + + template += '<%= item.username %>
', - '<%= item.date %>
', + '<%= quote %>
', + '<%= item.comment %>
', + '', '<% _.each(item.replys, function (reply) { %>', @@ -271,15 +271,15 @@ define([ '',
' ',
- ' <% } %>',
'<% if (reply.editable && !viewmode) { %>',
' ',
'<% } %>',
' ',
+ ' ',
'',
'<% }); %>',
'
', diff --git a/apps/common/mobile/resources/less/ios/_collaboration.less b/apps/common/mobile/resources/less/ios/_collaboration.less index 919c94f6a..d958e12f4 100644 --- a/apps/common/mobile/resources/less/ios/_collaboration.less +++ b/apps/common/mobile/resources/less/ios/_collaboration.less @@ -145,10 +145,7 @@ padding: 16px 0; word-wrap: break-word; } - p { - margin: 0; - word-break: break-word; - } + .list-reply { padding-left: 26px; } @@ -176,6 +173,9 @@ margin: 0; max-width: 100%; padding-right: 15px; + pre { + white-space: pre-wrap; + } } .reply-item { margin-top: 15px; diff --git a/apps/common/mobile/resources/less/material/_collaboration.less b/apps/common/mobile/resources/less/material/_collaboration.less index a7439c97f..58fe43f98 100644 --- a/apps/common/mobile/resources/less/material/_collaboration.less +++ b/apps/common/mobile/resources/less/material/_collaboration.less @@ -143,10 +143,6 @@ } } } - p { - margin: 0; - word-break: break-word; - } .list-reply { padding-left: 26px; } @@ -173,6 +169,9 @@ margin: 0; max-width: 100%; padding-right: 15px; + pre { + white-space: pre-wrap; + } } .reply-item { padding-right: 16px; @@ -203,7 +202,7 @@ outline:none; width: 100%; font-size: 15px; - border: 1px solid #c4c4c4; + border: none; border-radius: 3px; min-height: 100px; } diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index dffc44187..8eef26616 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -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 // ------------------------- diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index e0d5c80d9..fd840b070 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -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")); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 4a093b4c0..1bdc5e809 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -384,6 +384,14 @@ define([ $('#editor-container').append('' + this.criticalErrorExtText; + config.msg += '
' + this.criticalErrorExtText; config.callback = function(btn) { if (btn == 'ok') Common.NotificationCenter.trigger('goback', true); @@ -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 + '
', + 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.
Do you want to run macros?', + textRemember: 'Remember my choice' } })(), DE.Controllers.Main || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/main/app/template/FileMenu.template b/apps/documenteditor/main/app/template/FileMenu.template index 35378e635..8bb022a44 100644 --- a/apps/documenteditor/main/app/template/FileMenu.template +++ b/apps/documenteditor/main/app/template/FileMenu.template @@ -1,37 +1,37 @@