Commit 79eed8c2 by pratik24mac Committed by Madhan Neethiraj

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

parent 0adfa8f4
...@@ -118,6 +118,7 @@ define(['require', ...@@ -118,6 +118,7 @@ define(['require',
_.extend(endDateObj, { "minDate": that.ui.startTime.val() }) _.extend(endDateObj, { "minDate": that.ui.startTime.val() })
that.endDateInitialize(endDateObj); that.endDateInitialize(endDateObj);
that.model.set('startTime', that.ui.startTime.val()); that.model.set('startTime', that.ui.startTime.val());
that.buttonActive({ isButtonActive: true });
}).on('cancel.daterangepicker', function(ev, picker) { }).on('cancel.daterangepicker', function(ev, picker) {
that.ui.startTime.val(''); that.ui.startTime.val('');
delete endDateObj.minDate; delete endDateObj.minDate;
...@@ -125,6 +126,7 @@ define(['require', ...@@ -125,6 +126,7 @@ define(['require',
that.model.set('startTime', that.ui.startTime.val()); that.model.set('startTime', that.ui.startTime.val());
}); });
this.endDateInitialize(endDateObj); this.endDateInitialize(endDateObj);
this.buttonActive({ isButtonActive: true });
}, },
buttonActive: function(option) { buttonActive: function(option) {
var that = this; var that = this;
...@@ -134,13 +136,15 @@ define(['require', ...@@ -134,13 +136,15 @@ define(['require',
} }
}, },
onCloseButton: function() { onCloseButton: function() {
if (this.tagModel) {
this.buttonActive({ isButtonActive: true });
}
if (this.parentView.collection.models.length > 0) { if (this.parentView.collection.models.length > 0) {
this.model.destroy(); this.model.destroy();
} }
if (this.parentView.collection.models.length <= 0) { if (this.parentView.collection.models.length <= 0) {
this.parentView.ui.timeZoneDiv.hide(); this.parentView.ui.timeZoneDiv.hide();
this.parentView.ui.checkTimeZone.prop('checked', false); this.parentView.ui.checkTimeZone.prop('checked', false);
this.parentView.modal.$el.find('button.ok').attr("disabled", true);
} }
}, },
endDateInitialize: function(option) { endDateInitialize: function(option) {
...@@ -148,6 +152,7 @@ define(['require', ...@@ -148,6 +152,7 @@ define(['require',
this.ui.endTime.daterangepicker(option).on('apply.daterangepicker', function(ev, picker) { 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.ui.endTime.val(picker.startDate.format('YYYY/MM/DD hh:mm:ss'));
that.model.set('endTime', that.ui.endTime.val()); that.model.set('endTime', that.ui.endTime.val());
that.buttonActive({ isButtonActive: true });
}).on('cancel.daterangepicker', function(ev, picker) { }).on('cancel.daterangepicker', function(ev, picker) {
that.ui.endTime.val(''); that.ui.endTime.val('');
that.model.set('endTime', that.ui.endTime.val()); that.model.set('endTime', that.ui.endTime.val());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment