From 7247cbd0776c6a6aa91a1e24abca7b39ce6feba1 Mon Sep 17 00:00:00 2001 From: Stefan Matheis Date: Sat, 21 Apr 2012 15:00:58 +0000 Subject: [PATCH] SOLR-3317: Improve Request Handler in Query Form git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1328681 13f79535-47bb-0310-9956-ffa450edef68 --- solr/webapp/web/css/styles/query.css | 5 ++ solr/webapp/web/js/scripts/query.js | 9 ++- solr/webapp/web/tpl/query.html | 102 ++++++++++++++------------- 3 files changed, 65 insertions(+), 51 deletions(-) diff --git a/solr/webapp/web/css/styles/query.css b/solr/webapp/web/css/styles/query.css index 18f6d5bbf84..ceeeacd9743 100644 --- a/solr/webapp/web/css/styles/query.css +++ b/solr/webapp/web/css/styles/query.css @@ -52,6 +52,11 @@ margin-bottom: 5px; } +#content #query #form fieldset.common +{ + margin-top: 10px; +} + #content #query #form fieldset legend, #content #query #form .optional.expanded legend { diff --git a/solr/webapp/web/js/scripts/query.js b/solr/webapp/web/js/scripts/query.js index e0768c454a0..559ce5595e6 100644 --- a/solr/webapp/web/js/scripts/query.js +++ b/solr/webapp/web/js/scripts/query.js @@ -126,8 +126,15 @@ sammy.get form_values.push( all_form_values[i] ); } + var handler_path = $( '#qt', query_form ).val(); + if( '/' !== handler_path[0] ) + { + form_values.push( { name : 'qt', value : handler_path.esc() } ); + handler_path = '/select'; + } + var query_url = window.location.protocol + '//' + window.location.host - + core_basepath + '/select?' + $.param( form_values ); + + core_basepath + handler_path + '?' + $.param( form_values ); url_element .attr( 'href', query_url ) diff --git a/solr/webapp/web/tpl/query.html b/solr/webapp/web/tpl/query.html index 6c41bb96b64..49adbd76d69 100644 --- a/solr/webapp/web/tpl/query.html +++ b/solr/webapp/web/tpl/query.html @@ -20,46 +20,46 @@ limitations under the License.
-
+ + + +
common
- + - + - + - - + + - - - - + - @@ -69,19 +69,19 @@ limitations under the License.
-
+
-
+
- - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + +
-
+
- + @@ -193,7 +195,7 @@ limitations under the License.
-
+
-
+
-
+