diff --git a/apps/documenteditor/main/app/template/WatermarkSettings.template b/apps/documenteditor/main/app/template/WatermarkSettings.template
new file mode 100644
index 0000000000..e4ba28a5de
--- /dev/null
+++ b/apps/documenteditor/main/app/template/WatermarkSettings.template
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js
index 52ac4b22de..b34785982a 100644
--- a/apps/documenteditor/main/app/view/Toolbar.js
+++ b/apps/documenteditor/main/app/view/Toolbar.js
@@ -1015,8 +1015,32 @@ define([
caption: me.capImgWrapping,
menu: true
});
+
+ me.btnWatermark = new Common.UI.Button({
+ cls: 'btn-toolbar x-huge icon-top',
+ iconCls: 'btn-pageorient',
+ caption: me.capBtnWatermark,
+ menu: new Common.UI.Menu({
+ cls: 'ppm-toolbar',
+ items: [
+ {
+ caption: this.textAddWatermark,
+ value: 'add'
+ },
+ // {
+ // caption: this.textEditWatermark,
+ // value: 'add'
+ // },
+ {
+ caption: this.textRemWatermark,
+ value: 'remove'
+ }
+ ]
+ })
+ });
+
me.toolbarControls.push(me.btnImgAlign,
- me.btnImgGroup, me.btnImgForward, me.btnImgBackward, me.btnImgWrapping);
+ me.btnImgGroup, me.btnImgForward, me.btnImgBackward, me.btnImgWrapping, me.btnWatermark);
//
// Menus
@@ -1322,6 +1346,7 @@ define([
_injectComponent('#slot-img-movefrwd', this.btnImgForward);
_injectComponent('#slot-img-movebkwd', this.btnImgBackward);
_injectComponent('#slot-img-wrapping', this.btnImgWrapping);
+ _injectComponent('#slot-btn-watermark', this.btnWatermark);
+function injectBreakButtons() {
var me = this;
@@ -1545,6 +1570,8 @@ define([
}
]
}));
+
+ me.btnWatermark.updateHint(me.tipWatermark);
});
},
@@ -2432,7 +2459,12 @@ define([
txtDistribVert: 'Distribute Vertically',
txtPageAlign: 'Align to Page',
txtMarginAlign: 'Align to Margin',
- txtObjectsAlign: 'Align Selected Objects'
+ txtObjectsAlign: 'Align Selected Objects',
+ capBtnWatermark: 'Watermark',
+ textAddWatermark: 'Add Watermark',
+ textEditWatermark: 'Edit Watermark',
+ textRemWatermark: 'Remove Watermark',
+ tipWatermark: 'Insert watermark'
}
})(), DE.Views.Toolbar || {}));
});
diff --git a/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js b/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js
new file mode 100644
index 0000000000..98fb9ce6f8
--- /dev/null
+++ b/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js
@@ -0,0 +1,449 @@
+/*
+ *
+ * (c) Copyright Ascensio System SIA 2010-2019
+ *
+ * This program is a free software product. You can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License (AGPL)
+ * version 3 as published by the Free Software Foundation. In accordance with
+ * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement
+ * of any third-party rights.
+ *
+ * This program is distributed WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
+ * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+ *
+ * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
+ * street, Riga, Latvia, EU, LV-1050.
+ *
+ * The interactive user interfaces in modified source and object code versions
+ * of the Program must display Appropriate Legal Notices, as required under
+ * Section 5 of the GNU AGPL version 3.
+ *
+ * Pursuant to Section 7(b) of the License you must retain the original Product
+ * logo when distributing the program. Pursuant to Section 7(e) we decline to
+ * grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as
+ * well as technical writing content are licensed under the terms of the
+ * Creative Commons Attribution-ShareAlike 4.0 International. See the License
+ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+ *
+ */
+
+/**
+ * WatermarkSettingsDialog.js.js
+ *
+ * Created by Julia Radzhabova on 04.04.2019
+ * Copyright (c) 2019 Ascensio System SIA. All rights reserved.
+ *
+ */
+
+define(['text!documenteditor/main/app/template/WatermarkSettings.template',
+ 'common/main/lib/util/utils',
+ 'common/main/lib/component/RadioBox',
+ 'common/main/lib/component/InputField',
+ 'common/main/lib/view/AdvancedSettingsWindow'
+], function (template) { 'use strict';
+
+ DE.Views.WatermarkSettingsDialog = Common.Views.AdvancedSettingsWindow.extend(_.extend({
+ options: {
+ contentWidth: 400,
+ height: 442
+ },
+
+ initialize : function(options) {
+ var me = this;
+
+ _.extend(this.options, {
+ title: this.textTitle,
+ template: _.template(
+ [
+ '