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
056bad4c
Commit
056bad4c
authored
Dec 12, 2012
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Time zone prompt change and tooltip
CodeMirror on overview entry
parent
d7591bc0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
cms/static/js/views/settings/main_settings_view.js
+19
-2
cms/templates/settings.html
+4
-4
No files found.
cms/static/js/views/settings/main_settings_view.js
View file @
056bad4c
...
@@ -125,7 +125,8 @@ CMS.Views.Settings.Main = Backbone.View.extend({
...
@@ -125,7 +125,8 @@ CMS.Views.Settings.Main = Backbone.View.extend({
var
now
=
new
Date
();
var
now
=
new
Date
();
var
hours
=
now
.
getHours
();
var
hours
=
now
.
getHours
();
var
minutes
=
now
.
getMinutes
();
var
minutes
=
now
.
getMinutes
();
$
(
e
.
currentTarget
).
attr
(
'title'
,
(
hours
%
12
==
0
?
12
:
hours
%
12
)
+
":"
+
(
minutes
<
10
?
"0"
:
""
)
+
now
.
getMinutes
()
+
(
hours
<
12
?
"am"
:
"pm"
));
$
(
e
.
currentTarget
).
attr
(
'title'
,
(
hours
%
12
==
0
?
12
:
hours
%
12
)
+
":"
+
(
minutes
<
10
?
"0"
:
""
)
+
now
.
getMinutes
()
+
(
hours
<
12
?
"am"
:
"pm"
)
+
" (current local time)"
);
},
},
showSettingsTab
:
function
(
e
)
{
showSettingsTab
:
function
(
e
)
{
...
@@ -147,7 +148,8 @@ CMS.Views.Settings.Details = CMS.Views.ValidatingView.extend({
...
@@ -147,7 +148,8 @@ CMS.Views.Settings.Details = CMS.Views.ValidatingView.extend({
"blur textarea"
:
"updateModel"
,
"blur textarea"
:
"updateModel"
,
'click .remove-course-syllabus'
:
"removeSyllabus"
,
'click .remove-course-syllabus'
:
"removeSyllabus"
,
'click .new-course-syllabus'
:
'assetSyllabus'
,
'click .new-course-syllabus'
:
'assetSyllabus'
,
'click .remove-course-introduction-video'
:
"removeVideo"
'click .remove-course-introduction-video'
:
"removeVideo"
,
'focus #course-overview'
:
"codeMirrorize"
},
},
initialize
:
function
()
{
initialize
:
function
()
{
// TODO move the html frag to a loaded asset
// TODO move the html frag to a loaded asset
...
@@ -264,6 +266,21 @@ CMS.Views.Settings.Details = CMS.Views.ValidatingView.extend({
...
@@ -264,6 +266,21 @@ CMS.Views.Settings.Details = CMS.Views.ValidatingView.extend({
this
.
$el
.
find
(
".current-course-introduction-video iframe"
).
attr
(
"src"
,
""
);
this
.
$el
.
find
(
".current-course-introduction-video iframe"
).
attr
(
"src"
,
""
);
this
.
$el
.
find
(
this
.
fieldToSelectorMap
[
'intro_video'
]).
val
(
""
);
this
.
$el
.
find
(
this
.
fieldToSelectorMap
[
'intro_video'
]).
val
(
""
);
}
}
},
codeMirrors
:
{},
codeMirrorize
:
function
(
e
)
{
if
(
!
this
.
codeMirrors
[
e
.
currentTarget
.
id
])
{
var
cachethis
=
this
;
var
field
=
this
.
selectorToField
[
'#'
+
e
.
currentTarget
.
id
];
this
.
codeMirrors
[
e
.
currentTarget
.
id
]
=
CodeMirror
.
fromTextArea
(
e
.
currentTarget
,
{
mode
:
"text/html"
,
lineNumbers
:
true
,
lineWrapping
:
true
,
onBlur
:
function
(
mirror
)
{
mirror
.
save
();
cachethis
.
clearValidationErrors
();
cachethis
.
model
.
save
(
field
,
mirror
.
getValue
());
}
});
}
}
}
});
});
...
...
cms/templates/settings.html
View file @
056bad4c
...
@@ -122,7 +122,7 @@ from contentstore import utils
...
@@ -122,7 +122,7 @@ from contentstore import utils
<div
class=
"group"
>
<div
class=
"group"
>
<label
for=
"course-start-time"
>
Start Time
</label>
<label
for=
"course-start-time"
>
Start Time
</label>
<input
type=
"text"
class=
"time start timepicker"
id=
"course-start-time"
value=
""
placeholder=
"HH:MM"
autocomplete=
"off"
>
<input
type=
"text"
class=
"time start timepicker"
id=
"course-start-time"
value=
""
placeholder=
"HH:MM"
autocomplete=
"off"
>
<span
class=
"tip tip-stacked"
>
(UTC/GMT -5 hours)
</span>
<span
class=
"tip tip-stacked"
id=
"timezone"
>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -138,7 +138,7 @@ from contentstore import utils
...
@@ -138,7 +138,7 @@ from contentstore import utils
<div
class=
"group"
>
<div
class=
"group"
>
<label
for=
"course-end-time"
>
End Time
</label>
<label
for=
"course-end-time"
>
End Time
</label>
<input
type=
"text"
class=
"time end"
id=
"course-end-time"
value=
""
placeholder=
"HH:MM"
autocomplete=
"off"
>
<input
type=
"text"
class=
"time end"
id=
"course-end-time"
value=
""
placeholder=
"HH:MM"
autocomplete=
"off"
>
<span
class=
"tip tip-stacked"
>
(UTC/GMT -5 hours)
</span>
<span
class=
"tip tip-stacked"
id=
"timezone"
>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -158,7 +158,7 @@ from contentstore import utils
...
@@ -158,7 +158,7 @@ from contentstore import utils
<div
class=
"group"
>
<div
class=
"group"
>
<label
for=
"course-enrollment-start-time"
>
Start Time
</label>
<label
for=
"course-enrollment-start-time"
>
Start Time
</label>
<input
type=
"text"
class=
"time start"
id=
"course-enrollment-start-time"
value=
""
placeholder=
"HH:MM"
autocomplete=
"off"
>
<input
type=
"text"
class=
"time start"
id=
"course-enrollment-start-time"
value=
""
placeholder=
"HH:MM"
autocomplete=
"off"
>
<span
class=
"tip tip-stacked"
>
(UTC/GMT -5 hours)
</span>
<span
class=
"tip tip-stacked"
id=
"timezone"
>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -174,7 +174,7 @@ from contentstore import utils
...
@@ -174,7 +174,7 @@ from contentstore import utils
<div
class=
"group"
>
<div
class=
"group"
>
<label
for=
"course-enrollment-end-time"
>
End Time
</label>
<label
for=
"course-enrollment-end-time"
>
End Time
</label>
<input
type=
"text"
class=
"time end"
id=
"course-enrollment-end-time"
value=
""
placeholder=
"HH:MM"
autocomplete=
"off"
>
<input
type=
"text"
class=
"time end"
id=
"course-enrollment-end-time"
value=
""
placeholder=
"HH:MM"
autocomplete=
"off"
>
<span
class=
"tip tip-stacked"
>
(UTC/GMT -5 hours)
</span>
<span
class=
"tip tip-stacked"
id=
"timezone"
>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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