/** * @param \QControl|\QControlBase|\QForm $objParent * @param null $strControlId * @throws \Exception * @throws \QCallerException */ public function __construct($objParent, $strControlId = null) { parent::__construct($objParent, $strControlId); $this->AddCssClass('nav nav-tabs'); // default to tabs $this->SetHtmlAttribute('role', 'tablist'); $this->objItemStyle = new \QListItemStyle(); $this->objItemStyle->SetHtmlAttribute('role', 'presentation'); $this->AddAction(new Nav_SelectEvent(), new \QAjaxControlAction($this, 'tab_Click')); $this->blnUseWrapper = true; // since its a compound control, a wrapper is required if redraw is forced. $this->blnIsBlockElement = true; Bootstrap::LoadJS($this); }
public function __set($strName, $mixValue) { switch ($strName) { case 'Dismissable': case "HasCloseButton": // QCubed synonym $blnDismissable = QType::Cast($mixValue, QType::Boolean); if ($blnDismissable != $this->blnDismissable) { $this->blnDismissable = $blnDismissable; $this->blnModified = true; if ($blnDismissable) { $this->AddCssClass(Bootstrap::AlertDismissable); Bootstrap::LoadJS($this); } else { $this->RemoveCssClass(Bootstrap::AlertDismissable); } } break; case '_Visible': // Private attribute to record the visible state of the alert $this->blnVisible = $mixValue; break; default: try { parent::__set($strName, $mixValue); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } break; } }
public function __construct($objParent, $strControlId = null) { parent::__construct($objParent, $strControlId); //$this->AddCssFile(__BOOTSTRAP_CSS__); Bootstrap::LoadJS($this); }
/** * Modal constructor. * @param \QControlBase|\QForm $objParentObject * @param string|null $strControlId */ public function __construct($objParentObject, $strControlId = null) { parent::__construct($objParentObject, $strControlId); $this->mixCausesValidation = $this; Bootstrap::LoadJS($this); $this->AddPluginCssFile($this, __BOOTSTRAP_CSS__); $this->AddPluginJavascriptFile('bootstrap', 'qc.bs.modal.js'); /* Setup wrapper to prevent flash drawing of unstyled dialog. */ $objWrapperStyler = $this->GetWrapperStyler(); $objWrapperStyler->AddCssClass('modal fade'); $objWrapperStyler->SetHtmlAttribute('tabIndex', -1); $objWrapperStyler->SetHtmlAttribute('role', 'dialog'); }
public function __construct($objParent, $strControlId = null) { parent::__construct($objParent, $strControlId); $this->SetHtmlAttribute("role", "alert"); Bootstrap::LoadJS($this); }
/** * A helper class to quickly set the size of the label part of an object, and the form control part of the object * for a particular device size. Bootstrap is divided into 12 columns, so whatever the label does not take is * left for the control. * * If the contrtol does not have a "Name", we will assume that the label will not be printed, so we will move the * control into the control side of things. * * @param $strDeviceSize * @param $intColumns */ public function SetHorizontalLabelColumnWidth($strDeviceSize, $intColumns) { $intCtrlCols = 12 - $intColumns; if ($this->Name) { // label next to control $this->AddLabelClass(Bootstrap::CreateColumnClass($strDeviceSize, $intColumns)); $this->AddHorizontalColumnClass($strDeviceSize, $intCtrlCols); } else { // no label, so shift control to other column $this->AddHorizontalColumnClass($strDeviceSize, 0, $intColumns); $this->AddHorizontalColumnClass($strDeviceSize, $intCtrlCols); } }
public function __construct($objParent, $strControlId = null) { parent::__construct($objParent, $strControlId); Bootstrap::LoadJS($this); $this->AddCssClass(Bootstrap::FormControl); }