Actually use print style in themes, also fixes RFE #1120880.

This commit is contained in:
Michal Čihař
2005-03-06 23:23:46 +00:00
parent a6a072431e
commit ffe8be0356
5 changed files with 18 additions and 8 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2005-03-07 Michal Čihař <michal@cihar.com>
* db_printview.php, tbl_printview.php, css/phpmyadmin.css.php,
libraries/header_meta_style.inc.php: Actually use print style in themes,
also fixes RFE #1120880.
2005-03-06 Michael Keck <mkkeck@users.sourceforge.net> 2005-03-06 Michael Keck <mkkeck@users.sourceforge.net>
* themes/*/img/bd_deltbl.png, themes/*/bd_drop.png: Added disabled * themes/*/img/bd_deltbl.png, themes/*/bd_drop.png: Added disabled
versions of drop icons. versions of drop icons.

View File

@@ -40,6 +40,11 @@ if ($js_frame == 'left') {
if (@file_exists($tmp_file)) { if (@file_exists($tmp_file)) {
include($tmp_file); include($tmp_file);
} // end of include theme_print.css.php } // end of include theme_print.css.php
?>
table#serverinfo,td.serverinfo,table.noborder,table.noborder td {
border: none;
}
<?php
} else { } else {
/************************************************************************************ /************************************************************************************
* RIGHT FRAME * RIGHT FRAME

View File

@@ -7,6 +7,7 @@
* Gets the variables sent or posted to this script, then displays headers * Gets the variables sent or posted to this script, then displays headers
*/ */
require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/grab_globals.lib.php');
$print_view = TRUE;
require_once('./header.inc.php'); require_once('./header.inc.php');
// Check parameters // Check parameters
@@ -212,7 +213,7 @@ else {
|| (isset($sts_data['Check_time']) && !empty($sts_data['Check_time']))) { || (isset($sts_data['Check_time']) && !empty($sts_data['Check_time']))) {
echo $needs_break; echo $needs_break;
?> ?>
<table border="0" cellpadding="1" cellspacing="1" width="100%"> <table border="0" cellpadding="1" cellspacing="1" width="100%" class="noborder">
<?php <?php
if (isset($sts_data['Create_time']) && !empty($sts_data['Create_time'])) { if (isset($sts_data['Create_time']) && !empty($sts_data['Create_time'])) {
@@ -292,17 +293,15 @@ echo "\n";
<!-- <!--
function printPage() function printPage()
{ {
document.getElementById('print').style.visibility = 'hidden';
// Do print the page // Do print the page
if (typeof(window.print) != 'undefined') { if (typeof(window.print) != 'undefined') {
window.print(); window.print();
} }
document.getElementById('print').style.visibility = '';
} }
//--> //-->
</script> </script>
<?php <?php
echo '<br /><br />&nbsp;<input type="button" style="visibility: ; width: 100px; height: 25px" id="print" value="' . $strPrint . '" onclick="printPage()">' . "\n"; echo '<br /><br />&nbsp;<input type="button" class="print_ignore" style="width: 100px; height: 25px" id="print" value="' . $strPrint . '" onclick="printPage()">' . "\n";
require_once('./footer.inc.php'); require_once('./footer.inc.php');
?> ?>

View File

@@ -61,10 +61,10 @@ if (!empty($GLOBALS['cfg']['PmaAbsoluteUri'])) {
} }
} // end if... else if... } // end if... else if...
} // end if } // end if
document.writeln('<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['lang']; ?>&amp;js_frame=right&amp;js_isDOM=' + isDOM + '" />'); document.writeln('<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['lang']; ?>&amp;js_frame=<?php echo isset($print_view) ? 'print' : 'right'; ?>&amp;js_isDOM=' + isDOM + '" />');
//--> //-->
</script> </script>
<noscript> <noscript>
<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['lang']; ?>&amp;js_frame=right" /> <link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['lang']; ?>&amp;js_frame=<?php echo isset($print_view) ? 'print' : 'right'; ?>" />
</noscript> </noscript>
<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/print.css" media="print" /> <link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/print.css" media="print" />

View File

@@ -5,6 +5,7 @@
/** /**
* Gets the variables sent or posted to this script, then displays headers * Gets the variables sent or posted to this script, then displays headers
*/ */
$print_view = TRUE;
if (!isset($selected_tbl)) { if (!isset($selected_tbl)) {
require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/grab_globals.lib.php');
require_once('./header.inc.php'); require_once('./header.inc.php');
@@ -324,7 +325,7 @@ foreach ($the_tables AS $key => $table) {
?> ?>
<br /><br /> <br /><br />
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0" class="noborder">
<tr> <tr>
<!-- Space usage --> <!-- Space usage -->