PHP Classes

File: templates/notify/alert.js

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

Contents

Class file image Download
jaxon.dialogs.notify = {
    success: function(content, title) {
        $.notify(content, {className: 'success', position: "top center"});
    },
    info: function(content, title) {
        $.notify(content, {className: 'info', position: "top center"});
    },
    warning: function(content, title) {
        $.notify(content, {className: 'warn', position: "top center"});
    },
    error: function(content, title) {
        $.notify(content, {className: 'error', position: "top center"});
    }
};

jaxon.command.handler.register("notify.alert", function(args) {
    $.notify(args.data.message, {className: args.data.className, position: "top center"});
});

<?php if(($this->defaultForAlert)): ?>
jaxon.ajax.message.success = jaxon.dialogs.notify.success;
jaxon.ajax.message.info = jaxon.dialogs.notify.info;
jaxon.ajax.message.warning = jaxon.dialogs.notify.warning;
jaxon.ajax.message.error = jaxon.dialogs.notify.error;
<?php endif ?>
For more information send a message to info at phpclasses dot org.