atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject atlas git commit: ATLAS-2713: Glossary UI: enable assign button only when correct object-type is selected
Date Thu, 24 May 2018 00:16:32 GMT
Repository: atlas
Updated Branches:
  refs/heads/master 1616b3f9e -> c950c9bde


ATLAS-2713: Glossary UI: enable assign button only when correct object-type is selected

Signed-off-by: Madhan Neethiraj <madhan@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/c950c9bd
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/c950c9bd
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/c950c9bd

Branch: refs/heads/master
Commit: c950c9bdefc258d83dfbaed2087fb3e3cc062e62
Parents: 1616b3f
Author: kevalbhatt <kbhatt@apache.org>
Authored: Wed May 23 17:37:37 2018 +0530
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Wed May 23 17:16:21 2018 -0700

----------------------------------------------------------------------
 dashboardv2/public/js/views/glossary/AssignTermLayoutView.js | 8 +++++++-
 dashboardv2/public/js/views/glossary/GlossaryLayoutView.js   | 7 ++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/c950c9bd/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js b/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js
index 69aa4d0..76c9bde 100644
--- a/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js
+++ b/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js
@@ -87,6 +87,7 @@ define(['require',
                     "mainClass": "wizard-modal"
                 });
                 this.modal.open();
+                this.modal.$el.find('button.ok').attr("disabled", true);
                 this.modal.on('closeModal', function() {
                     that.modal.trigger('cancel');
                     if (that.assignTermError && that.hideLoader) {
@@ -99,8 +100,13 @@ define(['require',
                 this.modal.on('ok', function() {
                     that.assignTerm();
                 });
+                this.bindEvents();
+            },
+            bindEvents: function() {
+                this.listenTo(this.glossaryCollection, "node_selected", function(skip) {
+                    this.modal.$el.find('button.ok').attr("disabled", false);
+                }, this);
             },
-            bindEvents: function() {},
             onRender: function() {
                 this.renderGlossaryTree();
                 var that = this;

http://git-wip-us.apache.org/repos/asf/atlas/blob/c950c9bd/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
index cda2ea5..0dcd4a3 100644
--- a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
+++ b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
@@ -256,7 +256,11 @@ define(['require',
                     var objGuid = options.objGuid,
                         node = options.node,
                         index = options.index;
-                    if (!that.guid) {
+                    if (that.isAssignView) {
+                        return {
+                            'opened': true
+                        }
+                    } else if (!that.guid) {
                         that.query[that.viewType].isNodeNotFoundAtLoad = false;
                         var selectedItem = {
                             "type": "Glossary",
@@ -461,6 +465,7 @@ define(['require',
                             .on("select_node.jstree", function(e, data) {
                                 if (that.isAssignView) {
                                     that.glossary.selectedItem = data.node.original;
+                                    that.glossaryCollection.trigger("node_selected");
                                 } else {
                                     var popoverClassName = (type == "term" ? '.termPopover'
: '.categoryPopover'),
                                         currentClickedPopoverEl = "";


Mime
View raw message