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
1be2068b
Commit
1be2068b
authored
Jun 28, 2013
by
Peter Fogg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show a confirmation on asset delete. Fixes STUD-375.
parent
938e48e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletions
+12
-1
cms/djangoapps/contentstore/features/upload.feature
+1
-0
cms/djangoapps/contentstore/features/upload.py
+6
-0
cms/static/js/views/assets.js
+5
-1
No files found.
cms/djangoapps/contentstore/features/upload.feature
View file @
1be2068b
...
...
@@ -21,6 +21,7 @@ Feature: Upload Files
When
I upload the file
"test"
And
I delete the file
"test"
Then
I should not see the file
"test"
was uploaded
And
I see a confirmation that the file was deleted
Scenario
:
Users can download files
Given
I have opened a new course in studio
...
...
cms/djangoapps/contentstore/features/upload.py
View file @
1be2068b
...
...
@@ -90,6 +90,12 @@ def modify_upload(_step, file_name):
cur_file
.
write
(
new_text
)
@step
(
'I see a confirmation that the file was deleted'
)
def
i_see_a_delete_confirmation
(
step
):
alert_css
=
'#alert-confirmation'
assert
world
.
is_css_present
(
alert_css
)
def
get_index
(
file_name
):
names_css
=
'td.name-col > a.filename'
all_names
=
world
.
css_find
(
names_css
)
...
...
cms/static/js/views/assets.js
View file @
1be2068b
...
...
@@ -23,7 +23,11 @@ function removeAsset(e){
{
'location'
:
row
.
data
(
'id'
)
},
function
()
{
// show the post-commit confirmation
$
(
".wrapper-alert-confirmation"
).
addClass
(
"is-shown"
).
attr
(
'aria-hidden'
,
'false'
);
var
deleted
=
new
CMS
.
Views
.
Alert
.
Confirmation
({
title
:
gettext
(
"Your file has been deleted."
),
closeIcon
:
false
});
deleted
.
show
();
row
.
remove
();
analytics
.
track
(
'Deleted Asset'
,
{
'course'
:
course_location_analytics
,
...
...
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