Repository: atlas Updated Branches: refs/heads/branch-1.0 32a87a314 -> a08d8860f
ATLAS-2742: UI : Timezone is set to blank when not set while saving classification to entities Signed-off-by: nixonrodrigues <[email protected]> (cherry picked from commit ecc4e4d2ed6442c16fba9598ef2a733113dc247d) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/a08d8860 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/a08d8860 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/a08d8860 Branch: refs/heads/branch-1.0 Commit: a08d8860f401284b80065d076e01db1a4736cbef Parents: 32a87a3 Author: Abhishek Kadam <[email protected]> Authored: Wed Jun 6 19:23:33 2018 +0530 Committer: Madhan Neethiraj <[email protected]> Committed: Thu Jun 7 07:43:13 2018 -0700 ---------------------------------------------------------------------- dashboardv2/public/js/views/tag/AddTimezoneItemView.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/a08d8860/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 371cd04..3deab83 100644 --- a/dashboardv2/public/js/views/tag/AddTimezoneItemView.js +++ b/dashboardv2/public/js/views/tag/AddTimezoneItemView.js @@ -89,7 +89,6 @@ define(['require', this.ui.timeZone.html(tzstr); this.ui.timeZone.select2({ - allowClear: true, data: moment.tz.names() }); @@ -108,7 +107,9 @@ define(['require', endDateObj["minDate"] = this.model.get('startTime'); endDateObj["startDate"] = this.model.get('endTime'); } - this.ui.timeZone.val(this.model.get('timeZone')).trigger("change", { 'manual': true }); + if (!_.isEmpty(this.model.get('timeZone'))) { + this.ui.timeZone.val(this.model.get('timeZone')).trigger("change", { 'manual': true }); + } } else { this.model.set('startTime', that.ui.startTime.val()); this.model.set('endTime', that.ui.endTime.val()); @@ -126,7 +127,7 @@ define(['require', that.model.set('startTime', that.ui.startTime.val()); }); this.endDateInitialize(endDateObj); - this.buttonActive({ isButtonActive: true }); + this.buttonActive({ isButtonActive: true }); }, buttonActive: function(option) { var that = this;
