Beispiel #1
0
 public function setPlaceholder($value)
 {
     if (JString::isNull($value)) {
         if (JString::isNotNull($this->identifier)) {
             $value = \ucfirst($this->identifier);
         }
     }
     if (JString::isNotNull($value)) {
         $this->setProperty("placeholder", $value);
     }
     return $this;
 }
 protected function _ajax($method, $url, $params = "{}", $responseElement = "", $jsCallback = NULL, $attr = "id", $hasLoader = true, $immediatly = false)
 {
     if (JString::isNull($params)) {
         $params = "{}";
     }
     $jsCallback = isset($jsCallback) ? $jsCallback : "";
     $retour = $this->_getAjaxUrl($url, $attr);
     $responseElement = $this->_getResponseElement($responseElement);
     $retour .= "var self=this;\n";
     if ($hasLoader === true) {
         $this->addLoading($retour, $responseElement);
     }
     $retour .= "\$." . $method . "(url," . $params . ").done(function( data ) {\n";
     $retour .= $this->_getOnAjaxDone($responseElement, $jsCallback) . "});\n";
     if ($immediatly) {
         $this->jquery_code_for_compile[] = $retour;
     }
     return $retour;
 }