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();
        })

更多相关文章

  1. 如何使用ajax GET或POST方法将数据传递到amazon lambda节点。js
  2. Jquery常用技巧和方法收集
  3. 关于jQuery Themeroller主题,我在哪里可以找到更多?
  4. Chosen 基于jquery的选择框插件使用方法
  5. jQuery $ajax 传中文数据到action乱码解决方法
  6. JQuery 的选取元素 和 方法
  7. jquery的function方法中each循环里面判断失败跳出function方法
  8. js/jquery常用方法------复制粘贴至剪切板
  9. Jquery ready和window.onload方法区别

随机推荐

  1. ANDROID轻量级JSON序列化和反序列化[转]
  2. android技术牛人的博客
  3. android 按钮Button单击背景切换
  4. android 特效资源
  5. android @+id 含义
  6. Android ViewPager动画第三方库(MagicView
  7. Android分区详解:boot, system, recovery,
  8. android pdf 类库
  9. Android 获取当前设备的IP地址
  10. android studio实现打电话