PHP Classes

File: templates/ymzbox/alert.js

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

Contents

Class file image Download
jaxon.dialogs.ymzbox = { duration: 3, success: function(content, title) { ymz.jq_toast({text: content, title: title, sec: jaxon.dialogs.ymzbox.duration, type: 'success'}); }, info: function(content, title) { ymz.jq_toast({text: content, title: title, sec: jaxon.dialogs.ymzbox.duration, type: 'notice'}); }, warning: function(content, title) { ymz.jq_toast({text: content, title: title, sec: jaxon.dialogs.ymzbox.duration, type: 'warning'}); }, error: function(content, title) { ymz.jq_toast({text: content, title: title, sec: jaxon.dialogs.ymzbox.duration, type: 'error'}); }, confirm: function(question, title, yesCallback, noCallback) { if(noCallback == undefined) noCallback = function(){}; ymz.jq_confirm({ title: title, text: question, no_fn: noCallback, yes_fn: yesCallback, no_btn: "<?php echo $this->no ?>", yes_btn: "<?php echo $this->yes ?>" }); } }; <?php echo $this->options ?> jaxon.command.handler.register("ymzbox.alert", function(args) { ymz.jq_toast(args.data); }); <?php if(($this->defaultForAlert)): ?> jaxon.ajax.message.success = jaxon.dialogs.ymzbox.success; jaxon.ajax.message.info = jaxon.dialogs.ymzbox.info; jaxon.ajax.message.warning = jaxon.dialogs.ymzbox.warning; jaxon.ajax.message.error = jaxon.dialogs.ymzbox.error; <?php endif ?> <?php if(($this->defaultForConfirm)): ?> jaxon.ajax.message.confirm = jaxon.dialogs.ymzbox.confirm; <?php endif ?>