Commit d7591bc0 by Don Mitchell

Show the timezone and current time (on tooltip)

parent c4f4da5e
......@@ -54,6 +54,7 @@ CMS.Views.Settings.Main = Backbone.View.extend({
// allow navigation between the tabs
events: {
'click .settings-page-menu a': "showSettingsTab",
'mouseover #timezone' : "updateTime"
},
currentTab: null,
......@@ -91,6 +92,9 @@ CMS.Views.Settings.Main = Backbone.View.extend({
}
else this.subviews[this.currentTab].render();
var dateIntrospect = new Date();
this.$el.find('#timezone').html("(" + dateIntrospect.getTimezone() + ")");
return this;
},
......@@ -117,6 +121,13 @@ CMS.Views.Settings.Main = Backbone.View.extend({
}
},
updateTime : function(e) {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
$(e.currentTarget).attr('title', (hours % 12 == 0 ? 12 : hours % 12) + ":" + (minutes < 10 ? "0" : "") + now.getMinutes() + (hours < 12 ? "am" : "pm"));
},
showSettingsTab: function(e) {
this.currentTab = $(e.target).attr('data-section');
$('.settings-page-section > section').hide();
......
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