function get_input() { //-- Si tiene un estado, ponerlo como única opción $this->opciones = array(); if (isset($this->descripcion_estado)) { $this->opciones[$this->estado] = $this->descripcion_estado; } $html = ""; //El estado que puede contener muchos datos debe ir en un unico string $estado = $this->get_estado_para_input(); if ($this->es_solo_lectura()) { $html .= toba_form::select("", $estado, $this->opciones, $this->clase_css, "disabled"); $html .= toba_form::hidden($this->id_form, $estado); return $html; } else { $tab = $this->padre->get_tab_index(); $extra = " tabindex='{$tab}'"; $js = ''; if ($this->cuando_cambia_valor != '') { $js = "onchange=\"{$this->get_cuando_cambia_valor()}\""; } $html .= toba_form::select($this->id_form, $estado, $this->opciones, 'ef-combo', $js . $this->input_extra . $extra, $this->categorias); } $html .= $this->get_html_iconos_utilerias(); return $html; }
function get_input() { //Esto es para eliminar un notice en php 5.0.4 if (!isset($this->estado)) { $this->estado = null; } if ($this->es_solo_lectura()) { $html = toba_form::hidden($this->id_form, $this->seleccionado() ? $this->valor : $this->valor_no_seteado); if ($this->seleccionado()) { $html .= toba_recurso::imagen_toba('nucleo/efcheck_on.gif', true, 16, 16); } else { $html .= toba_recurso::imagen_toba('nucleo/efcheck_off.gif', true, 16, 16); } } else { $js = ''; if ($this->cuando_cambia_valor != '') { $js = "onchange=\"{$this->get_cuando_cambia_valor()}\""; } $tab = $this->padre->get_tab_index(); $extra = " tabindex='{$tab}'"; $html = toba_form::checkbox($this->id_form, $this->estado, $this->valor, $this->clase_css, $extra . ' ' . $js); } $html .= $this->get_html_iconos_utilerias(); return $html; }
static function enviar_csrf_hidden() { $tm = toba::memoria(); if ($tm->existe_dato_operacion(apex_sesion_csrt)) { $valor = $tm->get_dato_operacion(apex_sesion_csrt); echo toba_form::hidden(apex_sesion_csrt, $valor); } }
function get_input() { $tab = ' tabindex="' . $this->padre->get_tab_index() . '" '; $tab .= $this->get_info_placeholder(); $html = toba_form::text($this->id_form, $this->estado, $this->es_solo_lectura(), 22, 29, $this->clase_css, $this->javascript . ' ' . $tab); $html .= $this->get_html_iconos_utilerias(); return $html; }
function generar_html() { //Genero la interface echo "\n\n<!-- ***************** Inicio EI FIRMA (\t" . $this->_id[1] . " )\t***********\t-->\n\n"; echo toba_form::hidden($this->_submit, ''); //echo toba_form::hidden($this->_id_post_codigo, ''); // Aca viaja el codigo echo $this->get_html_barra_editor(); $this->generar_html_barra_sup(null, true, "ei-form-barra-sup"); $this->generar_applet(); }
function generar_html() { //Genero la interface echo "\n\n<!-- ***************** Inicio EI CODIGO (\t" . $this->_id[1] . " )\t***********\t-->\n\n"; echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_id_post_codigo, ''); // Aca viaja el codigo echo $this->get_html_barra_editor(); $this->generar_html_barra_sup(null, true, "ei-form-barra-sup"); echo "<textarea id='code'>"; echo $this->get_datos(); echo "</textarea>"; }
function generar_layout() { $firmador = get_firmador(); $url_firmador = toba_recurso::url_proyecto() . "/firmador_pdf/firmador.jar"; $url_firmador = $firmador->get_url_base_actual() . $url_firmador; $url_descarga = toba::vinculador()->get_url(null, "30000064", array('accion' => "descargar"), array(), true); $url_descarga = $firmador->get_url_base_actual() . $url_descarga; $url_subir = toba::vinculador()->get_url(null, "30000064", array('accion' => "subir"), array(), true); $url_subir = $firmador->get_url_base_actual() . $url_subir; $url_pdf = toba::vinculador()->get_url(null, "30000064", array('accion' => "descargar"), array(), false); //No necesita url_encode $url_pdf = $firmador->get_url_base_actual() . $url_pdf; $firmador->generar_applet($url_firmador, $url_descarga, $url_subir, "Prueba"); $firmador->generar_visor_pdf(dirname($url_firmador) . '/pdfobject.min.js', $url_pdf, "800px", "400px"); echo toba_form::hidden("firmador_codigo", $firmador->generar_sesion()); }
function get_input() { $tab = $this->padre->get_tab_index(); $extra = " tabindex='{$tab}'"; $estado = $this->get_estado_input(); //--- Se puede cargar con el nombre del archivo o el arreglo que php brinda //--- al hacer el upload if (is_array($estado)) { $nombre_archivo = isset($estado['name']) ? $estado['name'] : current($estado); } else { $nombre_archivo = $estado; } //-- Si hay un archivo lo deja marcado en sesion para la etapa siguiente if (isset($nombre_archivo) && trim($nombre_archivo) != '') { if (!$this->permitir_html) { $nombre_archivo = texto_plano($nombre_archivo); } toba::memoria()->set_dato_sincronizado($this->id_form . "_cargado", true); } $salida = ""; if (!$this->es_solo_lectura()) { if (isset($nombre_archivo) && $nombre_archivo != '') { $salida .= toba_form::archivo($this->id_form, null, $this->clase_css, "style='display:none'"); $salida .= "<div id='{$this->id_form}_desicion' class='ef-upload-desc'>" . $nombre_archivo . "</div>"; $salida .= toba_form::checkbox("{$this->id_form}_check", null, 1, 'ef-checkbox', "{$extra} onclick=\"{$this->objeto_js()}.set_editable()\""); $salida .= "<label for='{$this->id_form}_check'>Cambiar el Archivo</label>"; } else { $salida = toba_form::archivo($this->id_form, null, $this->clase_css, $extra); $salida .= toba_form::checkbox("{$this->id_form}_check", 1, 1, 'ef-checkbox', "style='display:none'"); } } else { // En modo sólo lectura if (isset($nombre_archivo) && $nombre_archivo != '') { $salida = "<div class='ef-upload-desc'>" . $nombre_archivo . "</div>"; } else { $salida = toba_form::archivo($this->id_form, null, $this->clase_css, "disabled='disabled'"); } } $salida .= $this->get_html_iconos_utilerias(); return $salida; }
function generar_html() { echo "\n<table class='ei-base ei-esquema-base'>\n"; echo "<tr><td style='padding:0'>\n"; echo $this->get_html_barra_editor(); $this->generar_html_barra_sup(null, true, "ei-esquema-barra-sup"); $colapsado = isset($this->_colapsado) && $this->_colapsado ? "style='display:none'" : ""; echo "<div {$colapsado} id='cuerpo_{$this->objeto_js}'>"; //Campo de sincronizacion con JS echo toba_form::hidden($this->_submit, ''); $this->s__path = toba_dir() . '/temp/' . uniqid() . '.png'; try { $this->_conf->imagen__generar($this->s__path); } catch (JpGraphException $e) { throw new toba_error("TOBA EI GRAFICO: Error en la librería jpgraph. \n\t\t\t\tEl error reportado fue el siguiente: '" . $e->getMessage() . "'. Si este\n\t\t\t\tes un error de fuentes intente definir el path de las fuentes en\n\t\t\t\tsu sistema a través de la entrada fonts_path en el archivo instancia.ini.\n\t\t\t\tEjemplo: 'fonts_path = /usr/share/fonts/truetype/msttcorefonts/'"); } $destino = array($this->_id); $url = toba::vinculador()->get_url(null, null, array(), array('servicio' => 'mostrar_imagen', 'objetos_destino' => $destino)); echo "<img src='{$url}' {$this->_ancho} {$this->_alto} border='0'>"; //$this->generar_botones(); echo "</div></td></tr>\n"; echo "</table>\n"; }
function generar_html() { $ancho = ''; if (isset($this->_ancho)) { $ancho = "width ='{$this->_ancho}'"; } echo "\n<table class='ei-base ei-esquema-base' {$ancho}>\n"; echo "<tr><td style='padding:0'>\n"; echo $this->get_html_barra_editor(); $this->generar_html_barra_sup(null, true, "ei-esquema-barra-sup"); $colapsado = isset($this->_colapsado) && $this->_colapsado ? "style='display:none'" : ""; echo "<div {$colapsado} id='cuerpo_{$this->objeto_js}'>"; //Campo de sincronizacion con JS echo toba_form::hidden($this->_submit, ''); if (isset($this->_contenido)) { //Se arma el archivo .dot toba::logger()->debug($this->get_txt() . " [ Diagrama ]:\n{$this->_contenido}", 'toba'); $this->generar_esquema($this->_contenido, $this->_info_esquema['formato'], $this->_info_esquema['dirigido'], $this->_ancho, $this->_alto, $this->_incluir_mapa, $this->objeto_js); } $this->generar_botones(); echo "</div></td></tr>\n"; echo "</table>\n"; }
/** * Genera el html de todo el componente, incluyendo hiddens necesarios para el correcto funcionamiento del componente */ function generar_html() { echo "\n<!-- ################################## Inicio CI ( " . $this->_id[1] . " ) ######################## -->\n\n"; $ancho = isset($this->_info_ci["ancho"]) ? "style='width:{$this->_info_ci["ancho"]};'" : ''; echo "<table class='ei-base ci-base' {$ancho} id='{$this->objeto_js}_cont'><tr><td style='padding:0;'>\n"; echo $this->controlador->get_html_barra_editor(); $class_extra = ''; if ($this->_info_ci['tipo_navegacion'] == self::NAVEGACION_TAB_HORIZONTAL) { $class_extra = 'ci-barra-sup-tabs'; } $this->generar_html_barra_sup(null, true, "ci-barra-sup {$class_extra}"); $colapsado = isset($this->_colapsado) && $this->_colapsado ? "style='display:none'" : ""; echo "<div {$colapsado} id='cuerpo_{$this->objeto_js}'>\n"; //-->Listener de eventos if (count($this->_eventos) > 0 || count($this->_eventos_usuario_utilizados) > 0) { echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_submit . "__param", ''); } //--> Cuerpo del CI $alto = isset($this->_info_ci["alto"]) ? "style='_height:" . $this->_info_ci["alto"] . ";min-height:" . $this->_info_ci["alto"] . "'" : ""; echo "<div class='ci-cuerpo' {$alto}>\n"; $this->generar_html_cuerpo(); echo "</div>\n"; //--> Botonera if ($this->botonera_abajo()) { $this->generar_botones('ci-botonera ci-botonera-abajo'); } if ($this->_utilizar_impresion_html) { $this->generar_utilidades_impresion_html(); } echo "\n</div>"; echo "</td></tr></table>"; echo "\n<!-- ################################### Fin CI ( " . $this->_id[1] . " ) ######################## -->\n\n"; }
static function button($nombre, $valor, $extra = "", $clase = "ei-boton", $tecla = null) { if ($tecla === null) { return "<INPUT type='button' name='{$nombre}' id='{$nombre}' value='{$valor}' class='{$clase}' {$extra} />\n"; } else { return toba_form::button_html($nombre, $valor, $extra, 0, $tecla, '', 'button', '', $clase); } }
protected function generar_campos_hidden() { parent::generar_campos_hidden(); echo toba_form::hidden($this->_submit . '__nodos_invisibles', ''); echo toba_form::hidden($this->_submit . '__nodos_visibles', ''); }
protected function generar_input_ef($ef) { $this->_efs_generados[] = $ef; $id = $this->_elemento_formulario[$ef]->get_id_form(); echo toba_form::hidden($id, ''); }
function generar_html() { //Genero la interface echo "\n\n<!-- ***************** Inicio EI FORMULARIO (\t" . $this->_id[1] . " )\t***********\t-->\n\n"; //Campo de sincroniacion con JS echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_submit . '_implicito', ''); $ancho = ''; if (isset($this->_info_formulario["ancho"])) { $ancho = convertir_a_medida_tabla($this->_info_formulario["ancho"]); } echo "<table class='{$this->_estilos}' {$ancho}>"; echo "<tr><td style='padding:0'>"; echo $this->get_html_barra_editor(); $this->generar_html_barra_sup(null, true, "ei-form-barra-sup"); $this->generar_formulario(); echo "</td></tr>\n"; echo "</table>\n"; $this->_flag_out = true; }
protected function generar_campos_hidden() { echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_submit . '__apertura_datos', ''); echo toba_form::hidden($this->_submit . '__seleccion', ''); }
</tr> </table> </td></tr> <?php $item_actual = toba::memoria()->get_item_solicitado(); //------------ TABS $tabs = array(array('nombre' => 'Operaciones', 'imagen' => toba_recurso::imagen_proyecto('item.gif', true), 'url' => toba::vinculador()->get_url(toba_editor::get_id(), 1000239, null, array('menu' => true, 'celda_memoria' => 'lateral')), 'ayuda' => 'Operaciones disponibles en el Proyecto'), array('nombre' => 'Comp.', 'imagen' => toba_recurso::imagen_toba('objetos/objeto.gif', true), 'url' => toba::vinculador()->get_url(toba_editor::get_id(), 1240, null, array('menu' => true, 'celda_memoria' => 'lateral')), 'ayuda' => 'Componentes disponibles en el Proyecto'), array('nombre' => 'Datos', 'imagen' => toba_recurso::imagen_toba('fuente.png', true), 'url' => toba::vinculador()->get_url(toba_editor::get_id(), 3397, null, array('menu' => true, 'celda_memoria' => 'lateral')), 'ayuda' => 'Acceso a datos'), array('nombre' => 'PHP', 'imagen' => toba_recurso::imagen_toba('nucleo/php.gif', true), 'url' => toba::vinculador()->get_url(toba_editor::get_id(), 30000012, null, array('menu' => true, 'celda_memoria' => 'lateral')), 'ayuda' => 'Código PHP del proyecto'), array('nombre' => 'Conf.', 'imagen' => toba_recurso::imagen_toba('configurar.png', true), 'url' => toba::vinculador()->get_url(toba_editor::get_id(), 1000258, null, array('menu' => true, 'celda_memoria' => 'lateral')), 'ayuda' => 'Configuración general del proyecto')); echo "<tr class='listado-barra-fila'><td class='ci-tabs-h-lista'>\n"; echo "<ul style='margin-top: 6px'>\n"; $id = 'id="tab_inicial"'; $i = 0; foreach ($tabs as $tab) { if ($i == 0) { $class = 'ci-tabs-h-solapa-sel'; } else { $class = 'ci-tabs-h-solapa'; } echo "<li class='{$class}'>"; echo "<a {$id} href='{$tab['url']}' title='{$tab['ayuda']}' onclick='seleccionar_tab(this)' target='" . apex_frame_lista . "'>{$tab['imagen']} {$tab['nombre']}</a>"; echo '</li>'; $id = ''; $i++; } echo toba_js::ejecutar('$$("tab_inicial").onclick()'); echo '</ul>'; echo "</td></tr>\n"; ?> </table> <?php echo toba_form::cerrar();
function generar_html_fs() { if (!$this->controlador->existe_archivo_log()) { echo ei_mensaje('No hay logs registrados para el proyecto ' . "<strong>{$this->controlador->get_proyecto()}</strong>"); return; } $seleccion = $this->controlador->s__seleccion; $niveles = toba::logger()->get_niveles(); $niveles = array_reverse($niveles); $res = $this->controlador->get_analizador()->get_pedido($seleccion); $encabezado = $this->controlador->get_analizador()->analizar_encabezado($res); ///CON ESTO PUEDO SACAR OPERACION, PROYECTO, IP, USUARIO ETC //--- Opciones $selec = $seleccion == 'ultima' ? 'Última solicitud' : "Solicitud {$seleccion}"; echo '<div>'; echo "<span class='logger-proyecto' title='{$this->controlador->get_analizador()->get_archivo_nombre()}' style='text-align:right;'>"; echo ucfirst($this->controlador->get_proyecto()); echo "<span class='logger-selec'>{$selec}</span>"; //--- Botones anterior/siguiente if ($seleccion != 1) { $this->generar_boton('anterior'); } if ($seleccion != 'ultima') { $this->generar_boton('siguiente'); $this->generar_boton('ultima'); } echo '</span>'; echo "<br><div id='logger_info_operacion'>"; echo $this->generar_html_info_operacion($res); echo '</div>'; $valor_check = 0; if ($this->controlador->get_estado_encabezados() === true) { $valor_check = 1; } $check = toba_form::checkbox('con_encabezados', $valor_check, 1, 'ef-checkbox', " onclick=\"{$this->objeto_js}.evt__con_encabezados__click(this)\" "); echo "<label>{$check} Ver Encabezados</label><br>"; echo "</div><hr style='clear:both' />"; echo "<div style='clear:both;width:100%;overflow:auto;'>\n"; list($detalle, $cant_por_nivel) = $this->generar_html_detalles($res); $display_encabezados = 'none'; if ($this->controlador->get_estado_encabezados() === true) { $display_encabezados = ''; } //--- Encabezado echo "<ul id='logger_encabezados' style='display:{$display_encabezados};list-style-type: none;padding: 0;margin: 0'>"; echo $this->generar_html_encabezado($res); echo '</ul>'; //---- Niveles echo "<div style='clear:both;float:right;margin-left:10px;text-align:center;'>"; echo '<strong>Niveles</strong>'; echo "<ul class='logger-opciones'>"; foreach ($niveles as $nivel) { $img = toba_recurso::imagen_proyecto('logger/' . strtolower($nivel) . '.gif', true, null, null, "Filtrar el nivel: {$nivel}"); $cant = $cant_por_nivel[$nivel] != 0 ? "[{$cant_por_nivel[$nivel]}]" : ''; echo "<li id='nivel_{$nivel}'><a href='#' onclick='mostrar_nivel(\"{$nivel}\")'>{$img}</a> "; echo "<span id='nivel_cant_{$nivel}'>{$cant}</span></li>\n"; } echo '</ul>'; echo '</div>'; $proyecto_actual = $this->controlador->get_proyecto(); $mostrar = $this->controlador->get_seleccion_modo_detalle(); $lista_valida = array($proyecto_actual => ucfirst($proyecto_actual), 'toba' => 'Nucleo', 'no_seteado' => 'Todos'); //echo toba_recurso::imagen_proyecto('logger/ver_texto.gif', true, 16, 16, "Ver el texto original del log"); echo "<div style='clear:both;float:right;margin-left:10px;text-align:center;'><br>"; echo '<strong>Mostrar mensajes</strong>'; echo "<ul id='logger_proyectos' class='logger-opciones'>"; echo '<li>' . toba_form::select('opciones_proyectos', $mostrar, $lista_valida, null, "onchange='{$this->objeto_js}.mostrar_proyecto()'") . '</li>'; echo '</ul>'; echo '</div>'; //--- Detalles echo "<ol id='logger_detalle' style='list-style-type:none;padding:0;margin:0;margin-top:10px;'>"; echo $detalle; echo "</ol>\n"; echo '</div>'; }
function generar_html() { echo toba_form::hidden($this->_submit, ''); echo toba_form::hidden($this->_submit . "__seleccion", ''); $dir = opendir($this->_dir_actual); $archivos = array(); $carpetas = array(); $hay_padre = false; //Es el directorio relativo inicial? $es_el_relativo = false; if (isset($this->_path_absoluto)) { $es_el_relativo = realpath($this->_path_absoluto) == realpath($this->_dir_actual); } if ($dir === false) { return; } //Filtra Archivos y directorios while (($archivo = readdir($dir)) !== false) { $ruta = $this->_dir_actual . "/" . $archivo; $info = pathinfo($ruta); if (!isset($info['extension'])) { $info['extension'] = ''; } $es_padre = $archivo == '..'; if ($es_padre && !$es_el_relativo) { $hay_padre = true; } $es_actual = $archivo == '.'; if (!$es_padre && !$es_actual && is_dir($ruta) && !in_array($archivo, $this->_ocultos)) { $carpetas[] = $archivo; } elseif (in_array($info['extension'], $this->_extensiones)) { $archivos[] = $archivo; } } closedir($dir); sort($archivos); sort($carpetas); $path = pathinfo($this->_dir_actual); echo "<div class='ei-base ei-archivos-base'>\n"; echo $this->get_html_barra_editor(); $titulo = $this->_info['titulo']; if (!isset($titulo)) { $path_relativo = $this->get_path_relativo() != '' ? 'php/' . $this->get_path_relativo() : 'php'; $titulo = "<span title='{$this->_dir_actual}'>{$path_relativo}</span>"; } $this->generar_html_barra_sup($titulo, false, "ei-arch-barra-sup"); echo "<div id='cuerpo_{$this->objeto_js}'>\n"; $img_crear_carpeta = toba_recurso::imagen_toba('nucleo/carpeta_nueva_24.gif', true); $img_crear_archivo = toba_recurso::imagen_toba('nucleo/archivo_nuevo.gif', true); echo "<span style='float: right'>"; if ($this->crear_carpetas) { echo "<a href='#' onclick='{$this->objeto_js}.crear_carpeta()' title='Crear carpeta'>{$img_crear_carpeta}</a>"; } if ($this->crear_archivos && !$this->solo_carpetas) { echo "<a href='#' onclick='{$this->objeto_js}.crear_archivo()' title='Crear archivo'>{$img_crear_archivo}</a>"; } echo "</span>\n"; if ($hay_padre) { $img_subir = toba_recurso::imagen_toba('nucleo/subir.gif', true); echo "<span class='ei-archivos-listado'>\n\t\t\t\t\t<a href='#' onclick='{$this->objeto_js}.ir_a_carpeta(\"..\")' title='Subir de carpeta'>{$img_subir}</a>\n\t\t\t\t </span>\n"; } $img_carpeta = toba_recurso::imagen_toba('nucleo/carpeta.gif', true); echo "<div style='clear:left'>"; foreach ($carpetas as $carpeta) { echo "<div class='ei-archivos-carpeta'>{$img_carpeta} \n\t\t\t\t<a href='#' onclick='{$this->objeto_js}.ir_a_carpeta(\"{$carpeta}\")' \n\t\t\t\t\ttitle='Entrar a la carpeta'>{$carpeta}</a></div>\n"; } if (!$this->solo_carpetas) { $img_archivo = toba_recurso::imagen_toba('nucleo/php_22.gif', true); foreach ($archivos as $archivo) { echo "<div class='ei-archivos-archivo'>{$img_archivo} \n\t\t\t\t\t\t<a href='#' onclick='{$this->objeto_js}.seleccionar_archivo(\"{$archivo}\")' \n\t\t\t\t\t\t title='Seleccionar el archivo'>{$archivo}</a>\n</div>"; } } echo "</div>"; echo "</div>\n"; echo "</div>\n"; }
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; }
protected function generar_campos_hidden() { parent::generar_campos_hidden(); echo toba_form::hidden($this->_submit . '__nodos_deseleccionados', ''); echo toba_form::hidden($this->_submit . '__nodos_seleccionados', ''); }
function get_input() { $estado = $this->get_estado_para_input(); $html = ''; if ($this->es_solo_lectura()) { $html .= toba_form::hidden($this->id_form, $estado); } $callback = "onchange=\"{$this->get_cuando_cambia_valor()}\""; //--- Se guarda el callback en el <div> asi puede ser recuperada en caso de que se borren las opciones $html .= "<div id='opciones_{$this->id_form}' {$callback}>\n"; $html .= "<table>\n"; if (!is_array($this->opciones)) { $datos = array(); } else { $datos = $this->opciones; } $i = 0; $tab_index = "tabindex='" . $this->padre->get_tab_index() . "'"; foreach ($datos as $clave => $valor) { if ($i % $this->cantidad_columnas == 0) { $html .= "<tr>\n"; } $id = $this->id_form . $i; $html .= "\t<td><label class='{$this->clase_css}' for='{$id}'>"; $es_actual = strval($estado) == strval($clave); if (!$this->es_solo_lectura()) { $sel = $es_actual ? "checked" : ""; if (!$this->permitir_html) { $clave = texto_plano($clave); } $html .= "<input type='radio' id='{$id}' name='{$this->id_form}' value='{$clave}' {$sel} {$callback} {$tab_index} />"; $tab_index = ''; } else { //--- Caso solo lectura $img = $es_actual ? 'efradio_on.gif' : 'efradio_off.gif'; $html .= toba_recurso::imagen_toba('nucleo/' . $img, true, 16, 16); } if (!$this->permitir_html) { $valor = texto_plano($valor); } $html .= "{$valor}</label></td>\n"; $i++; if ($i % $this->cantidad_columnas == 0) { $html .= "</tr>\n"; } } $sobran = $i % $this->cantidad_columnas; if ($sobran > 0) { $html .= str_repeat("\t<td></td>\n", $sobran); $html .= "</tr>\n"; } $html .= "</table>"; $html .= "</div>\n"; $html .= $this->get_html_iconos_utilerias(); return $html; }
function obtener_html($mostrar_cabecera = true, $titulo = null) { //Reproduccion del titulo if (isset($titulo)) { $this->memoria["titulo"] = $titulo; $this->memorizar(); } else { if (isset($this->memoria["titulo"])) { $titulo = $this->memoria["titulo"]; $this->memorizar(); } } //Manejo del EOF if ($this->filas == 0) { //La consulta no devolvio datos! if ($this->info_cuadro["eof_invisible"] != 1) { if (trim($this->info_cuadro["eof_customizado"]) != "") { echo ei_mensaje($this->info_cuadro["eof_customizado"]); } else { echo ei_mensaje("La consulta no devolvio datos!"); } } } else { if (!($ancho = $this->info_cuadro["ancho"])) { $ancho = "80%"; } //echo "<br>\n"; //--Scroll if ($this->info_cuadro["scroll"]) { $ancho = isset($this->info_cuadro["ancho"]) ? $this->info_cuadro["ancho"] : "500"; $alto = isset($this->info_cuadro["alto"]) ? $this->info_cuadro["alto"] : "auto"; echo "<div style='overflow: scroll; height: {$alto}; width: {$ancho}; border: 1px inset; padding: 0px;'>"; // echo "<table class='tabla-0'>\n"; } else { $ancho = isset($this->info_cuadro["ancho"]) ? $this->info_cuadro["ancho"] : "100"; // echo "<table width='$ancho' class='tabla-0'>\n"; } echo "<table class='objeto-base' width='{$ancho}'>\n\n\n"; if ($mostrar_cabecera) { echo "<tr><td>"; $this->barra_superior(null, true, "objeto-ei-barra-superior"); echo "</td></tr>\n"; } if ($this->info_cuadro["subtitulo"] != "") { echo "<tr><td class='lista-subtitulo'>" . $this->info_cuadro["subtitulo"] . "</td></tr>\n"; } echo "<tr><td>"; echo "<TABLE width='100%' class='tabla-0'>"; //------------------------ Genero los titulos echo "<tr>\n"; for ($a = 0; $a < $this->cantidad_columnas; $a++) { if (isset($this->info_cuadro_columna[$a]["ancho"])) { $ancho = " width='" . $this->info_cuadro_columna[$a]["ancho"] . "'"; } else { $ancho = ""; } echo "<td class='lista-col-titulo' {$ancho}>\n"; $this->cabecera_columna($this->info_cuadro_columna[$a]["titulo"], $this->info_cuadro_columna[$a]["valor_sql"], $a); echo "</td>\n"; } //-- Evento FIJO de seleccion echo "<td class='lista-col-titulo'>\n"; echo "</td>\n"; echo "</tr>\n"; //------------------------------------------------------------------------- //----------------------- Genero VALORES del CUADRO ----------------------- //------------------------------------------------------------------------- for ($f = 0; $f < $this->filas; $f++) { $resaltado = ""; $clave_fila = $this->get_clave_fila($f); //$this->clave_seleccionada //$resaltado = "_s"; echo "<tr>\n"; for ($a = 0; $a < $this->cantidad_columnas; $a++) { //----------> Comienzo una CELDA!! //*** 1) Recupero el VALOR if (isset($this->info_cuadro_columna[$a]["valor_sql"])) { $valor = $this->datos[$f][$this->info_cuadro_columna[$a]["valor_sql"]]; //Hay que formatear? if (isset($this->info_cuadro_columna[$a]["valor_sql_formato"])) { $funcion = "formato_" . $this->info_cuadro_columna[$a]["valor_sql_formato"]; //Formateo el valor $valor = $funcion($valor); } //Hay que hacer un formateo externo if (trim($this->info_cuadro_columna[$a]["valor_proceso_parametros"]) != "") { $funcion = $this->info_cuadro_columna[$a]["valor_proceso_parametros"]; //Formateo el valor $valor = $funcion($valor); } } elseif (isset($this->info_cuadro_columna[$a]["valor_fijo"])) { $valor = $this->info_cuadro_columna[$a]["valor_fijo"]; } else { $valor = ""; } //*** 2) PRoceso la columna //Esto no se utiliza desde el instanciador if (!$this->solicitud->hilo->entorno_instanciador()) { if (isset($this->info_cuadro_columna[$a]["valor_proceso"])) { $metodo_procesamiento = $this->info_cuadro_columna[$a]["valor_proceso"]; $valor = $this->{$metodo_procesamiento}($f, $valor); } } //*** 3) Generacion de VINCULOS! if (trim($this->info_cuadro_columna[$a]["vinculo_indice"]) != "") { $id_fila = $this->get_clave_fila($f); //Genero el VINCULO $vinculo = $this->solicitud->vinculador->get_vinculo_de_objeto($this->id, $this->info_cuadro_columna[$a]["vinculo_indice"], $id_fila, true, $valor); //El vinculador puede no devolver nada en dos casos: //No hay permisos o el indice no existe if (isset($vinculo)) { $valor = $vinculo; } } //*** 4) Genero el HTML echo "<td class='" . $this->info_cuadro_columna[$a]["estilo"] . $resaltado . "'>\n"; echo $valor; echo "</td>\n"; //----------> Termino la CELDA!! } //-- Evento FIJO de seleccion echo "<td class='lista-col-titulo'>\n"; echo toba_form::image($this->submit . $clave_fila, toba_recurso::imagen_toba("doc.gif"), "onClick='seleccionar(\"{$this->datos[$f]['id']}\", \"{$this->datos[$f]['descripcion']}\")';"); echo "</td>\n"; //---------------------------- echo "</tr>\n"; } //----------------------- Genero totales?? $this->generar_html_totales(); echo "</table>\n"; echo "</td></tr>\n"; echo "</table>\n"; //Y por cierto......... si esto tenia scroll, cierro el div !!! if ($this->info_cuadro["scroll"]) { echo "</div>"; } //echo "<br>\n"; } }
/** * Genera el HTML correspondiente a la barra de paginacion */ protected function html_barra_paginacion() { $objeto_js = $this->_cuadro->get_id_objeto_js(); $total_registros = $this->_cuadro->get_total_registros(); $tamanio_pagina = $this->_cuadro->get_tamanio_pagina(); $pagina_actual = $this->_cuadro->get_pagina_actual(); $cantidad_paginas = $this->_cuadro->get_cantidad_paginas(); $parametros = $this->_cuadro->get_nombres_parametros(); $eventos = $this->_cuadro->get_eventos(); echo "<div class='ei-cuadro-pag'>"; if (isset($total_registros) && !($tamanio_pagina >= $total_registros)) { //Calculo los posibles saltos //Primero y Anterior if ($pagina_actual == 1) { $anterior = toba_recurso::imagen_toba("nucleo/paginacion/anterior_deshabilitado.gif", true); $primero = toba_recurso::imagen_toba("nucleo/paginacion/primero_deshabilitado.gif", true); } else { $evento_js = toba_js::evento('cambiar_pagina', $eventos["cambiar_pagina"], $pagina_actual - 1); $js = "{$objeto_js}.set_evento({$evento_js});"; $img = toba_recurso::imagen_toba("nucleo/paginacion/anterior.gif"); $anterior = toba_recurso::imagen($img, null, null, 'Página Anterior', '', "onclick=\"{$js}\"", 'cursor: pointer;cursor:hand;'); $evento_js = toba_js::evento('cambiar_pagina', $eventos["cambiar_pagina"], 1); $js = "{$objeto_js}.set_evento({$evento_js});"; $img = toba_recurso::imagen_toba("nucleo/paginacion/primero.gif"); $primero = toba_recurso::imagen($img, null, null, 'Página Inicial', '', "onclick=\"{$js}\"", 'cursor: pointer;cursor:hand;'); } //Ultimo y Siguiente if ($pagina_actual == $cantidad_paginas) { $siguiente = toba_recurso::imagen_toba("nucleo/paginacion/siguiente_deshabilitado.gif", true); $ultimo = toba_recurso::imagen_toba("nucleo/paginacion/ultimo_deshabilitado.gif", true); } else { $evento_js = toba_js::evento('cambiar_pagina', $eventos["cambiar_pagina"], $pagina_actual + 1); $js = "{$objeto_js}.set_evento({$evento_js});"; $img = toba_recurso::imagen_toba("nucleo/paginacion/siguiente.gif"); $siguiente = toba_recurso::imagen($img, null, null, 'Página Siguiente', '', "onclick=\"{$js}\"", 'cursor: pointer;cursor:hand;'); $evento_js = toba_js::evento('cambiar_pagina', $eventos["cambiar_pagina"], $cantidad_paginas); $js = "{$objeto_js}.set_evento({$evento_js});"; $img = toba_recurso::imagen_toba("nucleo/paginacion/ultimo.gif"); $ultimo = toba_recurso::imagen($img, null, null, 'Página Final', '', "onclick=\"{$js}\"", 'cursor: pointer;cursor:hand;'); } echo "{$primero} {$anterior} Página <strong>"; $js = "{$objeto_js}.ir_a_pagina(this.value);"; $tamanio = ceil(log10($total_registros)); echo toba_form::text($parametros['paginado'], $pagina_actual, false, '', $tamanio, 'ef-numero', "onchange=\"{$js}\""); echo "</strong> de <strong>{$cantidad_paginas}</strong> {$siguiente} {$ultimo}"; } echo "</div>"; }
protected function generar_formulario_cuerpo() { echo '<tbody>'; if ($this->_registro_nuevo !== false) { $template = is_array($this->_registro_nuevo) ? $this->_registro_nuevo : array(); $this->agregar_registro($template); } //------ FILAS ------ $this->_filas_enviadas = array(); if (!isset($this->_ordenes)) { $this->_ordenes = array(); } //Se recorre una fila más para insertar una nueva fila 'modelo' para agregar en js if ($this->_info_formulario['filas_agregar'] && $this->_info_formulario['filas_agregar_online']) { $this->_datos['__fila__'] = array(); $this->_ordenes[] = '__fila__'; } $a = 0; foreach ($this->_ordenes as $fila) { $dato = $this->_datos[$fila]; //Si la fila es el template ocultarla if ($fila !== '__fila__') { $this->_filas_enviadas[] = $fila; $estilo_fila = ''; $es_fila_modelo = false; } else { $estilo_fila = "style='display:none;'"; $es_fila_modelo = true; } //Determinar el estilo de la fila if (isset($this->_clave_seleccionada) && $fila == $this->_clave_seleccionada) { $this->estilo_celda_actual = 'ei-ml-fila-selec'; } else { $this->estilo_celda_actual = 'ei-ml-fila'; } $this->cargar_registro_a_ef($fila, $dato); //--- Se cargan las opciones de los efs de esta fila $this->_carga_opciones_ef->cargar(); //--- Ventana para poder configurar una fila especifica $callback_configurar_fila_contenedor = 'conf_fila__' . $this->_parametros['id']; if (method_exists($this->controlador, $callback_configurar_fila_contenedor)) { $this->controlador->{$callback_configurar_fila_contenedor}($fila); } //-- Inicio html de la fila echo "\n<!-- FILA {$fila} -->\n\n"; echo "<tr {$estilo_fila} id='{$this->objeto_js}_fila{$fila}' onclick='{$this->objeto_js}.seleccionar({$fila})'>"; if ($this->_info_formulario['filas_numerar']) { echo "<td class='{$this->estilo_celda_actual} ei-ml-fila-numero'>\n<span id='{$this->objeto_js}_numerofila{$fila}'>" . ($a + 1); echo "</span></td>\n"; } //--Layout de las filas $this->generar_layout_fila($fila); //--Numeración de las filas if ($this->_info_formulario['filas_ordenar'] && $this->_ordenar_en_linea) { echo "<td class='{$this->estilo_celda_actual} ei-ml-fila-ordenar'>\n"; echo "<a href='javascript: {$this->objeto_js}.subir_seleccionada();' id='{$this->objeto_js}_subir{$fila}' style='visibility:hidden' title='Subir la fila'>" . toba_recurso::imagen_toba('nucleo/orden_subir.gif', true) . '</a>'; echo "<a href='javascript: {$this->objeto_js}.bajar_seleccionada();' id='{$this->objeto_js}_bajar{$fila}' style='visibility:hidden' title='Bajar la fila'>" . toba_recurso::imagen_toba('nucleo/orden_bajar.gif', true) . '</a>'; echo "</td>\n"; } //--Creo los EVENTOS de la FILA $this->generar_eventos_fila($fila); //-- Borrar a nivel de fila if ($this->_info_formulario['filas_agregar'] && $this->_borrar_en_linea && $es_fila_modelo) { //Si no es la fila modelo, evito que se pueda eliminar echo "<td class='{$this->estilo_celda_actual} ei-ml-columna-evt ei-ml-fila-borrar'>"; echo toba_form::button_html("{$this->objeto_js}_eliminar{$fila}", toba_recurso::imagen_toba('borrar.gif', true), "onclick='{$this->objeto_js}.seleccionar({$fila});{$this->objeto_js}.eliminar_seleccionada();'", $this->_rango_tabs[0]++, null, 'Elimina la fila'); echo "</td>\n"; } echo "</tr>\n"; $a++; } echo "</tbody>\n"; }
/** * Arma el div selector para el layer, con el evento JS propiamente dicho * @param string $id_ef * @param string $nombre_layer * @ignore */ protected function get_selector_layer($id_ef, $nombre_layer) { $actual = $nombre_layer; $layer_obj = $this->_mapa->getLayerByName($actual); if (is_null($layer_obj)) { throw new toba_error('El mapa no contiene la capa ' . $actual); } $status = $layer_obj->getMetadata('status'); if ($status === MS_OFF) { //Si el layer no esta activo en el mapfile $actual = ''; } elseif (!empty($this->_layers_activos) && !in_array($nombre_layer, $this->_layers_activos)) { //Si no viene en la lista de layers activos actualmente $actual = ''; } $estilo = ''; //Habria que crear un estilo para el checkbox $ancho = '100px'; //Ancho de las etiquetas, se deberia poder configurar $js = "onclick='{$this->objeto_js}.change_layers(this);'"; //Js que realiza la llamada //Saco el label y el checkbox echo "<div class = 'layer-selector'>"; echo toba_form::checkbox($id_ef, $actual, $nombre_layer, null, $js); echo "<label style='width: {$ancho};' for='{$id_ef}' class='{$estilo}'>{$nombre_layer}</label>\n"; echo "</div>"; }
static function generar_zona_vinculos_item($item, $accion, $enviar_div_wrapper = true) { if (!self::acceso_recursivo()) { toba::solicitud()->set_cronometrar(true); } toba_js::cargar_consumos_globales(array('utilidades/toba_editor')); $html_ayuda_editor = toba_recurso::ayuda(null, 'Presionando la tecla CTRL se pueden ver los enlaces hacia los editores de los distintos componentes de esta página'); $html_ayuda_cronometro = toba_recurso::ayuda(null, 'Ver los tiempos de ejecución en la generación de esta página'); $html_ayuda_ajax = toba_recurso::ayuda(null, 'Activar/Desactivar navegación interna de la operación via AJAX'); $html_ayuda_editor = toba_recurso::ayuda(null, 'Volver al editor de toba'); $solicitud = toba::solicitud()->get_id(); $link_cronometro = toba::vinculador()->get_url('toba_editor', '1000263', null, array('prefijo' => toba_editor::get_punto_acceso_editor())); $link_analizador_sql = toba::vinculador()->get_url('toba_editor', '30000030', null, array('prefijo' => toba_editor::get_punto_acceso_editor())); $link_logger = toba::vinculador()->get_url('toba_editor', '1000003', null, array('prefijo' => toba_editor::get_punto_acceso_editor())); $link_archivos = toba::vinculador()->get_url('toba_editor', '30000029', null, array('prefijo' => toba_editor::get_punto_acceso_editor())); $estilo = toba::proyecto()->get_parametro('estilo'); if ($enviar_div_wrapper) { echo "<div id='editor_previsualizacion'>"; /*echo "<div id='editor_previsualizacion_colap'><img style='cursor:pointer;_cursor:hand;' title='Ocultar la barra' src='".toba_recurso::imagen_toba('nucleo/expandir_izq.gif', false)."' onclick='toggle_nodo(\$\$(\"editor_previsualizacion_cont\"))'/></div>";*/ } echo "<span id='editor_previsualizacion_cont'>"; echo "<span id='editor_previsualizacion_vis'>"; //Logger list($log_nivel, $log_cant) = toba::logger()->get_mensajes_minimo_nivel(); $niveles = toba::logger()->get_niveles(); $niveles[0] = 'INFO'; $img = self::imagen_editor('logger/' . strtolower($niveles[$log_nivel]) . '.gif', true); $html_ayuda_logger = toba_recurso::ayuda(null, 'Visor de logs'); echo "<a href='{$link_logger}' target='logger' {$html_ayuda_logger} >" . $img . " {$log_cant}</a>\n"; //Cronometro toba::cronometro()->marcar('Resumen toba_editor'); echo "<a href='{$link_cronometro}' target='logger' {$html_ayuda_cronometro} >\n" . toba_recurso::imagen_toba('clock.png', true) . ' ' . round(toba::cronometro()->tiempo_acumulado(), 2) . ' seg' . "</a> "; //Memoria if (function_exists('memory_get_peak_usage')) { $memoria_pico = memory_get_peak_usage(); echo toba_recurso::imagen_toba('memory.png', true, 16, 16, 'Pico máximo de memoria que ha consumido el script actual'); echo ' ' . file_size($memoria_pico, 0) . ' '; } //Base de datos $fuente = toba_admin_fuentes::instancia()->get_fuente_predeterminada(false, toba_editor::get_proyecto_cargado()); if ($fuente) { try { $base = toba_admin_fuentes::instancia()->get_fuente($fuente, toba_editor::get_proyecto_cargado())->get_db(); $info_db = $base->get_info_debug(); $total = 0; foreach ($info_db as $info) { if (isset($info['fin'])) { $total += $info['fin'] - $info['inicio']; } } $rol = toba::db()->get_rol_actual(); toba::memoria()->set_dato_instancia('previsualizacion_consultas', array('fuente' => $fuente, 'datos' => $info_db)); echo "<a href='{$link_analizador_sql}' target='logger'>" . toba_recurso::imagen_toba('objetos/datos_relacion.gif', true, 16, 16, 'Ver detalles de las consultas y comandos ejecutados en este pedido de página') . count($info_db) . " ({$rol})</a>"; } catch (toba_error $e) { //Si no se tiene acceso a la base no se hace nada } } //Archivos $archivos = self::get_archivos_incluidos(); $total = 0; foreach ($archivos as $arch) { $total += filesize($arch); } toba::memoria()->set_dato_instancia('previsualizacion_archivos', $archivos); echo "<a href='{$link_archivos}' target='logger'>" . toba_recurso::imagen_toba('nucleo/php.gif', true, 16, 16, 'Ver detalle de archivos .php del proyecto incluidos en este pedido de página') . ' ' . count($archivos) . " arch. (" . file_size($total, 0) . ')</a>'; //Session $tamano = file_size(strlen(serialize($_SESSION)), 0); echo toba_recurso::imagen_toba('sesion.png', true, 16, 16, 'Tamaño de la sesión') . " {$tamano} "; echo "</span>"; //-- ACCIONES echo "<span id='editor_previsualizacion_acc'>"; $perfiles = array(apex_ef_no_seteado => '-- Todos --'); foreach (toba::manejador_sesiones()->get_perfiles_funcionales() as $perfil) { $perfiles[$perfil] = $perfil; } $actuales = toba::manejador_sesiones()->get_perfiles_funcionales_activos(); $actual = null; if (count($actuales) == 1) { $actual = current($actuales); } $js = "title='Cambia el perfil actual del usuario' onchange=\"location.href = toba_prefijo_vinculo + '&perfil_activo=' + this.value\""; echo "Perfiles: " . toba_form::select('cambiar_perfiles', $actual, $perfiles, 'ef-combo', $js); //Usuario de la base $hay_limitado = false; if (!isset(self::$fuentes)) { self::$fuentes = toba_info_editores::get_fuentes_datos(toba_editor::get_proyecto_cargado()); } foreach (self::$fuentes as $fuente) { if ($fuente['permisos_por_tabla']) { $hay_limitado = true; } } if ($hay_limitado) { $actual = self::$memoria['conexion_limitada'] ? 'limitado' : 'normal'; $datos = array("normal" => "Normal", "limitado" => "Limitados"); $js = "title='Cambia temporalmente el usuario de conexión a la base' onchange=\"location.href = toba_prefijo_vinculo + '&usuario_conexion=' + this.value\""; echo "Permisos DB: " . toba_form::select('cambiar_rol', $actual, $datos, 'ef-combo', $js); } //Skin $skins = rs_convertir_asociativo(toba_info_editores::get_lista_skins(), array('estilo', 'proyecto'), 'descripcion'); $js = "title='Cambia temporalmente el skin de la aplicación' onchange=\"location.href = toba_prefijo_vinculo + '&skin=' + this.value\""; $defecto = toba::proyecto()->get_parametro('estilo') . apex_qs_separador . toba::proyecto()->get_parametro('estilo_proyecto'); echo "Skin: " . toba_form::select('cambiar_skin', $defecto, $skins, 'ef-combo', $js); //AJAX echo "<a id='editor_ajax' href='javascript: editor_cambiar_ajax()' {$html_ayuda_ajax}>" . toba_recurso::imagen_toba('objetos/ajax_off.png', true) . "</a>\n"; //Edicion echo "<a href='javascript: editor_cambiar_vinculos()' {$html_ayuda_editor} >" . toba_recurso::imagen_toba('edicion_chico.png', true) . "</a>\n"; //Arbol $vinculos = self::get_vinculos_item($item, $accion); if (isset($vinculos[1])) { self::mostrar_vinculo($vinculos[1]); } //Editor echo "<a href='#' onclick='return toba_invocar_editor()' {$html_ayuda_editor}>" . toba_recurso::imagen_toba('icono_16.png', true) . "</a>\n"; echo "</span>"; echo "</span>"; echo "<div class='div-editor' style='position:fixed; top: 85px; left: 1px;'>"; foreach (self::get_vinculos_item($item, $accion) as $vinculo) { self::mostrar_vinculo($vinculo); } echo "</div>"; if ($enviar_div_wrapper) { echo "</div>"; } }
function get_input() { $js = ''; $html = ''; $tab = $this->padre->get_tab_index(); $extra = " tabindex='{$tab}'"; if (!isset($this->estado)) { $this->estado = ""; } if (!isset($this->descripcion_estado) || $this->descripcion_estado == '') { $this->descripcion_estado = $this->get_descripcion_valor(); } $estado = is_array($this->estado) ? implode(apex_qs_separador, $this->estado) : $this->estado; $html .= "<span class='{$this->clase_css}'>"; if ($this->cuando_cambia_valor != '') { $js = "onchange=\"{$this->get_cuando_cambia_valor()}\""; } $extra .= $this->get_estilo_visualizacion_pixeles(); $extra .= $this->get_info_placeholder(); if ($this->editable) { $disabled = $this->es_solo_lectura() ? "disabled" : ""; $html .= toba_form::hidden($this->id_form . "_desc", $estado); $html .= toba_form::text($this->id_form, $this->descripcion_estado, false, "", $this->tamano, "ef-input", $extra . ' ' . $disabled . ' ' . $js); $extra = ''; } else { $html .= toba_form::hidden($this->id_form, $estado, $js); $html .= toba_form::text($this->id_form . "_desc", $this->descripcion_estado, false, "", $this->tamano, "ef-input", " {$extra} disabled "); } if (isset($this->id_vinculo)) { $display = $this->es_solo_lectura() ? "visibility:hidden" : ""; $html .= "<a id='{$this->id_form}_vinculo' style='{$display}' {$extra}"; $html .= " onclick=\"{$this->objeto_js()}.abrir_vinculo();\""; $html .= " href='#'>" . $this->get_imagen_abrir() . "</a>"; } if ($this->no_oblig_puede_borrar) { $display = $this->es_solo_lectura() ? "visibility:hidden" : ""; $html .= "<a id='{$this->id_form}_borrar' style='{$display}' {$extra}"; $html .= " onclick=\"{$this->objeto_js()}.set_estado(null, null);\""; $html .= " href='#'>" . $this->get_imagen_limpiar() . "</a>"; } $html .= $this->get_html_iconos_utilerias(); $html .= "</span>\n"; return $html; }
function get_input() { if (!isset($this->estado)) { $this->estado = ""; } $tab = ' tabindex="' . $this->padre->get_tab_index() . '"'; $html = "<div class='{$this->clase_css}'>"; $html .= toba_form::text($this->id_form . "_1", substr($this->estado, 0, 2), $this->es_solo_lectura(), 2, 2, 'ef-input', $this->javascript . $this->input_extra . $tab); $html .= ' - '; $html .= toba_form::text($this->id_form . "_2", substr($this->estado, 2, 8), $this->es_solo_lectura(), 8, 8, 'ef-input', $this->javascript . $this->input_extra . $tab); $html .= ' - '; $html .= toba_form::text($this->id_form . "_3", substr($this->estado, 10, 1), $this->es_solo_lectura(), 1, 1, 'ef-input', $this->javascript . $this->input_extra . $tab); $html .= $this->get_html_iconos_utilerias(); $html .= '</div>'; return $html; }
/** * Genera el radio para un evento de seleccion en dos pasos */ function get_html_evento_diferido($id_submit, $fila, $objeto_js, $id_componente) { if ($this->anulado) { return null; } $tab_order = toba_manejador_tabs::instancia()->siguiente(); $tip = ''; $html = ''; if (isset($this->datos['ayuda'])) { $tip = $this->datos['ayuda']; } $clase_predeterminada = $this->esta_sobre_fila() ? 'ei-boton-fila' : 'ei-boton'; $clase = isset($this->datos['estilo']) && trim($this->datos['estilo']) != "" ? $this->datos['estilo'] : $clase_predeterminada; $estilo_inline = $this->oculto ? 'display: none' : null; $js = $this->get_invocacion_js($objeto_js, $id_componente); if (isset($js)) { $js = 'onclick="' . $js . '"'; $valor_actual = $this->es_check_activo ? 'checked' : ''; $html = toba_form::radio_manual($id_submit . $fila, $id_submit, $this->parametros, $valor_actual, $clase, $js, $tab_order, ''); } return $html; }