public function Render($blnPrint = true) { $strProperties = MJaxApplication::ConvertArrayToJason($this->arrProperties); $strRendered = sprintf("\$('%s').jqFancyTransitions(%s);", $this->strSelector, $strProperties); if ($blnPrint) { _p($strRendered, false); } else { return $strRendered; } }
public function Render($blnPrint = true) { $strRendered = "var jQT = new \$.jQTouch("; $strRendered .= MJaxApplication::ConvertArrayToJason($this->arrConfig); $strRendered .= ");\n"; if ($blnPrint) { _p($strRendered); } else { return $strRendered; } }
public function Render($blnPrint = true) { if (!$this->blnModified) { return; } $strProperties = MJaxApplication::ConvertArrayToJason($this->arrProperties); $strRendered = sprintf("\$('%s').datepicker(%s);", $this->strSelector, $strProperties); $this->blnModified = false; if ($blnPrint) { _p($strRendered, false); } else { return $strRendered; } }
public function Render($blnPrint = true) { if (!$this->blnModified) { return; } $strProperties = MJaxApplication::ConvertArrayToJason($this->arrProperties); $strRendered = sprintf("\$('%s').fancybox(%s);", $this->strSelector, $strProperties); if ($this->blnTriggerNow) { $strRendered .= sprintf("\$('%s').trigger('click');", $this->strSelector); } $this->blnModified = false; if ($blnPrint) { _p($strRendered, false); } else { return $strRendered; } }
public static function ConvertArrayToJason($arrProperties) { $strProperties = "{"; if (count($arrProperties) > 0) { foreach ($arrProperties as $strKey => $strValue) { if (is_array($strValue)) { $strValue = MJaxApplication::ConvertArrayToJason($strValue); } else { if (!is_numeric($strValue) && strpos($strValue, "'") === false) { $strValue = "'" . $strValue . "'"; } } $strProperties .= sprintf("'%s':%s,\n", $strKey, $strValue); } //Remove Trailing ',' $strProperties = substr($strProperties, 0, strlen($strProperties) - 2); } $strProperties .= "}\n"; return $strProperties; }
public function Render($blnPrint = true) { if (!$this->blnModified) { return; } if (is_array($this->mixProperties)) { $strProperties = MJaxApplication::ConvertArrayToJason($this->mixProperties); } elseif (is_string($this->mixProperties)) { $strProperties = $this->mixProperties; } elseif ($this->mixProperties instanceof MJaxControlStyle) { $strProperties = $this->mixProperties->__toJason(); } else { throw new QCallerException("mixProperties needs to be either an array, a string or a MJaxControlStyle"); } $strRendered = sprintf("\$('%s').animate(%s, %s);", $this->strSelector, $strProperties, $this->intDuration); $this->blnModified = false; if ($blnPrint) { _p($strRendered, false); } else { return $strRendered; } }
public function __toJason() { return MJaxApplication::ConvertArrayToJason($this->arrAttributes); }