diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js
index 75a3f4ca8d..4abab931f0 100644
--- a/apps/documenteditor/main/app/view/DocumentHolder.js
+++ b/apps/documenteditor/main/app/view/DocumentHolder.js
@@ -1234,6 +1234,9 @@ define([
me.menuTableRefreshField = new Common.UI.MenuItem({
caption: me.textRefreshField
});
+ me.menuTableEditField = new Common.UI.MenuItem({
+ caption: me.textEditField
+ });
var menuTableFieldSeparator = new Common.UI.MenuItem({
caption : '--'
@@ -1342,7 +1345,7 @@ define([
var isEquation= (value.mathProps && value.mathProps.value);
- for (var i = 11; i < 30; i++) {
+ for (var i = 11; i < 31; i++) { // from menuEquationSeparatorInTable to menuAddCommentTable (except menuAddCommentTable)
me.tableMenu.items[i].setVisible(!isEquation);
}
@@ -1385,8 +1388,8 @@ define([
var block_control_lock = (value.paraProps) ? !value.paraProps.value.can_EditBlockContentControl() : false,
disabled = value.tableProps.locked || (value.headerProps!==undefined && value.headerProps.locked);
- me.tableMenu.items[14].setDisabled(disabled);
- me.tableMenu.items[15].setDisabled(disabled);
+ me.menuTableInsertText.setDisabled(disabled);
+ me.menuTableDeleteText.setDisabled(disabled);
if (me.api) {
me.mnuTableMerge.setDisabled(disabled || !me.api.CheckBeforeMergeCells());
@@ -1544,6 +1547,8 @@ define([
var in_field = me.api.asc_HaveFields(true);
me.menuTableRefreshField.setVisible(!!in_field);
me.menuTableRefreshField.setDisabled(disabled);
+ me.menuTableEditField.setVisible(!!in_field);
+ me.menuTableEditField.setDisabled(disabled);
menuTableFieldSeparator.setVisible(!!in_field);
},
items: [
@@ -1559,6 +1564,7 @@ define([
menuTableReviewSeparator,
menuEquationSeparatorInTable,
me.menuTableRefreshField,
+ me.menuTableEditField,
menuTableFieldSeparator,
me.menuTableSelectText,
me.menuTableInsertText,
@@ -1905,6 +1911,9 @@ define([
me.menuParaRefreshField = new Common.UI.MenuItem({
caption: me.textRefreshField
});
+ me.menuParaEditField = new Common.UI.MenuItem({
+ caption: me.textEditField
+ });
var menuParaFieldSeparator = new Common.UI.MenuItem({
caption : '--'
@@ -2146,6 +2155,8 @@ define([
var in_field = me.api.asc_HaveFields(true);
me.menuParaRefreshField.setVisible(!!in_field);
me.menuParaRefreshField.setDisabled(disabled);
+ me.menuParaEditField.setVisible(!!in_field);
+ me.menuParaEditField.setDisabled(disabled);
menuParaFieldSeparator.setVisible(!!in_field);
var listId = me.api.asc_GetCurrentNumberingId(),
@@ -2193,6 +2204,7 @@ define([
me.menuParaControlSettings,
menuParaControlSeparator,
me.menuParaRefreshField,
+ me.menuParaEditField,
menuParaFieldSeparator,
me.menuParaTOCSettings,
me.menuParaTOCRefresh,
@@ -3438,7 +3450,8 @@ define([
txtInsImage: 'Insert image from File',
txtInsImageUrl: 'Insert image from URL',
textClearField: 'Clear field',
- textRedo: 'Redo'
+ textRedo: 'Redo',
+ textEditField: 'Edit field'
}, DE.Views.DocumentHolder || {}));
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/view/FieldDialog.js b/apps/documenteditor/main/app/view/FieldDialog.js
new file mode 100644
index 0000000000..e113b1e74f
--- /dev/null
+++ b/apps/documenteditor/main/app/view/FieldDialog.js
@@ -0,0 +1,131 @@
+/*
+ * (c) Copyright Ascensio System SIA 2010-2024
+ *
+ * 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-6 Ernesta Birznieka-Upish
+ * 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
+ *
+ */
+/**
+ * FieldDialog.js
+ *
+ * Created on 08/08/24
+ *
+ */
+
+define([], function () { 'use strict';
+
+ DE.Views.FieldDialog = Common.UI.Window.extend(_.extend({
+ options: {
+ width: 450,
+ cls: 'modal-dlg',
+ buttons: ['ok', 'cancel']
+ },
+
+ initialize : function(options) {
+ _.extend(this.options, options || {});
+ _.extend(this.options, {
+ title: this.textTitle
+ }, options || {});
+
+ this.template = [
+ '