public function CreateNavButtons()
 {
     if (!$this->blnCreateNavButtonsCalled) {
         $cssClass = MJaxApplication::CssClass('cmdLineButton');
         $this->AddCssClass(MJaxApplication::CssClass('caseStudyPanel'));
         $this->btnNext = new MJaxLinkButton($this, $this->strControlId . '_btnNext');
         $objPlugin = new MJaxScrollToPlugin($this->objForm, '#' . $this->objForm->GetCaseStudyIndex($this->strControlId, +1), array(), 1200);
         $objPlugin->SetTargetControl($this->objForm->MainWindow);
         $objPlugin->UseFirstChild = true;
         $this->btnNext->AddAction(new MJaxClickEvent(), new MJaxPluginAction($objPlugin));
         $this->btnNext->Text = "next/";
         $this->btnNext->ActionParameter = $this->strControlId;
         $this->btnNext->AddCssClass($cssClass);
         $this->btnPrev = new MJaxLinkButton($this, $this->strControlId . '_btnPrev');
         $objPlugin = new MJaxScrollToPlugin($this->objForm, '#' . $this->objForm->GetCaseStudyIndex($this->strControlId, -1), array(), 1200);
         $objPlugin->SetTargetControl($this->objForm->MainWindow);
         $objPlugin->UseFirstChild = true;
         $this->btnPrev->AddAction(new MJaxClickEvent(), new MJaxPluginAction($objPlugin));
         $this->btnPrev->Text = "previous/";
         $this->btnPrev->ActionParameter = $this->strControlId;
         $this->btnPrev->AddCssClass($cssClass);
         $this->blnCreateNavButtonsCalled = true;
     } else {
         throw new QCallerException("Function CreateNavButtons has already been called");
     }
 }
Exemplo n.º 2
0
 public function __construct(MJaxTouchPage $objParentControl, $strControlId = null)
 {
     parent::__construct($objParentControl, $strControlId);
     $this->objForm->RegisterScreen($this);
     $this->AddCssClass(MJaxApplication::CssClass(MJaxTouchCssClass::MJaxTouchForm));
     $this->Attr('action', $_SERVER[MLCServer::REQUEST_URI]);
     $this->strTransition = $this->objForm->DefaultTransition;
 }
 public function __construct($strClassName)
 {
     $this->strClassName = $strClassName;
     $this->objStyle = new MJaxControlStyle();
     //Automatically register with MJaxApplication
     $this->blnModified = true;
     MJaxApplication::RegisterCssClass($this);
 }
 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 __construct($objParentControl, $strControlId = null, $intIncriment = 400)
 {
     parent::__construct($objParentControl, $strControlId);
     $this->intIncriment = $intIncriment;
     $cssClass = MJaxApplication::CssClass(MJaxCssClass::SCROLLBAR_HOLDER);
     $this->AddCssClass($cssClass);
     $cssClass = MJaxApplication::CssClass(MJaxCssClass::SCROLLBAR_SLIDER);
     $this->pnlSlider = new MJaxPanel($this, 'pnlSlider' . $this->strControlId);
     $this->pnlSlider->AddCssClass($cssClass);
 }
Exemplo n.º 6
0
 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 function AddListItem($mixChild, $strId = null)
 {
     if (is_null($strId)) {
         $strId = $this->strControlId . "_li" . count($this->arrChildControls);
     }
     if (class_exists($mixChild, true) && MJaxApplication::HasParent($mixChild, 'MJaxTouchControl')) {
         $ctlListItem = new MJaxTouchListItem($this, $strId . "_li");
         $ctlListItem->AutoRenderChildren = true;
         $cltToReturn = new $mixChild($ctlListItem, $strId);
         return $cltToReturn;
     } elseif (is_string($mixChild)) {
         $ctlListItem = new MJaxTouchListItem($this, $strId);
         $ctlListItem->Text = $mixChild;
         return $ctlListItem;
     } else {
         throw new QCallerException("First parameter must be either a string or the name of a class that extends 'MJaxTouchControl' ");
     }
 }
 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);
 }
 public function __construct($objParentControl, $strControlId = null)
 {
     parent::__construct($objParentControl, $strControlId);
     $this->AddCssClass(MJaxApplication::CssClass('MJaxTouchLinkButton'));
     $this->Attr('href', '#');
 }
Exemplo n.º 14
0
 public function AddCssClass($mixCssClass)
 {
     if ($mixCssClass instanceof MJaxCssClass) {
         $this->blnModified = true;
         $this->arrCssClasses[$mixCssClass->ClassName] = $mixCssClass;
     } elseif (is_string($mixCssClass)) {
         $this->blnModified = true;
         $this->arrCssClasses[$mixCssClass] = MJaxApplication::CssClass($mixCssClass);
     } else {
         throw new QCallerException("AddCssClass must have either a string or a MJaxCssClass passed in as the first argument");
     }
 }
 public function __construct($objParentControl, $strControlId = null)
 {
     parent::__construct($objParentControl, $strControlId);
     $this->AddCssClass(MJaxApplication::CssClass(MLCCssClass::CASESTUDY_LAB));
 }