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
f8f0ef1f
Commit
f8f0ef1f
authored
Jul 09, 2014
by
Ben McMorran
Committed by
cahrens
Aug 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes unnecessary PUT after DELETE
parent
572b4fc0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
cms/static/js/spec/views/pages/container_spec.js
+2
-7
cms/static/js/views/pages/container.js
+0
-1
No files found.
cms/static/js/spec/views/pages/container_spec.js
View file @
f8f0ef1f
...
...
@@ -342,16 +342,11 @@ define(["jquery", "underscore", "underscore.string", "js/spec_helpers/create_sin
create_sinon
.
respondWithJson
(
requests
,
{});
// first request contains given component's id (to delete the component)
expect
(
requests
[
requests
.
length
-
3
].
url
).
toMatch
(
new
RegExp
(
"locator-component-"
+
GROUP_TO_TEST
+
(
componentIndex
+
1
))
);
// second request contains parent's id (to remove as child)
expect
(
requests
[
requests
.
length
-
2
].
url
).
toMatch
(
new
RegExp
(
"locator-
group-"
+
GROUP_TO_TEST
)
new
RegExp
(
"locator-
component-"
+
GROUP_TO_TEST
+
(
componentIndex
+
1
)
)
);
//
thir
d request if a fetch of the container.
//
secon
d request if a fetch of the container.
expect
(
lastRequest
().
url
).
toMatch
(
new
RegExp
(
"locator-container"
)
);
...
...
cms/static/js/views/pages/container.js
View file @
f8f0ef1f
...
...
@@ -213,7 +213,6 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "js/views/contai
xblock
=
xblockView
.
xblock
,
parent
=
this
.
findXBlockElement
(
xblockElement
.
parent
());
xblockElement
.
remove
();
xblockView
.
updateChildren
(
parent
);
xblock
.
runtime
.
notify
(
'deleted-child'
,
parent
.
data
(
'locator'
));
// Update publish and last modified information from the server.
this
.
model
.
fetch
();
...
...
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