Пример #1
0
 /**
  * Genera el html de un botón específico
  * @param toba_evento_usuario $evento
  * @param boolean $retornar Define si devuelve como resultado el HTML o lo 'imprime'
  */
 protected function generar_html_boton($evento, $retornar = false)
 {
     $salida = '';
     //--- Link al editor
     if (toba_editor::modo_prueba()) {
         $salida .= toba_editor::get_vinculo_evento($this->_id, $this->_info['clase_editor_item'], $evento->get_id()) . "\n";
     }
     //--- Utilidades de impresion
     if ($evento->posee_accion_imprimir()) {
         $this->_utilizar_impresion_html = true;
     }
     if (!$evento->esta_anulado()) {
         $salida .= $evento->get_html($this->_submit, $this->objeto_js, $this->_id);
     }
     if ($retornar) {
         return $salida;
     } else {
         echo $salida;
     }
 }
Пример #2
0
 protected function html_cuadro_cabecera_columna_evento($rowspan, $pre_columnas)
 {
     //-- Eventos sobre fila
     if ($this->_cuadro->cant_eventos_sobre_fila() > 0) {
         foreach ($this->_cuadro->get_eventos_sobre_fila() as $evento) {
             $etiqueta = ' ';
             if ($evento->es_seleccion_multiple()) {
                 $etiqueta = $evento->get_etiqueta();
             }
             /**
              * Condiciones gobernantes:
              *  Evento con alineacion a Izquierda
              *  Se estan graficando eventos pre-columnas de datos
              *
              *
              * El evento se grafica unicamente cuando se dan ambas condiciones o
              * cuando no se cumple ninguna de las dos, logicamente  eso seria:
              * ((A || !B) && (!A || B)) lo cual es igual a un XOR negado.
              */
             if (!($pre_columnas xor $evento->tiene_alineacion_pre_columnas())) {
                 echo "<td {$rowspan} class='ei-cuadro-col-tit'>{$etiqueta}";
                 if (toba_editor::modo_prueba()) {
                     $info_comp = $this->_cuadro->get_informacion_basica_componente();
                     echo toba_editor::get_vinculo_evento($this->_cuadro->get_id(), $info_comp['clase_editor_item'], $evento->get_id()) . "\n";
                 }
                 echo "</td>\n";
             }
         }
     }
 }
Пример #3
0
 /**
  * @ignore 
  */
 protected function generar_formulario_encabezado()
 {
     //¿Algún EF tiene etiqueta?
     $alguno_tiene_etiqueta = false;
     foreach ($this->_lista_ef_post as $ef) {
         if ($this->_elemento_formulario[$ef]->get_etiqueta() != '') {
             $alguno_tiene_etiqueta = true;
             break;
         }
     }
     if ($alguno_tiene_etiqueta) {
         echo "<thead id='cabecera_{$this->objeto_js}'>\n";
         //------ TITULOS -----
         echo "<tr>\n";
         $primera = true;
         foreach ($this->_lista_ef_post as $ef) {
             $id_form = $this->_elemento_formulario[$ef]->get_id_form_orig();
             $extra = '';
             if ($primera) {
                 $extra = 'colspan="' . ($this->_colspan + 1) . '"';
             }
             echo "<th {$extra} id='nodo_{$id_form}' class='ei-ml-columna'>\n";
             if ($this->_elemento_formulario[$ef]->get_toggle()) {
                 $this->_hay_toggle = true;
                 $id_form_toggle = 'toggle_' . $id_form;
                 echo "<input id='{$id_form_toggle}' type='checkbox' class='ef-checkbox' onclick='{$this->objeto_js}.toggle_checkbox(\"{$ef}\")' />";
             }
             $this->generar_etiqueta_columna($ef);
             echo "</th>\n";
             $primera = false;
         }
         if ($this->_info_formulario['filas_ordenar'] && $this->_ordenar_en_linea) {
             echo "<th class='ei-ml-columna'>&nbsp;\n";
             echo "</th>\n";
         }
         //-- Eventos sobre fila
         if ($this->cant_eventos_sobre_fila() > 0) {
             foreach ($this->get_eventos_sobre_fila() as $evento) {
                 echo "<th class='ei-ml-columna ei-ml-columna-extra'>&nbsp;\n";
                 if (toba_editor::modo_prueba()) {
                     echo toba_editor::get_vinculo_evento($this->_id, $this->_info['clase_editor_item'], $evento->get_id()) . "\n";
                 }
                 echo "</th>\n";
             }
         }
         if ($this->_info_formulario['filas_agregar'] && $this->_borrar_en_linea) {
             echo "<th class='ei-ml-columna'>&nbsp;\n";
             echo "</th>\n";
         }
         echo "</tr>\n";
         echo "</thead>\n";
     }
 }