From b8439d88fd26e31780d7a86e5f128f4beb71c785 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 4 Mar 2020 14:45:42 +0300 Subject: [PATCH] [DE][SSE] Change hyperlink settings: disable Ok button when no url or data range --- .../main/app/view/HyperlinkSettingsDialog.js | 15 +++++++++++---- .../main/app/view/HyperlinkSettingsDialog.js | 18 +++++++++++++----- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/apps/documenteditor/main/app/view/HyperlinkSettingsDialog.js b/apps/documenteditor/main/app/view/HyperlinkSettingsDialog.js index 0d7f8c0c2..680f99917 100644 --- a/apps/documenteditor/main/app/view/HyperlinkSettingsDialog.js +++ b/apps/documenteditor/main/app/view/HyperlinkSettingsDialog.js @@ -67,19 +67,22 @@ define([ }, options || {}); this.template = [ - '
', + '
', '
', '', '', '
', '', '', '
', '', @@ -134,6 +137,9 @@ define([ return (urltype>0) ? true : me.txtNotUrl; } }); + me.inputUrl._input.on('input', function (e) { + me.btnOk.setDisabled($.trim($(e.target).val())==''); + }); me.inputDisplay = new Common.UI.InputField({ el : $('#id-dlg-hyperlink-display'), @@ -247,12 +253,13 @@ define([ } } store.reset(arr); + this.internalList.collapseAll(); } var rec = this.internalList.getSelectedRec(); this.btnOk.setDisabled(!rec || rec.get('level')==0 && rec.get('index')>0); } else - this.btnOk.setDisabled(false); + this.btnOk.setDisabled($.trim(this.inputUrl.getValue())==''); }, onLinkTypeClick: function(type, btn, event) { diff --git a/apps/spreadsheeteditor/main/app/view/HyperlinkSettingsDialog.js b/apps/spreadsheeteditor/main/app/view/HyperlinkSettingsDialog.js index ff1ad9e0a..3dc4764a5 100644 --- a/apps/spreadsheeteditor/main/app/view/HyperlinkSettingsDialog.js +++ b/apps/spreadsheeteditor/main/app/view/HyperlinkSettingsDialog.js @@ -71,13 +71,13 @@ define([ '
', '', '