Exemple #1
0
 /**
  * Class Constructor
  */
 public function __construct()
 {
     $this->{'id'} = 'tscroll_' . mt_rand(1000000000, 1999999999);
     $this->margin = 2;
     $this->transparency = FALSE;
     parent::__construct('div');
 }
 /**
  * Class Constructor
  */
 public function __construct()
 {
     $this->{'id'} = 'tscroll_' . uniqid();
     $this->margin = 2;
     $this->transparency = FALSE;
     parent::__construct('div');
 }
Exemple #3
0
 /**
  * Class Constructor
  * @param $title Dropdown title
  * @param $icon  Dropdown icon
  */
 public function __construct($title, $icon = NULL, $use_caret = TRUE)
 {
     parent::__construct('div');
     $this->{'class'} = 'btn-group';
     $this->{'style'} = 'display:inline-block; -moz-user-select: none; -webkit-user-select:none; user-select:none;';
     $button = new TElement('button');
     $button->{'data-toggle'} = 'dropdown';
     $button->{'class'} = 'btn btn-default btn-sm dropdown-toggle';
     $this->button = $button;
     if ($icon) {
         $button->add(new TImage($icon));
     }
     $button->add($title);
     if ($use_caret) {
         $span = new TElement('span');
         $span->{'class'} = 'caret';
         $button->add($span);
     }
     parent::add($button);
     //$this->id = 'tdropdown_' . mt_rand(1000000000, 1999999999);
     $this->elements = new TElement('ul');
     $this->elements->{'class'} = 'dropdown-menu pull-left';
     $this->elements->{'aria-labelledby'} = 'drop2';
     parent::add($this->elements);
 }
Exemple #4
0
 /**
  * Handle paths from a XML file
  * @param $xml_file path for the file
  */
 public function __construct()
 {
     parent::__construct('div');
     $this->{'id'} = 'div_breadcrumbs';
     $this->container = new TElement('ol');
     $this->container->{'class'} = 'tbreadcrumb';
     parent::add($this->container);
 }
Exemple #5
0
 public function __construct()
 {
     parent::__construct('div');
     $this->{'class'} = 'progress';
     $this->{'id'} = 'tprogressbar_' . mt_rand(1000000000, 1999999999);
     $this->{'style'} = 'margin-bottom:0; text-shadow: none;';
     $this->mask = '{value}%';
     $this->className = 'info';
 }
 /**
  * Class Constructor
  */
 public function __construct()
 {
     parent::__construct('div');
     $this->{'class'} = 'tcalendar';
     $this->width = 400;
     $this->height = 300;
     $this->selectedDays = array();
     $this->months = array(_t('January'), _t('February'), _t('March'), _t('April'), _t('May'), _t('June'), _t('July'), _t('August'), _t('September'), _t('October'), _t('November'), _t('December'));
 }
 /**
  * Class constructor
  * @param $label  The menu label
  * @param $action The menu action
  * @param $image  The menu image
  */
 public function __construct($label, $action, $image = NULL)
 {
     parent::__construct('li');
     $this->label = $label;
     $this->action = $action;
     if ($image) {
         $this->image = $image;
     }
 }
Exemple #8
0
 /**
  * Class Constructor
  * @param  $width   Panel's width
  * @param  $height  Panel's height
  */
 public function __construct($width, $height)
 {
     $this->{'id'} = 'tpanel_' . uniqid();
     // creates the panel style
     $this->style = new TStyle('style_' . $this->{'id'});
     $this->style->position = 'relative';
     $this->width = $width;
     $this->height = $height;
     parent::__construct('div');
     $this->{'class'} = 'style_' . $this->{'id'};
 }
Exemple #9
0
 /**
  * Class Constructor
  * @param $xml SimpleXMLElement parsed from XML Menu
  */
 public function __construct($xml, $permission_callback = NULL, $menu_level = 1, $menu_class = 'dropdown-menu', $item_class = '')
 {
     parent::__construct('ul');
     $this->items = array();
     $this->{'class'} = $menu_class . " level-{$menu_level}";
     $this->menu_class = $menu_class;
     $this->menu_level = $menu_level;
     $this->item_class = $item_class;
     if ($xml instanceof SimpleXMLElement) {
         $this->parse($xml, $permission_callback);
     }
 }
Exemple #10
0
 /**
  * Class constructor
  * @param $label  The menu label
  * @param $action The menu action
  * @param $image  The menu image
  */
 public function __construct($label, $action, $image = NULL, $level = 0)
 {
     parent::__construct('li');
     $this->label = $label;
     $this->action = $action;
     $this->level = $level;
     $this->link = new TElement('a');
     $this->linkClass = 'dropdown-toggle';
     if ($image) {
         $this->image = $image;
     }
 }
Exemple #11
0
 /**
  * Class Constructor
  * @param $name Name of the widget
  */
 public function __construct()
 {
     parent::__construct('div');
     $this->useOKButton = TRUE;
     $this->top = NULL;
     $this->left = NULL;
     $this->modal = 'true';
     $this->draggable = 'true';
     $this->resizable = 'true';
     $this->stackOrder = 2000;
     $this->{'id'} = 'jquery_dialog_' . mt_rand(1000000000, 1999999999);
     $this->{'style'} = "overflow:auto";
 }
