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
a68dee97
Commit
a68dee97
authored
Nov 27, 2012
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got rid of datepair as it was generating a jquery bug but also not
doing what we wanted.
parent
54cc8760
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
cms/static/js/views/settings/main_settings_view.js
+5
-2
cms/templates/settings.html
+4
-4
No files found.
cms/static/js/views/settings/main_settings_view.js
View file @
a68dee97
...
...
@@ -126,13 +126,16 @@ CMS.Views.Settings.Details = Backbone.View.extend({
var
div
=
this
.
$el
.
find
(
elementName
);
var
datefield
=
$
(
div
).
find
(
".date"
);
var
timefield
=
$
(
div
).
find
(
".time"
);
var
savefield
=
function
(
event
)
{
var
savefield
=
function
()
{
cacheModel
.
save
(
fieldName
,
new
Date
(
datefield
.
datepicker
(
'getDate'
).
getTime
()
+
timefield
.
timepicker
(
"getSecondsFromMidnight"
)
*
1000
));
};
// instrument as date and time pickers
timefield
.
timepicker
();
// FIXME being called 2x on each change. Was trapping datepicker onSelect b4 but change to datepair broke that
datefield
.
on
(
'change'
,
savefield
);
datefield
.
datepicker
({
onSelect
:
savefield
}
);
timefield
.
on
(
'changeTime'
,
savefield
);
datefield
.
datepicker
(
'setDate'
,
this
.
model
.
get
(
fieldName
));
...
...
cms/templates/settings.html
View file @
a68dee97
...
...
@@ -216,20 +216,20 @@ from contentstore import utils
<span
class=
"detail"
>
Important steps and segments of your course
</span>
</header>
<div
class=
"row row-col2
datepair
"
>
<div
class=
"row row-col2"
>
<h4
class=
"label"
>
Course Dates:
</h4>
<div
class=
"field"
>
<div
class=
"input multi multi-inline"
id=
"course-start"
>
<div
class=
"group"
>
<label
for=
"course-start-date"
>
Start Date
</label>
<input
type=
"text"
class=
"start-date date start"
id=
"course-start-date"
placeholder=
"MM/DD/YYYY"
autocomplete=
"off"
>
<input
type=
"text"
class=
"start-date date start
datepicker
"
id=
"course-start-date"
placeholder=
"MM/DD/YYYY"
autocomplete=
"off"
>
<span
class=
"tip tip-stacked"
>
First day the course begins
</span>
</div>
<div
class=
"group"
>
<label
for=
"course-start-time"
>
Start Time
</label>
<input
type=
"text"
class=
"time start"
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>
</div>
</div>
...
...
@@ -252,7 +252,7 @@ from contentstore import utils
</div>
</div>
<div
class=
"row row-col2
datepair
"
>
<div
class=
"row row-col2"
>
<h4
class=
"label"
>
Enrollment Dates:
</h4>
<div
class=
"field"
>
...
...
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