From 6003d9e95dfcea1365a3929f438edc8b3901108c Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Fri, 28 Feb 2003 18:57:34 +0000 Subject: [PATCH] Bugfixing, better defaults for query window. --- ChangeLog | 12 ++++++++++++ Documentation.html | 3 ++- config.inc.php3 | 6 +++--- header.inc.php3 | 4 ++-- libraries/common.lib.php3 | 10 +++++----- libraries/config_import.lib.php3 | 4 ++-- queryframe.php3 | 2 +- querywindow.php3 | 4 +++- tbl_query_box.php3 | 2 +- 9 files changed, 31 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67943e2fe..9f71154cb 100755 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,18 @@ $Source$ * server_privileges.php3: Fixed bug #691910. 2003-02-28 Garvin Hicking + * config.inc.php3, header.inc.php3, queryframe.php3, querywindow.php3, + tbl_query_box.php3, libraries/common.lib.php3, libraries/config_import.lib.php3, + Documentation.html: + - Finetuneing for query window: Only three tabs, if DefaultTab + is not set to 'full'. + - Inserted nobr-Tags to make german translation for 'sql history' fit inside a tab. + - Improved windowsize of the query window (no a *lot* smaller, hope this will suit + Rabus ;). + - Made the textarea smaller (*1.25 instead of *2) for the window only. + - Fixed a bug when you changed from a table to a database on the left frame and the + query window still wants to show the previous table. + * translators.html: Adjusted to same topmenu as Documentation.html. With the new 'Transformations' item the bar was too large to fit on standard 800x600 browser windows. diff --git a/Documentation.html b/Documentation.html index 6170fccd7..24d980536 100755 --- a/Documentation.html +++ b/Documentation.html @@ -1363,7 +1363,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
Number of columns and rows for the textareas.
- This value will be emphasized (*2) for sql query textareas.
+ This value will be emphasized (*2) for sql query textareas and (*1.25) for + sql textareas inside the query window.
The Char* values are used for CHAR and VARCHAR editing (if configured via $cfg['CharEditing']).

