diff options
author | John McLear <john@mclear.co.uk> | 2015-01-21 16:40:44 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2015-01-21 16:40:44 +0000 |
commit | 657974b5189719ee9b214befdd2fd5f2f3391bed (patch) | |
tree | 6601ec3707ed150a65f4b5c050334e27f9e6fa81 | |
parent | aee0fd797dd5c914e07f563ca8f0ea099ecab3bd (diff) | |
download | etherpad-lite-657974b5189719ee9b214befdd2fd5f2f3391bed.zip |
move saved revs notification to gritter
-rw-r--r-- | src/locales/en.json | 1 | ||||
-rw-r--r-- | src/static/js/pad_savedrevs.js | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/locales/en.json b/src/locales/en.json index cafbd76e..23bb3a04 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -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", diff --git a/src/static/js/pad_savedrevs.js b/src/static/js/pad_savedrevs.js index e1552c27..34323b22 100644 --- a/src/static/js/pad_savedrevs.js +++ b/src/static/js/pad_savedrevs.js @@ -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){ |