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
e501a176
Commit
e501a176
authored
Aug 01, 2013
by
Peter Fogg
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #540 from edx/peter-fogg/overview-reorder-notification
Show notification on course outline reorder.
parents
97013d61
4a77693f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletions
+26
-1
cms/djangoapps/contentstore/features/course-overview.feature
+7
-0
cms/djangoapps/contentstore/features/course-overview.py
+11
-0
cms/static/js/views/overview.js
+8
-1
No files found.
cms/djangoapps/contentstore/features/course-overview.feature
View file @
e501a176
...
...
@@ -63,3 +63,10 @@ Feature: Course Overview
When
I navigate to the course overview page
And
I change an assignment's grading status
Then
I am shown a notification
Scenario
:
Notification is shown on subsection reorder
Given
I have opened a new course section in Studio
And
I have added a new subsection
And
I have added a new subsection
When
I reorder subsections
Then
I am shown a notification
cms/djangoapps/contentstore/features/course-overview.py
View file @
e501a176
...
...
@@ -124,3 +124,14 @@ def all_sections_are_collapsed(step):
def
change_grading_status
(
step
):
world
.
css_find
(
'a.menu-toggle'
)
.
click
()
world
.
css_find
(
'.menu li'
)
.
first
.
click
()
@step
(
u'I reorder subsections'
)
def
reorder_subsections
(
_step
):
draggable_css
=
'a.drag-handle'
ele
=
world
.
css_find
(
draggable_css
)
.
first
ele
.
action_chains
.
drag_and_drop_by_offset
(
ele
.
_element
,
30
,
0
)
.
perform
()
cms/static/js/views/overview.js
View file @
e501a176
...
...
@@ -225,12 +225,19 @@ function _handleReorder(event, ui, parentIdField, childrenSelector) {
ui
.
draggable
.
attr
(
"style"
,
"position:relative;"
);
// STYLE hack too
children
.
push
(
ui
.
draggable
.
data
(
'id'
));
}
var
saving
=
new
CMS
.
Views
.
Notification
.
Mini
({
title
:
gettext
(
'Saving'
)
+
'…'
});
saving
.
show
();
$
.
ajax
({
url
:
"/save_item"
,
type
:
"POST"
,
dataType
:
"json"
,
contentType
:
"application/json"
,
data
:
JSON
.
stringify
({
'id'
:
subsection_id
,
'children'
:
children
})
data
:
JSON
.
stringify
({
'id'
:
subsection_id
,
'children'
:
children
}),
success
:
function
()
{
saving
.
hide
();
}
});
}
...
...
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