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; }
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; }
/** * 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; }
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>'; }
/** * 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>"; }
} ?> </td> <td class='cat-arbol-carpeta-info' width='1px'></td> <?php } else { //******************< Items comunes >************************* ?> <td class='ei-arbol-nodo' width='100%' colspan='<?php echo $maximo - $nivel + 3; ?> '> <?php $extra = ' camino=\'' . separador_camino . implode(separador_camino, $item->get_camino()) . separador_camino . '\' '; echo toba_form::checkbox($prefijo_items . $item->get_id(), $grupo, $item->grupo_tiene_permiso($grupo), 'ef-checkbox', $extra); echo $item->get_nombre(); ?> </td> <td class='ei-arbol-nodo' width='1px'> <?php if ($item->es_de_menu()) { ?> <img src='<?php echo toba_recurso::imagen_proyecto('menu.gif'); ?> ' border='0'> <?php } else { echo gif_nulo();
/** * Genera el HTML del BOTON */ function get_html($id_submit, $objeto_js, $id_componente) { if ($this->anulado) { return null; } $tab_order = toba_manejador_tabs::instancia()->siguiente(); $tip = ''; if (isset($this->datos['ayuda'])) { $tip = $this->datos['ayuda']; } $acceso = tecla_acceso($this->datos['etiqueta']); if (!$this->es_seleccion_multiple()) { $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; $tipo_boton = 'button'; if (!$this->esta_sobre_fila() && isset($this->datos['defecto']) && $this->datos['defecto']) { $tipo_boton = 'submit'; $clase .= ' ei-boton-defecto'; } $estilo_inline = $this->oculto ? 'display: none' : null; $html = ''; $html .= $this->get_imagen(); $html .= $acceso[0]; $tecla = $acceso[1]; $js = $this->get_invocacion_js($objeto_js, $id_componente); if (isset($js)) { $js = 'onclick="' . $js . '"'; return toba_form::button_html($id_submit . "_" . $this->get_id(), $html, $js, $tab_order, $tecla, $tip, $tipo_boton, '', $clase, true, $estilo_inline, $this->activado); } } else { $js = $this->get_invocacion_js($objeto_js, $id_componente); $html = '<label>'; $html .= $this->get_imagen(); if (isset($js)) { $extra = 'onclick="' . $js . '"'; $extra .= " title='{$tip}'"; $extra .= $this->activado ? '' : ' disabled'; $valor_actual = $this->es_check_activo ? $this->parametros : null; $html .= toba_form::checkbox($id_submit . "_" . $this->get_id(), $valor_actual, $this->parametros, '', $extra); } $html .= '</label>'; return $html; } }