notification system updates

This commit is contained in:
Henrique Dias committed 2015-09-16 19:34:53 +01:00
1 parent 52a57d1f79
commit 5ffe125d67
9 files changed
+294 -45

No files matched your search

+14 -8
View File
@@ -1,12 +1,6 @@
$(document).ready(function() {
$('.scroll').perfectScrollbar();
var n = noty({
layout: 'topRight',
type: 'success',
text: 'noty - a jquery notification library!'
});
$("#preview").click(function(e) {
e.preventDefault();
@@ -47,9 +41,21 @@ $(document).ready(function() {
dataType: 'json',
encode: true,
}).done(function(data) {
alert("It was saved and/or published");
if (action == "Save") {
var word = "saved";
} else {
var word = "published";
}
notification({
text: 'The post was ' + word + '.',
type: 'success'
});
}).fail(function(data) {
alert("Something went wrong");
notification({
text: 'Something went wrong.',
type: 'error'
});
});
event.preventDefault();