PHP Classes

File: templates/tingle/alert.js

Recommend this page to a friend!
  Classes of Thierry Feuzeu   Modals, alerts and confirmation dialogs for Jaxon   templates/tingle/alert.js   Download  
File: templates/tingle/alert.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Modals, alerts and confirmation dialogs for Jaxon
Display Ajax modal, alert and confirmation dialogs
Author: By
Last change:
Date: 6 years ago
Size: 1,162 bytes
 

Contents

Class file image Download
jaxon.dialogs.tingle = { modal: null }; jaxon.command.handler.register("tingle.show", function(args) { if(jaxon.dialogs.tingle.modal != null) { jaxon.dialogs.tingle.modal.close(); } jaxon.dialogs.tingle.modal = new tingle.modal(args.data.options); // Set content jaxon.dialogs.tingle.modal.setContent(args.data.content); // Add buttons for(var ind = 0, len = args.data.buttons.length; ind < len; ind++) { button = args.data.buttons[ind]; if(button.click == "close") { button.click = function(){jaxon.dialogs.tingle.modal.close();}; } else { button.click = new Function(button.click); } jaxon.dialogs.tingle.modal.addFooterBtn(button.title, button.class, button.click); } // Open modal jaxon.dialogs.tingle.modal.open(); }); jaxon.command.handler.register("tingle.hide", function(args) { if(jaxon.dialogs.tingle.modal != null) { // Close an destroy modal jaxon.dialogs.tingle.modal.close(); jaxon.dialogs.tingle.modal.destroy(); jaxon.dialogs.tingle.modal = null; } });