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
d66f3395
Commit
d66f3395
authored
Dec 19, 2012
by
Don Mitchell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/cale/cms-master' of github.com:MITx/mitx into bug/dhm/dec12
parents
e37180e0
14330ebc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
27 deletions
+21
-27
cms/static/coffee/files.json
+1
-1
cms/static/js/base.js
+18
-24
cms/templates/widgets/header.html
+1
-1
jenkins/test_edge.sh
+1
-1
No files found.
cms/static/coffee/files.json
View file @
d66f3395
...
...
@@ -3,6 +3,6 @@
"/static/js/vendor/jquery.min.js"
,
"/static/js/vendor/json2.js"
,
"/static/js/vendor/underscore-min.js"
,
"/static/js/vendor/backbone.js"
"/static/js/vendor/backbone
-min
.js"
]
}
cms/static/js/base.js
View file @
d66f3395
...
...
@@ -2,8 +2,6 @@ var $body;
var
$modal
;
var
$modalCover
;
var
$newComponentItem
;
var
$newComponentStep1
;
var
$newComponentStep2
;
var
$changedInput
;
var
$spinner
;
...
...
@@ -111,15 +109,12 @@ $(document).ready(function() {
$
(
'.edit-section-start-cancel'
).
bind
(
'click'
,
cancelSetSectionScheduleDate
);
$
(
'.edit-section-start-save'
).
bind
(
'click'
,
saveSetSectionScheduleDate
);
// modal upload asset dialog. Bind it in the initializer otherwise multiple hanlders will get registered causing
// pretty wacky stuff to happen
$
(
'.file-input'
).
bind
(
'change'
,
startUpload
);
$
(
'.upload-modal .choose-file-button'
).
bind
(
'click'
,
showFileSelectionMenu
);
$body
.
on
(
'click'
,
'.section-published-date .edit-button'
,
editSectionPublishDate
);
$body
.
on
(
'click'
,
'.section-published-date .schedule-button'
,
editSectionPublishDate
);
$body
.
on
(
'click'
,
'.edit-subsection-publish-settings .save-button'
,
saveSetSectionScheduleDate
);
$body
.
on
(
'click'
,
'.edit-subsection-publish-settings .cancel-button'
,
hideModal
)
$body
.
on
(
'click'
,
'.edit-subsection-publish-settings .cancel-button'
,
hideModal
)
;
$body
.
on
(
'change'
,
'.edit-subsection-publish-settings .start-date'
,
function
()
{
if
(
$
(
'.edit-subsection-publish-settings'
).
find
(
'.start-time'
).
val
()
==
''
)
{
$
(
'.edit-subsection-publish-settings'
).
find
(
'.start-time'
).
val
(
'12:00am'
);
...
...
@@ -314,7 +309,7 @@ function checkForNewValue(e) {
this
.
saveTimer
=
setTimeout
(
function
()
{
$changedInput
=
$
(
e
.
target
);
saveSubsection
()
saveSubsection
()
;
this
.
saveTimer
=
null
;
},
500
);
}
...
...
@@ -327,7 +322,7 @@ function autosaveInput(e) {
this
.
saveTimer
=
setTimeout
(
function
()
{
$changedInput
=
$
(
e
.
target
);
saveSubsection
()
saveSubsection
()
;
this
.
saveTimer
=
null
;
},
500
);
}
...
...
@@ -349,23 +344,22 @@ function saveSubsection() {
// pull all 'normalized' metadata editable fields on page
var
metadata_fields
=
$
(
'input[data-metadata-name]'
);
metadata
=
{};
var
metadata
=
{};
for
(
var
i
=
0
;
i
<
metadata_fields
.
length
;
i
++
)
{
el
=
metadata_fields
[
i
];
var
el
=
metadata_fields
[
i
];
metadata
[
$
(
el
).
data
(
"metadata-name"
)]
=
el
.
value
;
}
// now add 'free-formed' metadata which are presented to the user as dual input fields (name/value)
$
(
'ol.policy-list > li.policy-list-element'
).
each
(
function
(
i
,
element
)
{
name
=
$
(
element
).
children
(
'.policy-list-name'
).
val
();
val
=
$
(
element
).
children
(
'.policy-list-value'
).
val
();
metadata
[
name
]
=
val
;
var
name
=
$
(
element
).
children
(
'.policy-list-name'
).
val
();
metadata
[
name
]
=
$
(
element
).
children
(
'.policy-list-value'
).
val
();
});
// now add any 'removed' policy metadata which is stored in a separate hidden div
// 'null' presented to the server means 'remove'
$
(
"#policy-to-delete > li.policy-list-element"
).
each
(
function
(
i
,
element
)
{
name
=
$
(
element
).
children
(
'.policy-list-name'
).
val
();
var
name
=
$
(
element
).
children
(
'.policy-list-name'
).
val
();
if
(
name
!=
""
)
metadata
[
name
]
=
null
;
});
...
...
@@ -401,7 +395,7 @@ function createNewUnit(e) {
$
.
post
(
'/clone_item'
,
{
'parent_location'
:
parent
,
'template'
:
template
,
'display_name'
:
'New Unit'
,
'display_name'
:
'New Unit'
},
function
(
data
)
{
// redirect to the edit page
...
...
@@ -491,7 +485,7 @@ function displayFinishedUpload(xhr) {
var template = $('
#
new
-
asset
-
element
').html();
var html = Mustache.to_html(template, resp);
$('
table
>
tbody
>
tr
:
first
').before
(html);
$('
table
>
tbody
').prepend
(html);
}
...
...
@@ -504,6 +498,7 @@ function hideModal(e) {
if(e) {
e.preventDefault();
}
$('
.
file
-
input
').unbind('
change
', startUpload);
$modal.hide();
$modalCover.hide();
}
...
...
@@ -680,7 +675,7 @@ function saveNewCourse(e) {
'template'
:
template
,
'org'
:
org
,
'number'
:
number
,
'display_name'
:
display_name
,
'display_name'
:
display_name
},
function
(
data
)
{
if
(
data
.
id
!=
undefined
)
{
...
...
@@ -709,7 +704,7 @@ function addNewSubsection(e) {
var
parent
=
$
(
this
).
parents
(
"section.branch"
).
data
(
"id"
);
$saveButton
.
data
(
'parent'
,
parent
)
$saveButton
.
data
(
'parent'
,
parent
)
;
$saveButton
.
data
(
'template'
,
$
(
this
).
data
(
'template'
));
$newSubsection
.
find
(
'.new-subsection-form'
).
bind
(
'submit'
,
saveNewSubsection
);
...
...
@@ -774,7 +769,7 @@ function saveEditSectionName(e) {
$spinner
.
show
();
if
(
display_name
==
''
)
{
alert
(
"You must specify a name before saving."
)
alert
(
"You must specify a name before saving."
)
;
return
;
}
...
...
@@ -811,13 +806,12 @@ function cancelSetSectionScheduleDate(e) {
function
saveSetSectionScheduleDate
(
e
)
{
e
.
preventDefault
();
input_date
=
$
(
'.edit-subsection-publish-settings .start-date'
).
val
();
input_time
=
$
(
'.edit-subsection-publish-settings .start-time'
).
val
();
var
input_date
=
$
(
'.edit-subsection-publish-settings .start-date'
).
val
();
var
input_time
=
$
(
'.edit-subsection-publish-settings .start-time'
).
val
();
start
=
getEdxTimeFromDateTimeVals
(
input_date
,
input_time
);
var
start
=
getEdxTimeFromDateTimeVals
(
input_date
,
input_time
);
id
=
$modal
.
attr
(
'data-id'
);
var
$_this
=
$
(
this
);
var
id
=
$modal
.
attr
(
'data-id'
);
// call into server to commit the new order
$
.
ajax
({
...
...
cms/templates/widgets/header.html
View file @
d66f3395
...
...
@@ -29,7 +29,7 @@
<li><a
href=
"${reverse('course_index', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, name=ctx_loc.name))}"
id=
'courseware-tab'
>
Courseware
</a></li>
<li><a
href=
"${reverse('course_info', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, name=ctx_loc.name))}"
id=
'courseinfo-tab'
>
Course Info
</a></li>
<li><a
href=
"${reverse('edit_tabs', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, coursename=ctx_loc.name))}"
id=
'pages-tab'
>
Pages
</a></li>
<li><a
href=
"${reverse('manage_users', kwargs=dict(location=ctx_loc
.org
))}"
id=
'users-tab'
>
Users
</a></li>
<li><a
href=
"${reverse('manage_users', kwargs=dict(location=ctx_loc))}"
id=
'users-tab'
>
Users
</a></li>
<li><a
href=
"${reverse('asset_index', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, name=ctx_loc.name))}"
id=
'assets-tab'
>
Assets
</a></li>
<li><a
href=
"${reverse('course_settings', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, name=ctx_loc.name))}"
id=
'settings-tab'
>
Settings
</a></li>
<li><a
href=
"${reverse('import_course', kwargs=dict(org=ctx_loc.org, course=ctx_loc.course, name=ctx_loc.name))}"
id=
'import-tab'
>
Import
</a></li>
...
...
jenkins/test_edge.sh
View file @
d66f3395
...
...
@@ -22,7 +22,7 @@ rake test_lms[false] || TESTS_FAILED=1
rake test_common/lib/capa
||
TESTS_FAILED
=
1
rake test_common/lib/xmodule
||
TESTS_FAILED
=
1
rake phantomjs_jasmine_lms
||
true
rake phantomjs_jasmine_cms
||
true
rake phantomjs_jasmine_cms
||
TESTS_FAILED
=
1
rake phantomjs_jasmine_common/lib/xmodule
||
true
rake coverage:xml coverage:html
...
...
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