结合Pnotify插件--app-jquery-notify.js


$.NOTIFY = { showSuccess : function (title, text, context) { var opt = { title : title, text : text, type : 'success', hide : true, delay : 1500 }; if (context != undefined && context != null) { $.NOTIFY.show_context (context, false, opt); return; } new PNotify (opt); }, showNotice : function (title, text, context) { var opt = { title : title, text : text, type : 'notice', hide : true, delay : 1500 }; if (context != undefined && context != null) { $.NOTIFY.show_context (context, false, opt); return; } new PNotify (opt); }, showError : function (title, text, context) { var opt = { title : title, text : text, type : 'error', hide : true, delay : 1500 }; if (context != undefined && context != null) { $.NOTIFY.show_context (context, false, opt); return; } new PNotify (opt); }, showLogin : function (context) { var opt = { title : "信息", text : "您可能已经离线,请重新刷新网页后再试!", type : "info", confirm : { confirm : true, buttons : [ { text : '刷新网页', click : function (notice) { top.location.reload (); } } ] }, buttons : { closer : false, sticker : false } }; if (context != undefined && context != null) { $.NOTIFY.show_context (context, false, opt); return; } new PNotify (opt)
 }, showConfirm : function (title, text, buttons, context) { var opt = { title : title, text : text, type : "notice", confirm : { confirm : true, buttons : buttons }, buttons : { closer : false, sticker : false } }; if (context != undefined && context != null) { $.NOTIFY.show_context (context, false, opt); return; } new PNotify (opt); }, show_context : function (context, modal, opt) { var opts = $.extend ( { "push" : "top", "dir1" : "down", "dir2" : "left", "context" : context, "modal" : modal, "overlay_close" : true, "addclass" : "stack-modal" }, opt) new PNotify (opts); } }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM