2015-05-05 59 views
1

我正在使用Smart Admin Theme,特別是Ajax版本。當我按下右上角的註銷按鈕時,它會顯示一條很好的提醒確認消息。如何使用智能管理員註銷其他請求的彈出窗口?

我想了解如何在其他請求中使用它?例如,如果有人要刪除重要資源,我希望他們看到它。但我不確定主題製作者是否有辦法引發這一點。

我知道有與它相關聯data-attributes喜歡:

data-logout-msg="You can improve your security further after logging out by closing this opened browser" 

但我不知道如何在我的應用程序的另一個鏈接使用。任何想法的人?有什麼地方可以打電話的API方法嗎?

回答

6
 

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

+0

工程就像一個魅力。謝謝! :) – Rohan

相關問題