protected function generar_html_encabezado() { echo "<html><head>"; $estilo = toba::proyecto()->get_parametro('estilo'); echo toba_recurso::link_css("toba_impr", 'screen'); echo toba_recurso::link_css("toba_impr", 'print'); echo "<style type='text/css' media='print'>\n\t\t\t.barra-impresion {\n\t\t\t\tdisplay: none;\t\t\t\t\n\t\t\t}\n\t\t\t</style>\n"; toba_js::cargar_consumos_basicos(); echo "</head><body>\n"; echo "<div class='barra-impresion'>"; echo "<button onclick='window.print()'>" . toba_recurso::imagen_toba('impresora.gif', true, null, null) . " Imprimir</button>"; echo "</div>"; echo $this->encabezado(); }
protected function cabecera_html() { echo "<!DOCTYPE html>\n"; //-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ echo '<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="es"> <![endif]-->'; echo '<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="es"> <![endif]-->'; echo '<!--[if IE 8]> <html class="no-js lt-ie9" lang="es"> <![endif]-->'; echo '<!--[if gt IE 8]><!--> <html class="no-js" lang="es"> <!--<![endif]-->'; echo "<head>\n"; echo "<title>" . $this->titulo_pagina() . "</title>\n"; $this->encoding(); $this->plantillas_css(); $this->estilos_css(); toba_js::cargar_consumos_basicos(); echo "</head>\n"; }
/** * Muestra toda la lista de notificaciones almacenadas * Esto tiene que hacerse una única vez por página, y por lo generar el framework * es el encargado de hacerlo */ function mostrar($incluir_comsumos = true) { if ($incluir_comsumos) { toba_js::cargar_consumos_basicos(); //Por si no se cargaron antes toba_js::cargar_consumos_globales(array("basicos/notificacion")); echo toba_js::abrir(); } foreach ($this->mensajes as $mensaje) { $texto = toba_parser_ayuda::parsear($mensaje[0]); $texto = str_replace("'", '"', $texto); $texto = toba_js::string($texto); //Mensaje para debug if (isset($mensaje[2]) && trim($mensaje[2]) != '') { $texto_debug = toba_parser_ayuda::parsear($mensaje[2]); $texto_debug = str_replace("'", '"', $texto_debug); $texto_debug = toba_js::string($texto_debug); echo "notificacion.agregar('{$texto}' + '\\n', '{$mensaje[1]}', undefined, '{$texto_debug}');\n"; } else { echo "notificacion.agregar('{$texto}' + '\\n', '{$mensaje[1]}');\n"; } } if (isset($this->titulo)) { echo "notificacion.set_titulo_ventana('{$this->titulo}');\n"; } echo "notificacion.mostrar();\n"; if ($incluir_comsumos) { echo toba_js::cerrar(); } }