diff --git a/config.inc.php3 b/config.inc.php3 index d81ef7b39..d4c731b16 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -367,7 +367,7 @@ $cfg['BrowseMarkerColor'] = '#FFCC99'; // color of the marker (visually mar // (blank for no marker) $cfg['TextareaCols'] = 40; // textarea size (columns) in edit mode // (this value will be emphasized (*2) for sql - // query textareas) + // query textareas and (*1.25) for query window) $cfg['TextareaRows'] = 7; // textarea size (rows) in edit mode $cfg['TextareaAutoSelect'] = TRUE; // autoselect when clicking in the textarea of the querybox $cfg['CharTextareaCols'] = 40; // textarea size (columns) for CHAR/VARCHAR @@ -392,8 +392,8 @@ $cfg['QueryFrame'] = TRUE; // displays a new frame where a link $cfg['QueryFrameJS'] = TRUE; // whether to use JavaScript functions for opening a new window for SQL commands. // if set to 'false', the target of the querybox is always the right frame. $cfg['QueryFrameDebug'] = FALSE; // display JS debugging link (DEVELOPERS only) -$cfg['QueryWindowWidth'] = 750; // Width of Query window -$cfg['QueryWindowHeight'] = 300; // Height of Query window +$cfg['QueryWindowWidth'] = 550; // Width of Query window +$cfg['QueryWindowHeight'] = 310; // Height of Query window $cfg['QueryHistoryDB'] = FALSE; // Set to TRUE if you want DB-based query history. // If FALSE, this utilizes JS-routines to display // query history (lost by window close) diff --git a/header.inc.php3 b/header.inc.php3 index 860ba53bb..597fbf2cc 100755 --- a/header.inc.php3 +++ b/header.inc.php3 @@ -247,8 +247,8 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) { ?> if (top.frames.queryframe) { - - + top.frames.queryframe.document.queryframeform.db.value = ""; + top.frames.queryframe.document.queryframeform.table.value = ""; } function reload_querywindow () { diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index a4fd93882..51f668547 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -130,7 +130,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} * Includes compatibility code for older config.inc.php3 revisions * if necessary */ - if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < 166) { + if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < 167) { include('./libraries/config_import.lib.php3'); } @@ -1569,9 +1569,9 @@ if (typeof(document.getElementById) != 'undefined' $out = ''; if (strlen($link) > 0) { $out .= '' - . '' . $text . ''; + . '' . $text . ''; } else { - $out .= '' . $text . ''; + $out .= '' . $text . ''; } $out = '[ ' . $out . ' ]   '; } else { @@ -1580,9 +1580,9 @@ if (typeof(document.getElementById) != 'undefined' . "\n" . ' '; if (strlen($link) > 0) { $out .= '' - . '' . $text . ''; + . '' . $text . ''; } else { - $out .= '' . $text . ''; + $out .= '' . $text . ''; } $out .= "\n" . ' ' . '' diff --git a/libraries/config_import.lib.php3 b/libraries/config_import.lib.php3 index 46f13e72a..300ae7efb 100644 --- a/libraries/config_import.lib.php3 +++ b/libraries/config_import.lib.php3 @@ -695,11 +695,11 @@ if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')) { } if (!isset($cfg['QueryWindowWidth'])) { - $cfg['QueryWindowWidth'] = 750; + $cfg['QueryWindowWidth'] = 550; } if (!isset($cfg['QueryWindowHeight'])) { - $cfg['QueryWindowHeight'] = 300; + $cfg['QueryWindowHeight'] = 310; } if (!isset($cfg['QueryHistoryMax'])) { diff --git a/queryframe.php3 b/queryframe.php3 index bbbe30da3..971543763 100644 --- a/queryframe.php3 +++ b/queryframe.php3 @@ -75,7 +75,7 @@ function open_querywindow(url) { if (!querywindow.closed && querywindow.location) { querywindow.focus(); } else { - querywindow=window.open(url + '&db=' + document.queryframeform.db.value + '&table=' + document.queryframeform.table.value, 'js_querywindow','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=750,height=500'); + querywindow=window.open(url + '&db=' + document.queryframeform.db.value + '&table=' + document.queryframeform.table.value, 'js_querywindow','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=,height='); } if (!querywindow.opener) { diff --git a/querywindow.php3 b/querywindow.php3 index 6ec71ccad..79774a807 100644 --- a/querywindow.php3 +++ b/querywindow.php3 @@ -152,7 +152,9 @@ echo "\n"; echo PMA_printTab($strSQL, '#', '', 'onClick="javascript:query_tab_commit(\'sql\');return false;"', '', (isset($querydisplay_tab) && $querydisplay_tab == 'sql' ? TRUE : FALSE)); echo PMA_printTab($strImportFiles, '#', '', 'onClick="javascript:query_tab_commit(\'files\');return false;"', '', (isset($querydisplay_tab) && $querydisplay_tab == 'files' ? TRUE : FALSE)); echo PMA_printTab($strQuerySQLHistory, '#', '', 'onClick="javascript:query_tab_commit(\'history\');return false;"', '', (isset($querydisplay_tab) && $querydisplay_tab == 'history' ? TRUE : FALSE)); -echo PMA_printTab($strAll, '#', '', 'onClick="javascript:query_tab_commit(\'full\');return false;"', '', (isset($querydisplay_tab) && $querydisplay_tab == 'full' ? TRUE : FALSE)); +if ($cfg['QueryWindowDefTab'] == 'full') { + echo PMA_printTab($strAll, '#', '', 'onClick="javascript:query_tab_commit(\'full\');return false;"', '', (isset($querydisplay_tab) && $querydisplay_tab == 'full' ? TRUE : FALSE)); +} if (!$cfg['LightTabs']) { echo ''; diff --git a/tbl_query_box.php3 b/tbl_query_box.php3 index c9b6084e0..bf91fdb7b 100755 --- a/tbl_query_box.php3 +++ b/tbl_query_box.php3 @@ -110,7 +110,7 @@ if (!isset($is_inside_querywindow) ||
-