Example #1
0
 /**
  * Construtor
  * @var \stdClass $param
  */
 public function __construct(\stdClass $param)
 {
     $combo = new Select($param->name, $param->options, NULL, NULL, isset($param->selected) ? $param->selected : NULL);
     $combo->safeToggle($param, 'id');
     if (isset($param->multiple)) {
         $combo->multiple = 'multiple';
     }
     if (isset($param->attrs)) {
         $combo->setProperties($param->attrs);
     }
     if (isset($param->class)) {
         $combo->addClass($param->class);
     }
     $this->_combo = Div::factory()->addClass('controls')->add($combo);
 }
Example #2
0
 /**
  * criar select que possibilita definir a quantidade registros por pagina
  *
  * @return Div
  * */
 public function selectorCount()
 {
     if ($this->_disablePagination) {
         return Div::factory()->addClass(array('row-fluid', 'grid-select-length-bar'));
     }
     $select = new Select($this->_name . '_length', $this->_selectorCount);
     $select->addClass('span2');
     $divLength = Div::factory()->attr('id', $this->_name . '_length')->addClass(array('dataTables_length', 'span6'))->add(array(new Label('Registros por página '), $select));
     $loadingText = 'Carregando registros' . '<span class="threeLittleDots">.</span>' . '<span class="threeLittleDots">.</span>' . '<span class="threeLittleDots">.</span>';
     $divLoader = Div::factory()->attr('id', $this->_name . '_processing')->addClass(array('dataTables_processing', 'span6'))->setContent(new Label($loadingText));
     return Div::factory()->add(array($divLoader, $divLength))->addClass(array('row-fluid', 'grid-select-length-bar'));
 }