move saved revs notification to gritter

This commit is contained in:
John McLear 2015-01-21 16:40:44 +00:00
parent aee0fd797d
commit 657974b518
2 changed files with 11 additions and 1 deletions

View file

@ -121,6 +121,7 @@
"timeslider.unnamedauthors": "{{num}} unnamed {[plural(num) one: author, other: authors ]}",
"pad.savedrevs.marked": "This revision is now marked as a saved revision",
"pad.savedrevs.timeslider": "You can see saved revisions by visiting the timeslider",
"pad.userlist.entername": "Enter your name",
"pad.userlist.unnamed": "unnamed",
"pad.userlist.guest": "Guest",

View file

@ -18,7 +18,16 @@ var pad;
exports.saveNow = function(){
pad.collabClient.sendMessage({"type": "SAVE_REVISION"});
alert(_("pad.savedrevs.marked"));
$.gritter.add({
// (string | mandatory) the heading of the notification
title: _("pad.savedrevs.marked"),
// (string | mandatory) the text inside the notification
text: _("pad.savedrevs.timeslider") || "You can view saved revisions in the timeslider",
// (bool | optional) if you want it to fade out on its own or just sit there
sticky: false,
// (int | optional) the time you want it to be alive for before fading out
time: '2000'
});
}
exports.init = function(_pad){