Exemple #1
0
 public function clearMessages(Core_Sijax_Response $objResponse)
 {
     //Delete messages from the database...
     //Clear the messages container
     $objResponse->html('#messages', '');
     //Clear the textbox
     $objResponse->attr('#message', 'value', '');
     //Ensure the textbox has focus
     $objResponse->script("\$('#message').focus();");
 }
    public function getJson()
    {
        ob_start();
        echo '
		<script type="text/javascript">
			window.parent.Sijax.processCommands(', parent::getJson(), ');
		</script>';
        return ob_get_clean();
    }
 public function getJson()
 {
     parent::call('sjxSuggest.processResponse', array($this->_response));
     return parent::getJson();
 }
Exemple #4
0
 /**
  * Prepares the callback function arguments and calls it.
  *
  * The optional $requestArgs array allows the detected request args
  * which may have been altered by the response object to be overriden.
  * It's not used for normal requests.
  * Events and manually executed callbacks however override the request args.
  *
  * @param callback $callback
  * @param Core_Sijax_Response $objResponse
  * @param array $requestArgs
  */
 private static function _callFunction($callback, Core_Sijax_Response $objResponse, $requestArgs = null)
 {
     if ($requestArgs === null) {
         /**
          * Normal functions are called like this.
          * The object response class was given the args before,
          * but may have changed them
          */
         $requestArgs = $objResponse->getRequestArgs();
     }
     $args = array_merge(array($objResponse), $requestArgs);
     call_user_func_array($callback, $args);
 }
 public function getJson()
 {
     return "\n\t\t<script type='text/javascript'>\n\t\twindow.parent.sjxUpload.processResponse(" . json_encode($this->_formId) . ", " . parent::getJson() . ");\n\t\t</script>";
 }