From 0567bfe215d3169b90e9acd7e9a5119a65452a1f Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Wed, 23 Nov 2005 14:17:53 +0000 Subject: [PATCH] drop PMA_setFontSizes() --- ChangeLog | 5 ++ browse_foreigners.php | 93 ++++++++++++------------- css/phpmyadmin.css.php | 5 -- db_printview.php | 12 ++-- header_printview.inc.php | 2 - libraries/auth/config.auth.lib.php | 6 +- libraries/auth/cookie.auth.lib.php | 18 ++--- libraries/auth/http.auth.lib.php | 1 - libraries/common.lib.php | 92 ------------------------ libraries/header_meta_style.inc.php | 10 ++- server_privileges.php | 16 ++--- tbl_properties.inc.php | 82 +++++++++++----------- tbl_properties_structure.php | 2 +- tbl_relation.php | 34 ++++----- themes.php | 2 - themes/original/css/theme_left.css.php | 3 +- themes/original/css/theme_right.css.php | 36 +++++----- 17 files changed, 151 insertions(+), 268 deletions(-) diff --git a/ChangeLog b/ChangeLog index 050d873ce..0e92c10c1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,11 @@ $Source$ 2005-11-23 Sebastian Mendel * libraries/display_select_lang.lib.php: correct lang definition + * themes/original/*, libraries/auth/*.auth.lib.php, server_privilegs.php, + db_printview.php, tbl_properties_structure.php, tbl_properties.inc.php, + tbl_relation.php, browse_foreigners.php, css/phpmyadmin.css.php, + header_printview.inc.php, header_meta_style.inc.php, themes.php: + - drop PMA_setFontSizes() 2005-11-23 Michal ÄŒihaÅ™ * config.default.php, libraries/import/csv.php, libraries/import/ldi.php: diff --git a/browse_foreigners.php b/browse_foreigners.php index cb5c65371..30738adc5 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -25,9 +25,6 @@ $field = urldecode($field); /** * Displays the frame */ -// Gets the font sizes to use -PMA_setFontSizes(); - $per_page = 200; require_once('./libraries/relation.lib.php'); // foreign keys require_once('./libraries/transformations.lib.php'); // Transformations @@ -49,7 +46,7 @@ require('./libraries/get_foreign.lib.php'); if (isset($pk)) { $pk_uri = '&pk=' . urlencode($pk); - ?> + ?> $per_page) ) { $showall = ''; } - + $session_max_rows = $per_page; $pageNow = @floor($pos / $session_max_rows) + 1; $nbTotalPage = @ceil($count / $session_max_rows); - + if ( $count > $per_page ) { $gotopage = PMA_pageselector( 'browse_foreigners.php?field=' . urlencode($field) . @@ -87,9 +84,9 @@ if (isset($disp_row) && is_array($disp_row)) { ?> - @@ -105,19 +102,19 @@ if (isset($disp_row) && is_array($disp_row)) { function formupdate( field, key ) { if (opener && opener.document && opener.document.insertForm) { var field = 'field_' + field; - - + + var element_name = field + '[multi_edit][][]'; - + var element_name = field + '[]'; - - - + + + var element_name_alt = field + '[]'; - + var element_name_alt = field + '[0]'; - - + + if (opener.document.insertForm.elements[element_name]) { // Edit/Insert form opener.document.insertForm.elements[element_name].value = key; @@ -141,22 +138,22 @@ if (isset($disp_row) && is_array($disp_row)) {
- + - + - + - + - +
@@ -171,7 +168,7 @@ if (isset($disp_row) && is_array($disp_row)) { ' . $strDescription . ' ' . $strKeyname . ' '; - + echo '' . $header . '' . "\n" .'' . $header . '' . "\n" .'' . "\n"; @@ -187,9 +184,9 @@ if (isset($disp_row) && is_array($disp_row)) { $keys[] = $relrow[$foreign_field]; } - + asort( $keys ); - + $hcount = 0; $odd_row = true; $val_ordered_current_row = 0; @@ -207,12 +204,12 @@ if (isset($disp_row) && is_array($disp_row)) { $key_ordered_current_key = $keys[$key_ordered_current_row]; $key_ordered_current_val = $values[$key_ordered_current_row]; - + $val_ordered_current_key = $keys[$val_ordered_current_row]; $val_ordered_current_val = $values[$val_ordered_current_row]; - + $val_ordered_current_row++; - + if (PMA_strlen( $val_ordered_current_val ) <= $cfg['LimitChars']) { $val_ordered_current_val = htmlspecialchars($val_ordered_current_val); $val_ordered_current_val_title = ''; @@ -233,29 +230,29 @@ if (isset($disp_row) && is_array($disp_row)) { htmlspecialchars( PMA_substr( $key_ordered_current_val, 0, $cfg['LimitChars'] ) . '...' ); } - + if ( ! empty( $data ) ) { $val_ordered_current_equals_data = $val_ordered_current_key == $data; $key_ordered_current_equals_data = $key_ordered_current_key == $data; } - ?> + ?> ' : '') - .'' + .' onclick="formupdate(\'' . md5($field) . '\', \'' + . htmlspecialchars($key_ordered_current_key) . '\'); return false;">' .htmlspecialchars($key_ordered_current_key) . '' . ($key_ordered_current_equals_data ? '' : ''); ?> ' : '') - . '' + . '' . $key_ordered_current_val . '' . ($key_ordered_current_equals_data ? '' : ''); ?> @@ -264,25 +261,25 @@ if (isset($disp_row) && is_array($disp_row)) { ' : '') - . '' + echo ($val_ordered_current_equals_data ? '' : '') + . '' . $val_ordered_current_val . '' . ($val_ordered_current_equals_data ? '' : ''); ?> ' : '') . '' . htmlspecialchars($val_ordered_current_key) + echo ($val_ordered_current_equals_data ? '' : '') . '' . htmlspecialchars($val_ordered_current_key) . '' . ($val_ordered_current_equals_data ? '' : ''); ?> +?> @@ -308,4 +305,4 @@ if (isset($cfg['OBGzip']) && $cfg['OBGzip'] && isset($ob_mode) && $ob_mode) { PMA_outBufferPost($ob_mode); } -?> +?> diff --git a/css/phpmyadmin.css.php b/css/phpmyadmin.css.php index e931c3a76..efa3b3c8e 100644 --- a/css/phpmyadmin.css.php +++ b/css/phpmyadmin.css.php @@ -15,11 +15,6 @@ if ( $GLOBALS['text_dir'] === 'ltr' ) { $left = 'right'; } -// Gets the default font sizes -// garvin: TODO: Should be optimized to not include the whole common.lib.php bunch -// but only functions used to determine browser heritage. -PMA_setFontSizes(); - // Send correct type: header('Content-Type: text/css; charset=ISO-8859-1'); diff --git a/db_printview.php b/db_printview.php index 9b35fb610..e7de94c71 100644 --- a/db_printview.php +++ b/db_printview.php @@ -217,8 +217,8 @@ else { if (isset($sts_data['Create_time']) && !empty($sts_data['Create_time'])) { ?> - - + + - - + + - - + + "; -<?php - if(!empty($page_title)) - echo htmlspecialchars($page_title); - else +<title><?php + if(!empty($page_title)) + echo htmlspecialchars($page_title); + else echo 'phpMyAdmin'; ?> diff --git a/server_privileges.php b/server_privileges.php index 711a76b2d..dddf5d8dd 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -1382,7 +1382,7 @@ if ( empty( $adduser ) && empty( $checkprivs ) ) { uksort( $array_initials, "strnatcasecmp" ); - echo ''; + echo '
'; foreach ($array_initials as $tmp_initial => $initial_was_found) { if ($initial_was_found) { echo '' . "\n"; @@ -1593,11 +1593,11 @@ if ( empty( $adduser ) && empty( $checkprivs ) ) { // table body // get data - + // we also want privielgs for this user not in table `db` but in other table $tables = PMA_DBI_fetch_result('SHOW TABLES FROM `mysql`;'); if ( empty( $dbname ) ) { - + // no db name given, so we want all privs for the given user $tables_to_search_for_users = array( @@ -1668,16 +1668,16 @@ if ( empty( $adduser ) && empty( $checkprivs ) ) { } PMA_DBI_free_result( $res ); unset( $row, $res ); - + } else { - + // db name was given, // so we want all user specific rights for this db - + $user_host_condition .= ' AND ' . PMA_convert_using('`Db`') .' LIKE ' . PMA_convert_using( $dbname, 'quoted' ); - + $tables_to_search_for_users = array( 'columns_priv', ); @@ -1724,7 +1724,7 @@ if ( empty( $adduser ) && empty( $checkprivs ) ) { } PMA_DBI_free_result( $db_rights_result ); unset( $db_rights_sql, $db_rights_sqls, $db_rights_result, $db_rights_row ); - + $sql_query = 'SELECT `Table_name`,' .' `Table_priv`,' diff --git a/tbl_properties.inc.php b/tbl_properties.inc.php index c724c4fac..0d46617ff 100644 --- a/tbl_properties.inc.php +++ b/tbl_properties.inc.php @@ -12,7 +12,7 @@ require_once('./libraries/mysql_charsets.lib.php'); require_once('./libraries/storage_engines.lib.php'); if ($cfg['CtrlArrowsMoving']) { - ?> + ?> = 40102) { - ?> + ?> - + + ?> + ?> + ?> + ?> + ?> $o_fld_val) { - ?> + ?> + ?> $o_fld_val) { - ?> + ?> + ?> " /> ' . "\n"; + $content_cells[$i][$ci] = '
' . $tmp_initial . '
'; if ( $cfg['DefaultPropDisplay'] == 'horizontal' ) { - ?> + ?> - + '; @@ -563,7 +563,7 @@ if ( is_array( $content_cells ) && is_array( $header_cells ) ) { if ( is_array( $content_row ) ) { foreach ($content_row as $content_row_val) { - ?> + ?> '; $odd_row = ! $odd_row; - ?> + ?> + ?> + ?>

; function addField() { var new_fields = document.getElementById('added_fields').value; var new_field_container = document.getElementById('table_columns'); - var new_field = ''; + var new_field = ''; var i = 0; for ( i = 0; i < new_fields; i++ ) { if ( odd_row ) { @@ -623,17 +623,17 @@ function addField() { } odd_row = ! odd_row; } - + return true; } // --> - + + ?> @@ -644,7 +644,7 @@ if ($action == 'tbl_create.php') { echo ' ' . "\n" . ' ' . "\n"; } - ?> + ?>
 ' . $strCollation . ': 
' . "\n"; } - ?> + ?>

+?>
@@ -679,7 +679,7 @@ if ($action == 'tbl_create.php') { onclick="return checkFormElementInRange(this.form, 'added_fields', '', 1)" /> - +
@@ -692,12 +692,12 @@ if ($cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME']) echo '

3 ' . $strMIME_transformation_options_note . '

'; echo '

'; printf( $strMIME_transformation_note, - '', '' ); echo '

'; } -?> +?>
diff --git a/tbl_properties_structure.php b/tbl_properties_structure.php index a88ce838e..f02784f75 100644 --- a/tbl_properties_structure.php +++ b/tbl_properties_structure.php @@ -336,7 +336,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) { > = 40100 ? ' ' . (empty($field_charset) ? '' : '' . $field_charset . '') . '' . "\n" : '' ?> - + diff --git a/tbl_relation.php b/tbl_relation.php index 6962d9184..fbe13520b 100644 --- a/tbl_relation.php +++ b/tbl_relation.php @@ -40,12 +40,9 @@ $options_array = array('CASCADE' => 'CASCADE', 'SET_NULL' => 'SET NULL', 'NO_ACT * @access public */ function PMA_generate_dropdown($dropdown_question,$radio_name,$choices,$selected_value) { - global $font_smallest; echo $dropdown_question . '  '; - //echo '' . "\n"; echo '' . "\n"; @@ -54,7 +51,6 @@ function PMA_generate_dropdown($dropdown_question,$radio_name,$choices,$selected if ($selected_value == $one_value) { echo ' selected="selected" '; } - //echo ' style="font-size: ' . $font_smallest . '">' echo '>' . $one_label . '' . "\n"; } echo '' . "\n"; @@ -369,10 +365,10 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) { $save_row[] = $row; } $saved_row_cnt = count($save_row); - ?> + ?>
- + 0) { } echo ''; } - ?> + ?> + ?> + if ($cfgRelation['relwork']) { + ?> 0) { if ($tbl_type=='INNODB') { echo ''; } // end if (InnoDB) - ?> + ?> ' . "\n"; echo '' . "\n"; - + if ($cfgRelation['displaywork']) { // Get "display_field" infos $disp = PMA_getDisplayField($db, $table); - ?> + ?>
+ ?>
diff --git a/themes.php b/themes.php index ea0fcf81a..368f8a6de 100644 --- a/themes.php +++ b/themes.php @@ -9,8 +9,6 @@ require_once('./libraries/select_theme.lib.php'); /* set language and charset */ require_once('./libraries/header_http.inc.php'); -/* Gets the font sizes to use */ -PMA_setFontSizes(); /* HTML header */ $page_title = 'phpMyAdmin - ' . $strTheme; require('./libraries/header_meta_style.inc.php'); diff --git a/themes/original/css/theme_left.css.php b/themes/original/css/theme_left.css.php index 1d127e1b6..608a809c5 100644 --- a/themes/original/css/theme_left.css.php +++ b/themes/original/css/theme_left.css.php @@ -1,6 +1,5 @@ body, input, select { font-family: ; - font-size: ; color: #000000 } @@ -46,7 +45,7 @@ div#left_tableList { list-style-position: outside; margin: 0; padding: 0; - font-size: ; + font-size: 80%; } div#left_tableList a { diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 1415bc8ad..2e4559a90 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -8,7 +8,6 @@ body { margin: 0.5em; padding: 0; font-family: ; - font-size: ; color: #000000; } -pre, tt {font-size: } -th {font-family: ; font-size: ; font-weight: bold; color: #000000; background-color: } -td {font-family: ; font-size: } -form {font-family: ; font-size: ; padding: 0px; margin: 0px;} -input {font-family: ; font-size: } -input.textfield {font-family: ; font-size: ; color: #000000; background-color: #FFFFFF} -select {font-family: ; font-size: ; color: #000000; background-color: #FFFFFF} -textarea {font-family: ; font-size: ; color: #000000; background-color: #FFFFFF} -h1 {font-family: ; font-size: ; font-weight: bold} -h2 {font-family: ; font-size: ; font-weight: bold} -h3 {font-family: ; font-size: ; font-weight: bold} -a:link {font-family: ; font-size: ; text-decoration: none; color: #0000FF} -a:visited {font-family: ; font-size: ; text-decoration: none; color: #0000FF} -a:hover {font-family: ; font-size: ; text-decoration: underline; color: #FF0000} +th {font-family: ; font-weight: bold; color: #000000; background-color: } +td {font-family: ; } +form {font-family: ; padding: 0px; margin: 0px;} +input {font-family: ; } +input.textfield {font-family: ; color: #000000; background-color: #FFFFFF} +select {font-family: ; color: #000000; background-color: #FFFFFF} +textarea {font-family: ; color: #000000; background-color: #FFFFFF} +h1 {font-family: ; font-size: 140%; font-weight: bold} +h2 {font-family: ; font-size: 120%; font-weight: bold} +h3 {font-family: ; font-weight: bold} +a:link {font-family: ; text-decoration: none; color: #0000FF} +a:visited {font-family: ; text-decoration: none; color: #0000FF} +a:hover {font-family: ; text-decoration: underline; color: #FF0000} dfn {font-style: normal} dfn:hover {font-style: normal; cursor: help} @@ -71,14 +69,14 @@ button.mult_submit { visibility: inherit; cursor: move; position: absolute; - font-size: ; + font-size: 80%; border: 1px dashed #000000; } .print{font-family:arial;font-size:8pt;} /* MySQL Parser */ -.syntax {font-family: sans-serif; font-size: ;} +.syntax {font-family: sans-serif; font-size: 80%;} .syntax_comment { padding-left: 4pt; padding-right: 4pt;} .syntax_digit {} .syntax_digit_hex {} @@ -304,7 +302,7 @@ fieldset.confirmation legend { /* end messageboxes */ -.tblcomment {font-size: ; font-weight: normal; color: #000099; } +.tblcomment {font-size: 70%; font-weight: normal; color: #000099; } .tblHeaders { background-color: ; @@ -364,7 +362,6 @@ img, input, select, button { /* disabled text */ .disabled, .disabled a:link, disabled a:active, .disabled a:visited { font-family: ; - font-size: ; color: #666666; } .disabled a:hover { @@ -393,7 +390,6 @@ tr.disabled td, td.disabled { border: 0.1em solid #000000; padding: 0.5em; font-family: ; - font-size: ; } fieldset {
'; if (!empty($save_row[$i]['Key'])) { - ?> + ?> @@ -497,18 +493,18 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) { } // end if (a key exists) echo '