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
5dd90aa9
Commit
5dd90aa9
authored
Nov 27, 2012
by
Tom Giannattasio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working on date picker; conflicts with ids
parent
3d9961f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
cms/static/coffee/src/client_templates/course_info_update.html
+1
-3
cms/static/js/template_loader.js
+1
-1
cms/static/js/views/course_info_edit.js
+9
-1
No files found.
cms/static/coffee/src/client_templates/course_info_update.html
View file @
5dd90aa9
...
...
@@ -4,9 +4,7 @@
<div
class=
"row"
>
<label
class=
"inline-label"
>
Date:
</label>
<!-- TODO replace w/ date widget and actual date (problem is that persisted version is "Month day" not an actual date obj -->
<div
class=
"datepair"
>
<input
type=
"text"
class=
"date"
id=
"date-entry"
value=
"<%= updateModel.get('date') %>"
></input>
</div>
<input
type=
"text"
class=
"date"
id=
"date-entry"
value=
"<%= updateModel.get('date') %>"
>
</div>
<div
class=
"row"
>
<textarea
class=
"new-update-content text-editor"
><
%=
updateModel
.
get
('
content
')
%
></textarea>
...
...
cms/static/js/template_loader.js
View file @
5dd90aa9
...
...
@@ -5,7 +5,7 @@
if
(
typeof
window
.
templateLoader
==
'function'
)
return
;
var
templateLoader
=
{
templateVersion
:
"0.0.
4
"
,
templateVersion
:
"0.0.
3
"
,
templates
:
{},
loadRemoteTemplate
:
function
(
templateName
,
filename
,
callback
)
{
if
(
!
this
.
templates
[
templateName
])
{
...
...
cms/static/js/views/course_info_edit.js
View file @
5dd90aa9
...
...
@@ -53,6 +53,7 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
$
(
updateEle
).
append
(
newEle
);
});
this
.
$el
.
find
(
".new-update-form"
).
hide
();
this
.
$el
.
find
(
'.date'
).
datepicker
({
'dateFormat'
:
'MM d'
});
return
this
;
},
...
...
@@ -64,7 +65,14 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
var
newForm
=
this
.
template
({
updateModel
:
newModel
});
var
updateEle
=
this
.
$el
.
find
(
"#course-update-list"
);
$
(
updateEle
).
prepend
(
newForm
);
$
(
newForm
).
find
(
".new-update-form"
).
show
();
// TODO: remove the id on the datepicker field
// this is causing conflicts with the datepicker widget
$
(
'.date'
).
datepicker
(
'destroy'
);
$
(
'.date'
).
datepicker
({
'dateFormat'
:
'MM d'
});
},
onSave
:
function
(
event
)
{
...
...
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