PHP Classes

File: templates/plugins/confirm.js.tpl

Recommend this page to a friend!
  Classes of Thierry Feuzeu   Jaxon   templates/plugins/confirm.js.tpl   Download  
File: templates/plugins/confirm.js.tpl
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Jaxon
Call PHP classes from JavaScript using AJAX
Author: By
Last change:
Date: 7 years ago
Size: 1,394 bytes
 

Contents

Class file image Download
jaxon.confirm = { skip: function(command) { numberOfCommands = command.id; while (0 < numberOfCommands) { jaxon.tools.queue.pop(command.response); --numberOfCommands; } } }; /* Function: jaxon.confirm.commands A rewrite of the jaxon.confirm.commands function which uses the user configured confirm library. Parameters: command (object) - jaxon response object Returns: true - The operation completed successfully. */ jaxon.confirm.commands = function(command) { command.fullName = 'confirmCommands'; var msg = command.data; /* * Unlike javascript confirm(), third party confirm() functions are not blocking. * Therefore, to prevent the next commands to run while the library is waiting for the user confirmation, * the remaining commands are moved to a new queue in the command object. * They will be processed in the confirm callbacks. * Note that only one confirm command will be allowed in a Jaxon response. */ command.response = jaxon.tools.queue.create(jaxon.config.responseQueueSize); while((obj = jaxon.tools.queue.pop(jaxon.response)) != null) { jaxon.tools.queue.push(command.response, obj); delete obj; } {$sConfirmScript|noescape}; return true; }; jaxon.command.handler.register('cc', jaxon.confirm.commands);