Ejemplo n.º 1
0
 /**
  *  Genera el cuerpo del selector
  */
 private function html_cuerpo_selector()
 {
     $columnas = $this->_cuadro->get_columnas();
     $objeto_js = $this->_cuadro->get_id_objeto_js();
     $cuerpo = '';
     foreach ($columnas as $col) {
         if ($col['no_ordenar'] != 1) {
             //Saco el contenedor de la fila y un checkbox para seleccionar.
             $cuerpo .= "<tr id='fila_{$col['clave']}'  onclick=\"{$objeto_js}.seleccionar_fila_selector('{$col['clave']}');\" class='ei-ml-fila'><td>";
             $cuerpo .= toba_form::checkbox('check_' . $col['clave'], null, '0', 'ef-checkbox', "onclick=\"{$objeto_js}.activar_fila_selector('{$col['clave']}');\" ");
             $cuerpo .= "</td><td> {$col['titulo']}</td><td>";
             //Saco el radiobutton para el sentido ascendente
             $id = $col['clave'] . '0';
             $cuerpo .= "<label class='ef-radio' for='{$id}'><input type='radio' id='{$id}' name='radio_{$col['clave']}' value='asc'  disabled/>Ascendente</label>";
             $cuerpo .= '</td><td>';
             //Saco el radiobutton para el sentido descendente
             $id = $col['clave'] . '1';
             $cuerpo .= "<label class='ef-radio' for='{$id}'><input type='radio' id='{$id}' name='radio_{$col['clave']}' value='des'  disabled/>Descendente</label>";
             $cuerpo .= '</td></tr>';
         }
     }
     $cuerpo .= "<tr class='ei-botonera'><td colspan='4'>" . toba_form::button('botonazo', 'Aplicar', "onclick=\"{$objeto_js}.aplicar_criterio_ordenamiento();\"") . '</td></tr>';
     echo $cuerpo;
 }
Ejemplo n.º 2
0
 function get_input()
 {
     if (!isset($this->estado)) {
         $this->estado = '';
     }
     $html = "";
     if ($this->es_solo_lectura()) {
         $clase = $this->clase . ' ef-input-solo-lectura';
         $html .= toba_form::textarea($this->id_form, $this->estado, $this->lineas, $this->tamano, $clase, $this->wrap, " readonly");
     } else {
         $this->input_extra .= $this->get_info_placeholder();
         if ($this->resaltar) {
             $javascript = " onclick='javascript: document.getElementById('{$this->id_form}').select()'";
             $html .= toba_form::button($this->id_form . "_res", "Seleccionar", $javascript);
         }
         if ($this->maximo) {
             $obj = $this->objeto_js();
             $this->javascript .= "onkeydown=\"{$obj}.validar()\" onkeyup=\"{$obj}.validar()\"";
         }
         $tab = ' tabindex="' . $this->padre->get_tab_index() . '"';
         $html .= toba_form::textarea($this->id_form, $this->estado, $this->lineas, $this->tamano, $this->clase, $this->wrap, $this->javascript . ' ' . $this->input_extra . $tab);
     }
     $html .= $this->get_html_iconos_utilerias();
     return $html;
 }