protected function estilos_css() { if (toba::proyecto()->get_parametro('es_css3')) { echo "<link rel='stylesheet' href='" . toba_recurso::url_toba() . "/js/formalize/stylesheets/formalize.css' />"; } else { echo "\n\t\t\t\t<style type='text/css'>\n\t #overlay, #capa_espera {\n\t background-image:url('" . toba_recurso::imagen_toba('nucleo/overlay.gif') . "'); \n\t }\n\t .barra-superior {\n\t background: url('" . toba_recurso::imagen_skin('barra-sup.gif') . "') repeat-x top;\n\t }\n\t .ei-cuadro-col-tit, .ei-ml-columna, .ei-filtro-columna {\n\t background: url('" . toba_recurso::imagen_skin('cuadro-col-titulo.gif') . "') repeat-x top;\n\t }\n\t .ei-barra-sup, .ci-botonera {\n\t background: url('" . toba_recurso::imagen_skin('barra-sup.gif') . "') repeat-x top;\n\t }\n\t .ci-tabs-h-lista {\n\t \tbackground: url('" . toba_recurso::imagen_skin('tabs/bg.gif') . "') repeat-x bottom;\n\t }\n\t .ci-tabs-h-solapa {\n\t\t\t\t\tbackground:url('" . toba_recurso::imagen_skin('tabs/left.gif') . "') no-repeat left top;\t \n\t }\n\t .ci-tabs-h-solapa a {\t\t\t\t\n\t \tbackground:url('" . toba_recurso::imagen_skin('tabs/right.gif') . "') no-repeat right top;\n\t }\t \n\t .ci-tabs-h-solapa-sel {\n\t\t\t\t\tbackground:url('" . toba_recurso::imagen_skin('tabs/left_on.gif') . "') no-repeat left top;\t \n\t }\n\t .ci-tabs-h-solapa-sel a {\t\t\t\t\n\t \tbackground:url('" . toba_recurso::imagen_skin('tabs/right_on.gif') . "') no-repeat right top;\n\t }\n\t\t\t\t</style>\n\t\t\t"; } echo "\n\t\t<style type='text/css'>\n\t\t\t#overlay, #capa_espera {\n\t\t\t\tbackground-image:url('" . toba_recurso::imagen_toba('nucleo/overlay.gif') . "'); \t\t\t\n\t\t\t}\n\t\t\t#barra_superior {\n\t\t\t\tdisplay:none;\n\t\t\t}\n\t\t</style>\t\t\t\n\t\t"; }
/** * Genera el html de la barra tabs, el toc (si tiene) y el contenido de las dependencias actuales * @ignore */ protected function generar_html_cuerpo() { switch ($this->_info_ci['tipo_navegacion']) { case self::NAVEGACION_TAB_HORIZONTAL: //*** TABs horizontales echo "<table class='tabla-0' width='100%'>\n"; //Tabs $estilo = 'background: url("' . toba_recurso::imagen_skin('tabs/bg.gif') . '") repeat-x bottom;'; echo "<tr><td class='ci-tabs-h-lista'>"; $this->generar_tabs_horizontales(); echo "</td></tr>\n"; //Interface de la etapa correspondiente echo "<tr><td class='ci-tabs-h-cont'>"; $this->generar_html_contenido(); echo "</td></tr>\n"; echo "</table>\n"; break; case self::NAVEGACION_TAB_VERTICAL: //*** TABs verticales echo "<table class='tabla-0' width='100%'>\n"; echo "<tr><td class='ci-tabs-v-lista'>"; $this->generar_tabs_verticales(); echo "</td>"; echo "<td class='ci-tabs-v-cont'>"; $this->generar_html_contenido(); echo "</td></tr>\n"; echo "</table>\n"; break; case self::NAVEGACION_WIZARD: //*** Wizard (secuencia estricta hacia adelante) echo "<table class='tabla-0'>\n"; echo "<tr><td class='ci-wiz-toc'>"; if ($this->_info_ci['con_toc']) { $this->generar_toc_wizard(); } echo "</td>"; echo "<td class='ci-wiz-cont'>"; $this->generar_html_contenido(); echo "</td></tr>\n"; echo "</table>\n"; break; default: //*** Sin mecanismo de navegacion echo "<div class='ci-simple-cont'>"; $this->generar_html_contenido(); echo "</div>"; } }
function ei_barra_fin() { echo ' </td><td class="tr" align="right" valign="top"><img src="' . toba_recurso::imagen_skin('corner_tr.gif') . '" class="c" alt=""></td> </tr> <tr> <td class="bl" align="left" valign="bottom"><img src="' . toba_recurso::imagen_skin('corner_bl.gif') . '" class="c" alt=""></td> <td class="br" align="right" valign="bottom"><img src="' . toba_recurso::imagen_skin('corner_br.gif') . '" class="c" alt=""></td> </tr> '; echo "</table>"; }
/** * @ignore */ protected function generar_formulario() { //--- La carga de efs se realiza aqui para que sea contextual al servicio //--- ya que hay algunos que no lo necesitan (ej. cascadas) $this->_carga_opciones_ef->cargar(); $this->_rango_tabs = toba_manejador_tabs::instancia()->reservar(250); $ancho = $this->_info_formulario['ancho'] != '' ? "width: {$this->_info_formulario['ancho']};" : ''; $colapsado = isset($this->_colapsado) && $this->_colapsado ? "display:none;" : ""; echo "<div class='ei-cuerpo ei-form-cuerpo' style='{$ancho} {$colapsado}' id='cuerpo_{$this->objeto_js}'>"; $this->generar_layout(); $hay_colapsado = false; foreach ($this->_lista_ef_post as $ef) { if (!$this->_elemento_formulario[$ef]->esta_expandido()) { $hay_colapsado = true; break; } } if ($hay_colapsado) { $img = toba_recurso::imagen_skin('expandir_vert.gif', false); $colapsado = "style='cursor: pointer; cursor: hand;' onclick=\"{$this->objeto_js}.cambiar_expansion();\" title='Mostrar / Ocultar'"; echo "<div class='ei-form-fila ei-form-expansion'>"; echo "<img id='{$this->objeto_js}_cambiar_expansion' src='{$img}' {$colapsado}>"; echo "</div>"; } if ($this->botonera_abajo()) { $this->generar_botones(); } echo "</div>\n"; }
/** * Retorna el HTML del tab * * @param string $tipo 'V' para vertical o 'H' para horizontal * @param string $id_submit Id. unico del contenedor (utilizado para formar el id del tab) * @param string $id_componente Id. de js del componente contenedor * @param boolean $seleccionado * @param string $editor */ function get_html($tipo, $id_submit, $id_componente, $seleccionado, $editor = '') { if ($this->anulado) { return null; } if ($tipo != 'V' && $tipo != 'H') { throw new toba_error_def("Los tipos validos de TABS son 'V' y 'H'."); } static $id_tab = 1; $evento = $this->datos['identificador']; $contenido = ''; $tab_order = toba_manejador_tabs::instancia()->siguiente(); $img = $this->get_imagen(); if (!isset($img) && $tipo == 'H') { $img = gif_nulo(1, 16); } $contenido .= $img . ' '; $tip = $this->datos['ayuda']; $acceso = tecla_acceso($this->datos['etiqueta']); $contenido .= $acceso[0]; $tecla = $acceso[1]; if (!isset($tecla) && $id_tab < 10) { $tecla = $id_tab; } $tip = str_replace("'", "\\'", $tip); $acceso = toba_recurso::ayuda($tecla, $tip); $id = $id_submit . '_cambiar_tab_' . $evento; $js = "onclick=\"{$id_componente}.ir_a_pantalla('{$evento}');return false;\""; $js_extra = ''; if ($this->activado) { $clase_boton = ''; } else { $clase_boton = 'ci-tabs-boton-desact'; } if ($tipo == 'H') { //********************* TABs HORIZONTALES ********************** if ($seleccionado) { // -- Tab ACTUAL -- $estilo_li = 'background:url("' . toba_recurso::imagen_skin('tabs/left_on.gif') . '") no-repeat left top;'; $estilo_a = 'background:url("' . toba_recurso::imagen_skin('tabs/right_on.gif') . '") no-repeat right top;'; $html = "<li class='ci-tabs-h-solapa-sel'>{$editor}"; $html .= "<a href='#' id='{$id}' {$acceso}>{$contenido}</a>"; $html .= "</li>"; } else { $oculto = $this->oculto ? '; display: none' : ''; $estilo_li = 'background:url("' . toba_recurso::imagen_skin('tabs/left.gif') . '") no-repeat left top;'; $estilo_a = 'background:url("' . toba_recurso::imagen_skin('tabs/right.gif') . '") no-repeat right top;'; $html = "<li class='ci-tabs-h-solapa' style='{$oculto}'>{$editor}"; $html .= "<a href='#' id='{$id}' class='{$clase_boton}' {$acceso} {$js}>{$contenido}</a>"; $html .= "</li>"; $html .= $js_extra; } } else { // ********************* TABs VERTICALES ************************ if ($seleccionado) { // -- Tab ACTUAL -- $html = "<div class='ci-tabs-v-solapa-sel'><div class='ci-tabs-v-boton-sel'>{$editor} "; $html .= "<div id='{$id}'>{$contenido}</div>"; $html .= "</div></div>"; } else { $clase_extra = ''; if (!$this->activado) { $clase_extra = 'ci-tabs-v-desactivado'; } $oculto = $this->oculto ? "style='display: none'" : ''; $html = "<div class='ci-tabs-v-solapa {$clase_extra}' {$oculto} >{$editor} "; $html .= "<a href='#' id='{$id}' {$clase_extra} {$acceso} {$js}>{$contenido}</a>"; $html .= "</div>"; $html .= $js_extra; } } $id_tab++; return $html; }
/** * Incluye los consumos globales básicos para utilizar el framework */ static function cargar_consumos_basicos() { if (!self::$basicos_cargados) { self::$consumos_basicos[] = 'basicos/jquery-1.9.1.min'; if (toba::proyecto()->get_parametro('es_css3')) { self::$consumos_basicos[] = 'formalize/javascripts/jquery.formalize.min'; } $imagenes = array('error' => toba_recurso::imagen_toba('error.gif', false), 'info' => toba_recurso::imagen_toba('info_chico.gif', false), 'warning' => toba_recurso::imagen_toba('warning.gif', false), 'maximizar' => toba_recurso::imagen_toba('nucleo/sentido_des_sel.gif', false), 'minimizar' => toba_recurso::imagen_toba('nucleo/sentido_asc_sel.gif', false), 'expandir' => toba_recurso::imagen_skin('expandir_vert.gif', false), 'contraer' => toba_recurso::imagen_skin('contraer_vert.gif', false), 'expandir_nodo' => toba_recurso::imagen_toba('nucleo/expandir.gif', false), 'contraer_nodo' => toba_recurso::imagen_toba('nucleo/contraer.gif', false), 'esperar' => toba_recurso::imagen_toba('wait.gif', false), 'cerrar' => toba_recurso::imagen_toba('nucleo/cerrar_ventana.gif', false)); echo toba_js::abrir(); echo "var toba_alias='" . toba_recurso::url_toba() . "';\n"; echo "var toba_proyecto_alias='" . toba_recurso::url_proyecto() . "';\n"; if (toba_editor::activado()) { echo 'var toba_proyecto_editado_alias = "' . toba_editor::get_url_previsualizacion() . "\";\n"; } echo "var toba_prefijo_vinculo = \"" . toba::vinculador()->get_url() . "\";\n"; echo "var toba_hilo_qs='" . apex_hilo_qs_item . "'\n"; echo "var toba_hilo_separador='" . apex_qs_separador . "'\n"; echo "var toba_hilo_separador_interno='" . apex_qs_sep_interno . "'\n"; echo "var toba_hilo_qs_servicio='" . apex_hilo_qs_servicio . "'\n"; echo "var toba_hilo_qs_menu='" . apex_hilo_qs_menu . "'\n"; echo "var apex_hilo_qs_celda_memoria='" . apex_hilo_qs_celda_memoria . "'\n"; echo "var toba_hilo_qs_objetos_destino='" . apex_hilo_qs_objetos_destino . "'\n"; echo "var lista_imagenes=" . toba_js::arreglo($imagenes, true) . ";"; echo "var apex_solicitud_tipo='" . toba::solicitud()->get_tipo() . "'\n"; $espera = toba::proyecto()->get_parametro('tiempo_espera_ms'); if (!isset($espera)) { $espera = 0; //No hay espera } echo "var toba_espera={$espera};\n"; //-------------- Incluyo funcionalidad para la respuesta del popup --------------- $ef_popup = toba::memoria()->get_parametro('ef_popup'); if (is_null($ef_popup)) { $ef_popup = toba::memoria()->get_dato_sincronizado('ef_popup'); } if (!is_null($ef_popup)) { toba::memoria()->set_dato_sincronizado('ef_popup', $ef_popup); echo "\n\t\t\t\tfunction seleccionar(clave, descripcion) {\n\t\t\t\t\twindow.opener.popup_callback('" . $ef_popup . "', clave, descripcion);\n\t\t\t\t\twindow.close();\n\t\t\t\t}\n\t\t\t\tfunction respuesta_ef_popup(parametros) {\n\t\t\t\t\tvar seleccion = parametros.split('||');\n\t\t\t\t\tseleccionar(seleccion[0], seleccion[1]);\n\t\t\t\t}\n\n\t\t\t\tfunction iniciar_respuesta_popup(objeto, parametros)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tvar posicion = objeto.id.ultima_ocurrencia('_');\n\t\t\t\t\tvar nombre = objeto.id.substr(0, posicion) + '_descripcion';\n\t\t\t\t\tvar descripcion = \$\$(nombre).value;\n\t\t\t\t\tseleccionar(parametros, descripcion);\n\t\t\t\t}"; } //----------------------------------------------------------------------------------------------------- echo toba_js::cerrar(); //Incluyo el javascript STANDART self::cargar_consumos_globales(self::$consumos_basicos); if (toba::instalacion()->arreglo_png_ie()) { ///---Arreglo PNGs IE $url = toba_recurso::js("utilidades/pngbehavior.htc"); echo "<!--[if lt IE 7]>\n\t\t\t\t\t<style type='text/css'>\n\t\t\t\t\t\timg {\n\t\t\t\t\t\t\tbehavior: url('{$url}');\n\t\t\t\t\t\t}\n\t\t\t\t\t</style>\n\t\t\t\t\t<![endif]-->\n"; } $url = toba_recurso::js('basicos/html5shiv.js'); echo "\t<!--[if lt IE 9]>\n\t\t\t\t\t\t<script src='{$url}'></script>\n\t\t\t\t\t<![endif]-->\n"; self::$basicos_cargados = true; } }