ATLAS-2543: UI - edit classification window has update button disabled

Signed-off-by: Madhan Neethiraj <[email protected]>


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

Branch: refs/heads/master
Commit: 79eed8c23ee123f95b596d3ea93ed607a8c450d5
Parents: 0adfa8f
Author: pratik24mac <[email protected]>
Authored: Tue Apr 10 14:45:29 2018 +0530
Committer: Madhan Neethiraj <[email protected]>
Committed: Thu Apr 12 10:38:29 2018 -0700

----------------------------------------------------------------------
 dashboardv2/public/js/views/tag/AddTimezoneItemView.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/79eed8c2/dashboardv2/public/js/views/tag/AddTimezoneItemView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/tag/AddTimezoneItemView.js 
b/dashboardv2/public/js/views/tag/AddTimezoneItemView.js
index ea2e9dc..371cd04 100644
--- a/dashboardv2/public/js/views/tag/AddTimezoneItemView.js
+++ b/dashboardv2/public/js/views/tag/AddTimezoneItemView.js
@@ -118,6 +118,7 @@ define(['require',
                     _.extend(endDateObj, { "minDate": that.ui.startTime.val() 
})
                     that.endDateInitialize(endDateObj);
                     that.model.set('startTime', that.ui.startTime.val());
+                    that.buttonActive({ isButtonActive: true });
                 }).on('cancel.daterangepicker', function(ev, picker) {
                     that.ui.startTime.val('');
                     delete endDateObj.minDate;
@@ -125,6 +126,7 @@ define(['require',
                     that.model.set('startTime', that.ui.startTime.val());
                 });
                 this.endDateInitialize(endDateObj);
+                 this.buttonActive({ isButtonActive: true });
             },
             buttonActive: function(option) {
                 var that = this;
@@ -134,13 +136,15 @@ define(['require',
                 }
             },
             onCloseButton: function() {
+                if (this.tagModel) {
+                    this.buttonActive({ isButtonActive: true });
+                }
                 if (this.parentView.collection.models.length > 0) {
                     this.model.destroy();
                 }
                 if (this.parentView.collection.models.length <= 0) {
                     this.parentView.ui.timeZoneDiv.hide();
                     this.parentView.ui.checkTimeZone.prop('checked', false);
-                    
this.parentView.modal.$el.find('button.ok').attr("disabled", true);
                 }
             },
             endDateInitialize: function(option) {
@@ -148,6 +152,7 @@ define(['require',
                 
this.ui.endTime.daterangepicker(option).on('apply.daterangepicker', 
function(ev, picker) {
                     that.ui.endTime.val(picker.startDate.format('YYYY/MM/DD 
hh:mm:ss'));
                     that.model.set('endTime', that.ui.endTime.val());
+                    that.buttonActive({ isButtonActive: true });
                 }).on('cancel.daterangepicker', function(ev, picker) {
                     that.ui.endTime.val('');
                     that.model.set('endTime', that.ui.endTime.val());

Reply via email to