Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
d7591bc0
Commit
d7591bc0
authored
Dec 11, 2012
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show the timezone and current time (on tooltip)
parent
c4f4da5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
cms/static/js/views/settings/main_settings_view.js
+11
-0
No files found.
cms/static/js/views/settings/main_settings_view.js
View file @
d7591bc0
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment