/** * Theme: Moltran Admin Template * Author: Coderthemes * Notification */ !function($) { "use strict"; var Notification = function() {}; //simple notificaiton Notification.prototype.notify = function(style,position, title, text) { var icon = 'fa fa-adjust'; if(style == "error"){ icon = "fa fa-exclamation"; }else if(style == "warning"){ icon = "fa fa-warning"; }else if(style == "success"){ icon = "fa fa-check"; }else if(style == "info"){ icon = "fa fa-question"; }else{ icon = "fa fa-adjust"; } $.notify({ title: title, text: text, image: "" }, { style: 'metro', className: style, globalPosition:position, showAnimation: "show", showDuration: 0, hideDuration: 0, autoHide: false, clickToHide: true }); }, //auto hide notification Notification.prototype.autoHideNotify = function (style,position, title, text) { var icon = "fa fa-adjust"; if(style == "error"){ icon = "fa fa-exclamation"; }else if(style == "warning"){ icon = "fa fa-warning"; }else if(style == "success"){ icon = "fa fa-check"; }else if(style == "info"){ icon = "fa fa-question"; }else{ icon = "fa fa-adjust"; } $.notify({ title: title, text: text, image: "" }, { style: 'metro', className: style, globalPosition:position, showAnimation: "show", showDuration: 0, hideDuration: 0, autoHideDelay: 5000, autoHide: true, clickToHide: true }); }, //confirmation notification Notification.prototype.confirm = function(style,position, title) { var icon = "fa fa-adjust"; if(style == "error"){ icon = "fa fa-exclamation"; }else if(style == "warning"){ icon = "fa fa-warning"; }else if(style == "success"){ icon = "fa fa-check"; }else if(style == "info"){ icon = "fa fa-question"; }else{ icon = "fa fa-adjust"; } $.notify({ title: title, text: 'Are you sure you want to do nothing?