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
1d8d82b7
Commit
1d8d82b7
authored
Oct 01, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set id's on newly created components so that they are immediately editable
parent
d3a734d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
cms/djangoapps/contentstore/views.py
+1
-1
cms/static/coffee/src/views/module_edit.coffee
+5
-6
No files found.
cms/djangoapps/contentstore/views.py
View file @
1d8d82b7
...
...
@@ -413,7 +413,7 @@ def clone_item(request):
modulestore
()
.
update_metadata
(
new_item
.
location
.
url
(),
new_item
.
own_metadata
)
modulestore
()
.
update_children
(
parent_location
,
parent
.
definition
.
get
(
'children'
,
[])
+
[
new_item
.
location
.
url
()])
return
preview_component
(
request
,
new_item
.
location
)
return
HttpResponse
(
json
.
dumps
({
'id'
:
dest_location
.
url
()})
)
'''
cdodge: this method allows for POST uploading of files into the course asset library, which will
...
...
cms/static/coffee/src/views/module_edit.coffee
View file @
1d8d82b7
...
...
@@ -32,14 +32,13 @@ class CMS.Views.ModuleEdit extends Backbone.View
return
_metadata
cloneTemplate
:
(
template
,
name
)
->
@
$el
.
load
(
"/clone_item"
,
{
cloneTemplate
:
(
template
)
->
$
.
post
(
"/clone_item"
,
{
parent_location
:
@
$el
.
parent
().
data
(
'id'
)
template
:
template
name
:
name
},
=>
@
loadModules
()
@
delegateEvents
()
},
(
data
)
=>
@
model
.
set
(
id
:
data
.
id
)
@
render
()
)
render
:
->
...
...
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