如何使用智能管理员的注销警告弹出窗口来处理其他请求?
I am working with the Smart Admin Theme, particularly the Ajax version. When I press the logout button on the top right hand side, it brings out a nice alert confirmation message.
我正在使用Smart Admin主题,特别是Ajax版本。当我按下右上角的注销按钮时,它会显示一条很好的警报确认消息。
I am trying to look about how to use this in other requests as well? For example if someone is going to delete an important resource, I would like them to see it. But I am not sure if the theme makers have given a way to trigger this.
我试着看看如何在其他请求中使用它?例如,如果有人要删除重要资源,我希望他们能够看到它。但我不确定主题制作者是否已经给出了触发这一点的方法。
I know that there are data-attributes
associated with it like:
我知道有与之相关的数据属性,如:
data-logout-msg="You can improve your security further after logging out by closing this opened browser"
But I am not sure how to use this on another link in my application. Any idea anyone? Is there an API method somewhere I can call?
但我不知道如何在我的应用程序中的另一个链接上使用它。任何想法的人?我可以在哪里调用API方法吗?
1 个解决方案
#1
$("#smart-mod-eg1").click(function(e) { $.SmartMessageBox({ title : "Smart Alert!", content : "This is a confirmation box. Can be programmed for button callback", buttons : '[No][Yes]' }, function(ButtonPressed) { if (ButtonPressed === "Yes") { $.smallBox({ title : "Callback function", content : " You pressed Yes...", color : "#659265", iconSmall : "fa fa-check fa-2x fadeInRight animated", timeout : 4000 }); } if (ButtonPressed === "No") { $.smallBox({ title : "Callback function", content : " You pressed No...", color : "#C46A69", iconSmall : "fa fa-times fa-2x fadeInRight animated", timeout : 4000 }); } }); e.preventDefault(); })
更多相关文章
- 如何使用ajax GET或POST方法将数据传递到amazon lambda节点。js
- Jquery常用技巧和方法收集
- 关于jQuery Themeroller主题,我在哪里可以找到更多?
- Chosen 基于jquery的选择框插件使用方法
- jQuery $ajax 传中文数据到action乱码解决方法
- JQuery 的选取元素 和 方法
- jquery的function方法中each循环里面判断失败跳出function方法
- js/jquery常用方法------复制粘贴至剪切板
- Jquery ready和window.onload方法区别