Commit 91926971 by kevalbhatt

ATLAS-3986: UI Allow user to update the date format from JAVA property file #1

parent 2f766f5c
...@@ -279,8 +279,8 @@ require(['App', ...@@ -279,8 +279,8 @@ require(['App',
Globals.dateFormat = dateFormatSeperated[0]; //date Globals.dateFormat = dateFormatSeperated[0]; //date
} }
} }
if (response['atlas.ui.date.timezone'] !== undefined) { if (response['atlas.ui.date.timezone.format.enabled'] !== undefined) {
Globals.isDateTimeZone = response['atlas.ui.date.timezone']; Globals.isTimezoneFormatEnabled = response['atlas.ui.date.timezone.format.enabled'];
} }
} }
--that.asyncFetchCounter; --that.asyncFetchCounter;
......
...@@ -44,7 +44,7 @@ define(["require"], function(require) { ...@@ -44,7 +44,7 @@ define(["require"], function(require) {
// Date Format // Date Format
Globals.dateTimeFormat = "MM/DD/YYYY hh:mm:ss A"; Globals.dateTimeFormat = "MM/DD/YYYY hh:mm:ss A";
Globals.dateFormat = "MM/DD/YYYY"; Globals.dateFormat = "MM/DD/YYYY";
Globals.isDateTimeZone = true; Globals.isTimezoneFormatEnabled = true;
return Globals; return Globals;
}); });
\ No newline at end of file
...@@ -935,7 +935,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums', ...@@ -935,7 +935,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
if (isValidDate === false && options && options.defaultDate !== false) { if (isValidDate === false && options && options.defaultDate !== false) {
dateValue = moment().format(dateFormat); dateValue = moment().format(dateFormat);
} }
if (Globals.isDateTimeZone) { if (Globals.isTimezoneFormatEnabled) {
if (!options || options && options.zone !== false) { if (!options || options && options.zone !== false) {
dateValue += " (" + moment.tz(moment.tz.guess()).zoneAbbr() + ")"; dateValue += " (" + moment.tz(moment.tz.guess()).zoneAbbr() + ")";
} }
......
...@@ -308,8 +308,8 @@ require(['App', ...@@ -308,8 +308,8 @@ require(['App',
Globals.dateFormat = dateFormatSeperated[0]; //date Globals.dateFormat = dateFormatSeperated[0]; //date
} }
} }
if (response['atlas.ui.date.timezone'] !== undefined) { if (response['atlas.ui.date.timezone.format.enabled'] !== undefined) {
Globals.isDateTimeZone = response['atlas.ui.date.timezone']; Globals.isTimezoneFormatEnabled = response['atlas.ui.date.timezone.format.enabled'];
} }
} }
--that.asyncFetchCounter; --that.asyncFetchCounter;
......
...@@ -44,7 +44,7 @@ define(["require"], function(require) { ...@@ -44,7 +44,7 @@ define(["require"], function(require) {
// Date Format // Date Format
Globals.dateTimeFormat = "MM/DD/YYYY hh:mm:ss A"; Globals.dateTimeFormat = "MM/DD/YYYY hh:mm:ss A";
Globals.dateFormat = "MM/DD/YYYY"; Globals.dateFormat = "MM/DD/YYYY";
Globals.isDateTimeZone = true; Globals.isTimezoneFormatEnabled = true;
return Globals; return Globals;
}); });
\ No newline at end of file
...@@ -940,7 +940,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums', ...@@ -940,7 +940,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
if (isValidDate === false && options && options.defaultDate !== false) { if (isValidDate === false && options && options.defaultDate !== false) {
dateValue = moment().format(dateFormat); dateValue = moment().format(dateFormat);
} }
if (Globals.isDateTimeZone) { if (Globals.isTimezoneFormatEnabled) {
if (!options || options && options.zone !== false) { if (!options || options && options.zone !== false) {
dateValue += " (" + moment.tz(moment.tz.guess()).zoneAbbr() + ")"; dateValue += " (" + moment.tz(moment.tz.guess()).zoneAbbr() + ")";
} }
......
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