Пример #1
0
 /**
  * @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);
 }
Пример #2
0
 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;
     }
 }
Пример #3
0
 public function __construct($objParent, $strControlId = null)
 {
     parent::__construct($objParent, $strControlId);
     //$this->AddCssFile(__BOOTSTRAP_CSS__);
     Bootstrap::LoadJS($this);
 }
Пример #4
0
 /**
  * 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');
 }
Пример #5
0
 public function __construct($objParent, $strControlId = null)
 {
     parent::__construct($objParent, $strControlId);
     $this->SetHtmlAttribute("role", "alert");
     Bootstrap::LoadJS($this);
 }
Пример #6
0
 public function __construct($objParent, $strControlId = null)
 {
     parent::__construct($objParent, $strControlId);
     Bootstrap::LoadJS($this);
     $this->AddCssClass(Bootstrap::FormControl);
 }