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
fb063442
Commit
fb063442
authored
Oct 24, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for deletion of all components in a draft
parent
cf4f1118
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
cms/djangoapps/contentstore/views.py
+3
-3
cms/static/coffee/src/models/module.coffee
+3
-3
No files found.
cms/djangoapps/contentstore/views.py
View file @
fb063442
...
...
@@ -574,11 +574,11 @@ def save_item(request):
store
=
_modulestore
(
Location
(
item_location
));
if
request
.
POST
[
'data'
]:
if
request
.
POST
[
'data'
]
is
not
None
:
data
=
request
.
POST
[
'data'
]
store
.
update_item
(
item_location
,
data
)
if
request
.
POST
[
'children'
]:
if
request
.
POST
[
'children'
]
is
not
None
:
children
=
request
.
POST
[
'children'
]
store
.
update_children
(
item_location
,
children
)
...
...
@@ -587,7 +587,7 @@ def save_item(request):
# NOTE, that the postback is not the complete metadata, as there's system metadata which is
# not presented to the end-user for editing. So let's fetch the original and
# 'apply' the submitted metadata, so we don't end up deleting system metadata
if
request
.
POST
[
'metadata'
]:
if
request
.
POST
[
'metadata'
]
is
not
None
:
posted_metadata
=
request
.
POST
[
'metadata'
]
# fetch original
existing_item
=
modulestore
()
.
get_item
(
item_location
)
...
...
cms/static/coffee/src/models/module.coffee
View file @
fb063442
class
CMS
.
Models
.
Module
extends
Backbone
.
Model
url
:
'/save_item'
defaults
:
data
:
''
children
:
''
metadata
:
{}
data
:
null
children
:
null
metadata
:
null
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