diff --git a/apps/presentationeditor/main/resources/img/toolbar/1.5x/big/btn-datetime.png b/apps/common/main/resources/img/toolbar/1.5x/big/btn-datetime.png
similarity index 100%
rename from apps/presentationeditor/main/resources/img/toolbar/1.5x/big/btn-datetime.png
rename to apps/common/main/resources/img/toolbar/1.5x/big/btn-datetime.png
diff --git a/apps/presentationeditor/main/resources/img/toolbar/1x/big/btn-datetime.png b/apps/common/main/resources/img/toolbar/1x/big/btn-datetime.png
similarity index 100%
rename from apps/presentationeditor/main/resources/img/toolbar/1x/big/btn-datetime.png
rename to apps/common/main/resources/img/toolbar/1x/big/btn-datetime.png
diff --git a/apps/presentationeditor/main/resources/img/toolbar/2x/big/btn-datetime.png b/apps/common/main/resources/img/toolbar/2x/big/btn-datetime.png
similarity index 100%
rename from apps/presentationeditor/main/resources/img/toolbar/2x/big/btn-datetime.png
rename to apps/common/main/resources/img/toolbar/2x/big/btn-datetime.png
diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index da5f1e5dd..fb6a6c2e8 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -59,7 +59,8 @@ define([
'documenteditor/main/app/view/ControlSettingsDialog',
'documenteditor/main/app/view/WatermarkSettingsDialog',
'documenteditor/main/app/view/CompareSettingsDialog',
- 'documenteditor/main/app/view/ListSettingsDialog'
+ 'documenteditor/main/app/view/ListSettingsDialog',
+ 'documenteditor/main/app/view/DateTimeDialog'
], function () {
'use strict';
@@ -322,6 +323,7 @@ define([
toolbar.btnMailRecepients.on('click', _.bind(this.onSelectRecepientsClick, this));
toolbar.mnuPageNumberPosPicker.on('item:click', _.bind(this.onInsertPageNumberClick, this));
toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderFooterClick, this));
+ toolbar.btnInsDateTime.on('click', _.bind(this.onInsDateTimeClick, this));
toolbar.mnuPageNumCurrentPos.on('click', _.bind(this.onPageNumCurrentPosClick, this));
toolbar.mnuInsertPageCount.on('click', _.bind(this.onInsertPageCountClick, this));
toolbar.btnBlankPage.on('click', _.bind(this.onBtnBlankPageClick, this));
@@ -850,6 +852,7 @@ define([
toolbar.btnInsertEquation.setDisabled(need_disable);
toolbar.btnInsertSymbol.setDisabled(!in_para || paragraph_locked || header_locked || rich_edit_lock || plain_edit_lock || rich_del_lock || plain_del_lock);
+ toolbar.btnInsDateTime.setDisabled(!in_para || paragraph_locked || header_locked || rich_edit_lock || plain_edit_lock || rich_del_lock || plain_del_lock);
need_disable = paragraph_locked || header_locked || in_equation || rich_edit_lock || plain_edit_lock;
toolbar.btnSuperscript.setDisabled(need_disable);
@@ -3031,6 +3034,23 @@ define([
this._state.lang = langId;
},
+ onInsDateTimeClick: function() {
+ //insert date time
+ var me = this;
+ (new DE.Views.DateTimeDialog({
+ api: this.api,
+ lang: this._state.lang,
+ handler: function(result, value) {
+ if (result == 'ok') {
+ if (me.api) {
+ me.api.asc_addDateTime(value);
+ }
+ }
+ Common.NotificationCenter.trigger('edit:complete', me.toolbar);
+ }
+ })).show();
+ },
+
textEmptyImgUrl : 'You need to specify image URL.',
textWarning : 'Warning',
textFontSizeErr : 'The entered value is incorrect. Please enter a numeric value between 1 and 100',
diff --git a/apps/documenteditor/main/app/template/Toolbar.template b/apps/documenteditor/main/app/template/Toolbar.template
index ff945a3a9..37f13e618 100644
--- a/apps/documenteditor/main/app/template/Toolbar.template
+++ b/apps/documenteditor/main/app/template/Toolbar.template
@@ -83,7 +83,6 @@
-
@@ -97,8 +96,13 @@
-
+
+
+
+
+
+
diff --git a/apps/documenteditor/main/app/view/DateTimeDialog.js b/apps/documenteditor/main/app/view/DateTimeDialog.js
new file mode 100644
index 000000000..1ddd84b95
--- /dev/null
+++ b/apps/documenteditor/main/app/view/DateTimeDialog.js
@@ -0,0 +1,247 @@
+/*
+ *
+ * (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
+ *
+ */
+/**
+ * DateTimeDialog.js
+ *
+ * Created by Julia Radzhabova on 26.06.2019
+ * Copyright (c) 2019 Ascensio System SIA. All rights reserved.
+ *
+ */
+
+define([
+ 'common/main/lib/component/Window',
+ 'common/main/lib/component/ComboBox',
+ 'common/main/lib/component/ListView'
+], function () {
+ 'use strict';
+
+ DE.Views.DateTimeDialog = Common.UI.Window.extend(_.extend({
+ options: {
+ width: 350,
+ style: 'min-width: 230px;',
+ cls: 'modal-dlg',
+ buttons: ['ok', 'cancel']
+ },
+
+ initialize : function (options) {
+ var t = this,
+ _options = {};
+
+ _.extend(this.options, {
+ title: this.txtTitle
+ }, options || {});
+
+ this.template = [
+ '