From d5bf4f087462043219ff0058058348d95785e41b Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 1 Aug 2012 21:49:46 +0530 Subject: [PATCH 1/7] Remove outer fieldset --- libraries/TableSearch.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/TableSearch.class.php b/libraries/TableSearch.class.php index 158f712799..7c171634bb 100644 --- a/libraries/TableSearch.class.php +++ b/libraries/TableSearch.class.php @@ -1113,7 +1113,6 @@ EOT; public function getSelectionForm($goto, $dataLabel = null) { $html_output = ''; - $html_output .= '
'; $url_params = array(); $url_params['db'] = $this->_db; $url_params['table'] = $this->_table; @@ -1169,7 +1168,7 @@ EOT; $html_output = '
' . $html_output . '
'; } else { - $html_output .= '
'; + $html_output .= '
'; } return $html_output; } From c2e22dd1ac57eeada6bd6c341430643bd8eecc0e Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 1 Aug 2012 22:07:32 +0530 Subject: [PATCH 2/7] Fix footer fieldset of zoom search and simplify some code --- libraries/TableSearch.class.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libraries/TableSearch.class.php b/libraries/TableSearch.class.php index 7c171634bb..acfb1817e9 100644 --- a/libraries/TableSearch.class.php +++ b/libraries/TableSearch.class.php @@ -1112,12 +1112,11 @@ EOT; */ public function getSelectionForm($goto, $dataLabel = null) { - $html_output = ''; $url_params = array(); $url_params['db'] = $this->_db; $url_params['table'] = $this->_table; - $html_output .= $this->getCommonFunctions()->getHtmlTabs( + $html_output = $this->getCommonFunctions()->getHtmlTabs( $this->_getSubTabs(), $url_params, 'topmenu2' ); $html_output .= $this->_getFormTag($goto); @@ -1148,6 +1147,7 @@ EOT; */ if ($this->_searchType == 'zoom') { $html_output .= $this->_getOptionsZoom($dataLabel); + $html_output .= ''; } else { $html_output .= '
' . '' @@ -1164,12 +1164,7 @@ EOT; . ($this->_searchType == 'zoom' ? '" id="inputFormSubmitId"' : '" ') . 'value="' . __('Go') . '" />'; $html_output .= ''; - if ($this->_searchType == 'zoom') { - $html_output = '
' - . $html_output . ''; - } else { - $html_output .= '
'; - } + $html_output .= '
'; return $html_output; } From a2fc65637fb14597d7cb8b7a95a8be7fcdd244c7 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 1 Aug 2012 22:26:01 +0530 Subject: [PATCH 3/7] Do not hide the end tag in some other function --- libraries/TableSearch.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/TableSearch.class.php b/libraries/TableSearch.class.php index acfb1817e9..6dc29472a4 100644 --- a/libraries/TableSearch.class.php +++ b/libraries/TableSearch.class.php @@ -834,7 +834,7 @@ EOT; ); unset($choices); - $html_output .= '
'; + $html_output .= '
'; return $html_output; } @@ -1153,6 +1153,7 @@ EOT; . '' . ''; $html_output .= $this->_getOptions(); + $html_output .= ''; } /** From 7901d0d4e46f0a19bbad078a6c01a0d0fccbc3e3 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 1 Aug 2012 22:27:43 +0530 Subject: [PATCH 4/7] Simplify the code a bit --- libraries/TableSearch.class.php | 35 +++++++++++---------------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/libraries/TableSearch.class.php b/libraries/TableSearch.class.php index 6dc29472a4..16e06da404 100644 --- a/libraries/TableSearch.class.php +++ b/libraries/TableSearch.class.php @@ -1121,37 +1121,24 @@ EOT; ); $html_output .= $this->_getFormTag($goto); - $html_output .= '
'; - $html_output .= ($this->_searchType == 'zoom' - ? '' : '
'); - - // Set caption for fieldset if ($this->_searchType == 'zoom') { + $html_output .= '
'; $html_output .= '' . __('Do a "query by example" (wildcard: "%") for two different columns') . ''; - } else { - $html_output .= '' - . __('Do a "query by example" (wildcard: "%")') - . ''; - } - - /** - * Displays fields table in search form - */ - $html_output .= $this->_getFieldsTableHtml(); - - /** - * Displays more search options - */ - if ($this->_searchType == 'zoom') { + $html_output .= $this->_getFieldsTableHtml(); $html_output .= $this->_getOptionsZoom($dataLabel); $html_output .= '
'; } else { - $html_output .= '
' - . '' - . '
'; + $html_output .= ''; } From d0e4e37e846925f8ceb31f434c38535ef6c5abae Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 1 Aug 2012 22:57:27 +0530 Subject: [PATCH 5/7] Same look and feel of the settings page --- libraries/TableSearch.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libraries/TableSearch.class.php b/libraries/TableSearch.class.php index 16e06da404..5a28d10835 100644 --- a/libraries/TableSearch.class.php +++ b/libraries/TableSearch.class.php @@ -1116,9 +1116,13 @@ EOT; $url_params['db'] = $this->_db; $url_params['table'] = $this->_table; - $html_output = $this->getCommonFunctions()->getHtmlTabs( - $this->_getSubTabs(), $url_params, 'topmenu2' - ); + $html_output = '
    '; + foreach ($this->_getSubTabs() as $tab) { + $html_output .= PMA_CommonFunctions::getInstance()->getHtmlTab($tab, $url_params); + } + $html_output .= '
'; + $html_output .= '
'; + $html_output .= $this->_getFormTag($goto); if ($this->_searchType == 'zoom') { From d32f4138573f022fa25c435dd2bbded9faf0425f Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 1 Aug 2012 23:09:52 +0530 Subject: [PATCH 6/7] Activate search tab for both ordinary table search and zoom search --- libraries/Menu.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/Menu.class.php b/libraries/Menu.class.php index d6de4af77e..adbc5081fa 100644 --- a/libraries/Menu.class.php +++ b/libraries/Menu.class.php @@ -273,6 +273,10 @@ class PMA_Menu $tabs['search']['icon'] = 'b_search.png'; $tabs['search']['text'] = __('Search'); $tabs['search']['link'] = 'tbl_select.php'; + $tabs['search']['active'] = in_array( + basename($GLOBALS['PMA_PHP_SELF']), + array('tbl_select.php', 'tbl_zoom_select.php') + ); if (! $db_is_information_schema) { $tabs['insert']['icon'] = 'b_insrow.png'; From d56883327bc6a294eaed713d3044b53d306eccbb Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 1 Aug 2012 23:25:05 +0530 Subject: [PATCH 7/7] Make the two tabs look alike --- libraries/TableSearch.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/TableSearch.class.php b/libraries/TableSearch.class.php index 5a28d10835..be354cadea 100644 --- a/libraries/TableSearch.class.php +++ b/libraries/TableSearch.class.php @@ -1126,6 +1126,7 @@ EOT; $html_output .= $this->_getFormTag($goto); if ($this->_searchType == 'zoom') { + $html_output .= ''; } else { $html_output .= '