classes_base_ajaxaction.class
Helper class to build common JavaScript codes for usage in AJAX aware controls.
Return JS code to close a previously generated confirmation dialog See AjaxAction::Confirm
Definition: public static function CloseConfirmation($text_base)
Returns: string
JS code to close the dialog if present
Parameters:
-
string $text_base
Text base the user confirmed
High level confirm procedure. This will return a standard confirmation dialog that will perform the specified action when OK is clicked. Will also set a session variable so that the OK action PHP side code can simply test with AjaxAction::IsConfirmed($text_base) if the confirmation was really shown and accepted by the user.
Definition: public static function Confirm($text_base, $controller, $event, $data)
Returns: uiConfirmation Dialog ready to be shown to the user
Parameters:
-
string $text_base
Text constants basename (like CONFIRMATION). Confirmation will need TITLE_$text_base and TXT_$text_base -
mixed $controller
Controller for OK action -
string $event
Method for OK action -
array|string $data
Data for OK action
Like AjaxAction::Confirm, but returning a Dialog that may/should be extended in code.
Definition: public static function ConfirmDlg($text_base, $controller, $event, $data)
Returns: \ScavixWDF\JQueryUI\Dialog\uiFormDialog
Parameters:
-
string $text_base
Text constants basename (like CONFIRMATION). Confirmation will need TITLE_$text_base and TXT_$text_base -
mixed $controller
Controller for OK action -
string $event
Method for OK action -
array|string $data
Data for OK action
Checks if the user has seen and accepted a confirmation. See AjaxAction::Confirm
Definition: public static function IsConfirmed($text_base)
Returns: bool
True if user clicked OK
Parameters:
-
string $text_base
Text base the user confirmed
Creates a wdf.post call.
Definition: public static function Post($controller, $event, $data, $callback)
Returns: string
Valid JS code performing wdf.post
Parameters:
-
mixed $controller
Controller to call -
string $event
Method to call -
array|string $data
Data to be posted -
string $callback
JS callback method
Creates a valid URL to a controler('s method).
Definition: public static function Url($controller, $event)
Returns: string
A valid URL for use in JavaScript wdf object
Parameters:
-
mixed $controller
Controller object, Classname or _storage_id of the controller -
string $event
Optional method to be called