-
Notifications
You must be signed in to change notification settings - Fork 34
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_baseText 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_baseText constants basename (like CONFIRMATION). Confirmation will need TITLE_$text_base and TXT_$text_base -
mixed $controllerController for OK action -
string $eventMethod for OK action -
array|string $dataData 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_baseText constants basename (like CONFIRMATION). Confirmation will need TITLE_$text_base and TXT_$text_base -
mixed $controllerController for OK action -
string $eventMethod for OK action -
array|string $dataData 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_baseText 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 $controllerController to call -
string $eventMethod to call -
array|string $dataData to be posted -
string $callbackJS 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 $controllerController object, Classname or _storage_id of the controller -
string $eventOptional method to be called