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
7ed8a3b8
Commit
7ed8a3b8
authored
Oct 15, 2013
by
Christina Roberts
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1327 from edx/christina/kill-toast
Don't need toast message.
parents
a5aca51a
37dcfd7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
38 deletions
+0
-38
cms/static/coffee/src/views/module_edit.coffee
+0
-1
cms/static/js/base.js
+0
-37
No files found.
cms/static/coffee/src/views/module_edit.coffee
View file @
7ed8a3b8
...
@@ -92,7 +92,6 @@ define ["backbone", "jquery", "underscore", "gettext", "xmodule",
...
@@ -92,7 +92,6 @@ define ["backbone", "jquery", "underscore", "gettext", "xmodule",
title
:
gettext
(
'Saving…'
)
title
:
gettext
(
'Saving…'
)
saving
.
show
()
saving
.
show
()
@
model
.
save
(
data
).
done
(
=>
@
model
.
save
(
data
).
done
(
=>
# # showToastMessage("Your changes have been saved.", null, 3)
@
module
=
null
@
module
=
null
@
render
()
@
render
()
@
$el
.
removeClass
(
'editing'
)
@
$el
.
removeClass
(
'editing'
)
...
...
cms/static/js/base.js
View file @
7ed8a3b8
...
@@ -319,9 +319,6 @@ function saveSubsection() {
...
@@ -319,9 +319,6 @@ function saveSubsection() {
success
:
function
()
{
success
:
function
()
{
$spinner
.
delay
(
500
).
fadeOut
(
150
);
$spinner
.
delay
(
500
).
fadeOut
(
150
);
$changedInput
=
null
;
$changedInput
=
null
;
},
error
:
function
()
{
showToastMessage
(
gettext
(
'There has been an error while saving your changes.'
));
}
}
});
});
}
}
...
@@ -497,40 +494,6 @@ function hideAlert(e) {
...
@@ -497,40 +494,6 @@ function hideAlert(e) {
$
(
this
).
closest
(
'.wrapper-alert'
).
removeClass
(
'is-shown'
);
$
(
this
).
closest
(
'.wrapper-alert'
).
removeClass
(
'is-shown'
);
}
}
function
showToastMessage
(
message
,
$button
,
lifespan
)
{
var
$toast
=
$
(
'<div class="toast-notification"></div>'
);
var
$closeBtn
=
$
(
'<a href="#" class="close-button">×</a>'
);
$toast
.
append
(
$closeBtn
);
var
$content
=
$
(
'<div class="notification-content"></div>'
);
$content
.
html
(
message
);
$toast
.
append
(
$content
);
if
(
$button
)
{
$button
.
addClass
(
'action-button'
);
$button
.
bind
(
'click'
,
hideToastMessage
);
$content
.
append
(
$button
);
}
$closeBtn
.
bind
(
'click'
,
hideToastMessage
);
if
(
$
(
'.toast-notification'
)[
0
])
{
var
targetY
=
$
(
'.toast-notification'
).
offset
().
top
+
$
(
'.toast-notification'
).
outerHeight
();
$toast
.
css
(
'top'
,
(
targetY
+
10
)
+
'px'
);
}
$body
.
prepend
(
$toast
);
$toast
.
fadeIn
(
200
);
if
(
lifespan
)
{
$toast
.
timer
=
setTimeout
(
function
()
{
$toast
.
fadeOut
(
300
);
},
lifespan
*
1000
);
}
}
function
hideToastMessage
(
e
)
{
e
.
preventDefault
();
$
(
this
).
closest
(
'.toast-notification'
).
remove
();
}
function
addNewSection
(
e
,
isTemplate
)
{
function
addNewSection
(
e
,
isTemplate
)
{
e
.
preventDefault
();
e
.
preventDefault
();
...
...
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