PHP Classes

File: templates/toastr/alert.js

Recommend this page to a friend!
  Classes of Thierry Feuzeu   Modals, alerts and confirmation dialogs for Jaxon   templates/toastr/alert.js   Download  
File: templates/toastr/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,517 bytes
 

Contents

Class file image Download
jaxon.dialogs.toastr = { success: function(content, title) { if((title)) toastr.success(content, title); else toastr.success(content); }, info: function(content, title) { if((title)) toastr.info(content, title); else toastr.info(content); }, warning: function(content, title) { if((title)) toastr.warning(content, title); else toastr.warning(content); }, error: function(content, title) { if((title)) toastr.error(content, title); else toastr.error(content); } }; <?php echo $this->options ?> jaxon.command.handler.register("toastr.info", function(args) { jaxon.dialogs.toastr.info(args.data.message, args.data.title); }); jaxon.command.handler.register("toastr.success", function(args) { jaxon.dialogs.toastr.success(args.data.message, args.data.title); }); jaxon.command.handler.register("toastr.warning", function(args) { jaxon.dialogs.toastr.warning(args.data.message, args.data.title); }); jaxon.command.handler.register("toastr.error", function(args) { jaxon.dialogs.toastr.error(args.data.message, args.data.title); }); <?php if(($this->defaultForAlert)): ?> jaxon.ajax.message.success = jaxon.dialogs.toastr.success; jaxon.ajax.message.info = jaxon.dialogs.toastr.info; jaxon.ajax.message.warning = jaxon.dialogs.toastr.warning; jaxon.ajax.message.error = jaxon.dialogs.toastr.error; <?php endif ?>