Simplified toast to just take text
This commit is contained in:
@@ -3,13 +3,11 @@ this.GlobalUI = (function() {
|
|||||||
|
|
||||||
GlobalUI.dialog = {};
|
GlobalUI.dialog = {};
|
||||||
|
|
||||||
GlobalUI.toast = function(opts) {
|
GlobalUI.toast = function(text) {
|
||||||
var toast;
|
if (!GlobalUI._toast)
|
||||||
toast = $("[global-toast]")[0];
|
GlobalUI._toast = $("#global-toast")[0];
|
||||||
toast.text = opts.text;
|
GlobalUI._toast.text = text;
|
||||||
Session.set("global.ui.toastTemplate", opts.template);
|
return GlobalUI._toast.show();
|
||||||
Session.set("global.ui.toastData", opts.data);
|
|
||||||
return toast.show();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GlobalUI.deletedToast = function(id, collection, itemName) {
|
GlobalUI.deletedToast = function(id, collection, itemName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user