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
3d9961f8
Commit
3d9961f8
authored
Nov 26, 2012
by
Tom Giannattasio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
started adding date picker
parent
46d4e27c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
cms/static/coffee/src/client_templates/course_info_update.html
+4
-3
cms/static/js/views/course_info_edit.js
+3
-4
cms/templates/course_info.html
+4
-0
No files found.
cms/static/coffee/src/client_templates/course_info_update.html
View file @
3d9961f8
...
...
@@ -4,8 +4,9 @@
<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 -->
<input
type=
"text"
id=
"date-entry"
value=
"<%= updateModel.get('date') %>"
></input>
<div
class=
"datepair"
>
<input
type=
"text"
class=
"date"
id=
"date-entry"
value=
"<%= updateModel.get('date') %>"
></input>
</div>
</div>
<div
class=
"row"
>
<textarea
class=
"new-update-content text-editor"
><
%=
updateModel
.
get
('
content
')
%
></textarea>
...
...
@@ -16,7 +17,7 @@
<a
href=
"#"
class=
"cancel-button"
name=
"<%= updateModel.cid %>"
>
Cancel
</a>
</div>
</form>
<div
class=
"preview"
>
<div
class=
"p
ost-p
review"
>
<div
class=
"post-actions"
>
<a
href=
"#"
class=
"edit-button"
name=
"<%- updateModel.cid %>"
><span
class=
"edit-icon"
></span>
Edit
</a>
<a
href=
"#"
class=
"delete-button"
name=
"<%- updateModel.cid %>"
><span
class=
"delete-icon"
></span>
Delete
</a>
...
...
cms/static/js/views/course_info_edit.js
View file @
3d9961f8
...
...
@@ -36,10 +36,9 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
// TODO Where should the template reside? how to use the static.url to create the path?
"/static/coffee/src/client_templates/course_info_update.html"
,
function
(
raw_template
)
{
console
.
log
(
raw_template
);
self
.
template
=
_
.
template
(
raw_template
);
self
.
render
();
}
self
.
render
();
}
);
},
...
...
@@ -65,7 +64,7 @@ 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"
).
s
lideDown
(
150
);
$
(
newForm
).
find
(
".new-update-form"
).
s
how
(
);
},
onSave
:
function
(
event
)
{
...
...
cms/templates/course_info.html
View file @
3d9961f8
...
...
@@ -9,6 +9,10 @@
<script
type=
"text/javascript"
src=
"${static.url('js/template_loader.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/models/course_info.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/views/course_info_edit.js')}"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${static.url('js/vendor/timepicker/jquery.timepicker.css')}"
/>
<script
src=
"${static.url('js/vendor/timepicker/jquery.timepicker.js')}"
></script>
<script
src=
"${static.url('js/vendor/timepicker/datepair.js')}"
></script>
<script
src=
"${static.url('js/vendor/date.js')}"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
$
(
document
).
ready
(
function
(){
...
...
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