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
22fdef6b
Commit
22fdef6b
authored
Aug 06, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly parse and save section release times
parent
2445845d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
cms/static/js/base.js
+12
-3
No files found.
cms/static/js/base.js
View file @
22fdef6b
...
...
@@ -313,9 +313,18 @@ function saveSubsection() {
metadata
[
$
(
el
).
data
(
"metadata-name"
)]
=
el
.
value
;
}
// Piece back together the date/time UI elements into one date/time string
metadata
[
'start'
]
=
getEdxTimeFromDateTimeInputs
(
'start_date'
,
'start_time'
);
metadata
[
'due'
]
=
getEdxTimeFromDateTimeInputs
(
'due_date'
,
'due_time'
);
// get datetimes for start and due, stick into metadata
_
([
"start"
,
"due"
]).
each
(
function
(
name
)
{
var
date
,
time
;
date
=
$
(
"#"
+
name
+
"_date"
).
datepicker
(
"getDate"
);
time
=
$
(
"#"
+
name
+
"_time"
).
timepicker
(
"getTime"
);
if
(
date
&&
time
)
{
metadata
[
name
]
=
new
Date
(
Date
.
UTC
(
date
.
getFullYear
(),
date
.
getMonth
(),
date
.
getDate
(),
time
.
getHours
(),
time
.
getMinutes
()
));
}
});
$
.
ajax
({
url
:
"/save_item"
,
...
...
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