Exemple #12
0
 /**
  * Class Constructor
  * @param  $value text label
  */
 public function __construct($width = NULL, $height = NULL)
 {
     parent::__construct('fieldset');
     $this->{'id'} = 'tfieldset_' . uniqid();
     $this->{'class'} = 'tframe';
     $this->width = $width;
     $this->height = $height;
     if ($width) {
         $this->{'style'} .= ";width:{$width}px";
     }
     if ($height) {
         $this->{'style'} .= ";height:{$height}px";
     }
 }
Exemple #13
0
 /**
  * Class Constructor
  * @param $type    Type of the alert (success, info, warning, danger)
  * @param $message Message to be shown
  */
 public function __construct($type, $message)
 {
     parent::__construct('div');
     $this->{'class'} = 'talert alert alert-dismissible alert-' . $type;
     $this->{'role'} = 'alert';
     $button = new TElement('button');
     $button->{'type'} = 'button';
     $button->{'class'} = 'close';
     $button->{'data-dismiss'} = 'alert';
     $button->{'aria-label'} = 'Close';
     $span = new TElement('span');
     $span->{'aria-hidden'} = 'true';
     $span->add('×');
     $button->add($span);
     parent::add($button);
     parent::add($message);
 }
 /**
  * Class Constructor
  * @param  $value text label
  */
 public function __construct($label = '')
 {
     parent::__construct('div');
     $this->{'id'} = 'texpander_' . uniqid();
     $this->{'class'} = 'dropdown';
     $this->button = new TElement('button');
     $this->button->{'class'} = 'btn btn-default dropdown-toggle';
     $this->button->{'type'} = 'button';
     $this->button->{'id'} = 'button_' . uniqid();
     $this->button->{'data-toggle'} = 'dropdown';
     $this->button->add($label);
     $this->container = new TElement('ul');
     $this->container->{'class'} = 'dropdown-menu texpander-container';
     $this->container->{'style'} = 'z-index: inherit';
     $this->container->{'role'} = 'menu';
     $this->container->{'aria-labelledby'} = $this->button->{'id'};
     parent::add($this->button);
     parent::add($this->container);
 }
Exemple #15
0
 /**
  * Constructor method
  * @param $title  Panel Title
  * @param $footer Panel Footer
  */
 public function __construct($title = NULL)
 {
     parent::__construct('div');
     $this->{'class'} = 'panel panel-default';
     $this->head = new TElement('div');
     $this->head->{'class'} = 'panel-heading';
     if ($title) {
         $label = new TElement('h4');
         $label->add($title);
         $panel_title = new TElement('div');
         $panel_title->{'class'} = 'panel-title';
         $panel_title->add($label);
         $this->head->add($panel_title);
         parent::add($this->head);
     }
     $this->body = new TElement('div');
     $this->body->{'class'} = 'panel-body';
     parent::add($this->body);
     $this->footer = new TElement('div');
     $this->footer->{'class'} = 'panel-footer';
 }
Exemple #16
0
 /**
  * Class Constructor
  * @param $source Image path, of bs:bs-glyphicon, fa:font-awesome
  */
 public function __construct($source)
 {
     if (substr($source, 0, 3) == 'bs:') {
         parent::__construct('span');
         $this->class = 'glyphicon glyphicon-' . substr($source, 3);
         parent::add('');
     } else {
         if (substr($source, 0, 3) == 'fa:') {
             parent::__construct('span');
             $this->class = 'fa fa-' . substr($source, 3);
             parent::add('');
         } else {
             if (file_exists($source)) {
                 parent::__construct('img');
                 // assign the image path
                 $this->src = $source;
                 $this->border = 0;
             } else {
                 if (file_exists("app/images/{$source}")) {
                     parent::__construct('img');
                     // assign the image path
                     $this->src = "app/images/{$source}";
                     $this->border = 0;
                 } else {
                     if (file_exists("lib/adianti/images/{$source}")) {
                         parent::__construct('img');
                         // assign the image path
                         $this->src = "lib/adianti/images/{$source}";
                         $this->border = 0;
                     } else {
                         parent::__construct('span');
                     }
                 }
             }
         }
     }
 }
 /**
  * Class Constructor
  */
 public function __construct()
 {
     $this->{'id'} = 'ttreeview_' . uniqid();
     $this->collapsed = FALSE;
     parent::__construct('ul');
 }
 /**
  * Class Constructor
  * @param $value  TableCell content
  */
 public function __construct($value)
 {
     parent::__construct('td');
     parent::add($value);
 }
Exemple #19
0
 /**
  * Class Constructor
  */
 public function __construct()
 {
     parent::__construct('div');
     $this->constructed = TRUE;
 }
Exemple #20
0
 /**
  * Class Constructor
  */
 public function __construct()
 {
     parent::__construct('div');
     $this->{'style'} = 'display: inline-block';
 }
Exemple #21
0
 /**
  * Class Constructor
  */
 public function __construct()
 {
     $this->{'id'} = 'ttreeview_' . mt_rand(1000000000, 1999999999);
     $this->collapsed = FALSE;
     parent::__construct('ul');
 }
 public function __construct()
 {
     parent::__construct('div');
     $this->{'style'} = 'margin: 0;';
     $this->{'class'} = 'nav navbar-nav';
 }
Exemple #23
0
 /**
  * Class Constructor
  */
 public function __construct()
 {
     parent::__construct('tr');
 }