SOLR-3838: Admin UI - Multiple filter queries are not supported in Query UI

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1494762 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Matheis 2013-06-19 20:26:39 +00:00
parent 0aec15cb05
commit f5a79d5162
5 changed files with 83 additions and 2 deletions

View File

@ -184,6 +184,8 @@ Optimizations
* SOLR-4923: Commit to all nodes in a collection in parallel rather than locally and
then to all other nodes. (hossman, Ricardo Merizalde, Mark Miller)
* SOLR-3838: Admin UI - Multiple filter queries are not supported in Query UI (steffkes)
Other Changes
----------------------

View File

@ -32,6 +32,44 @@
width: 98%;
}
#content #query #form .multiple input
{
float: left;
width: 80%
}
#content #query #form .multiple .buttons
{
float: right;
width: 16%;
}
#content #query #form .multiple a
{
background-position: 50% 50%;
display: block;
height: 25px;
width: 49%;
}
#content #query #form .multiple a span
{
display: none;
}
#content #query #form .multiple a.add
{
background-image: url( ../../img/ico/plus-button.png );
float: right;
}
#content #query #form .multiple a.rem
{
background-image: url( ../../img/ico/minus-button.png );
float: left;
}
#content #query #form #start
{
float: left;

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

View File

@ -106,6 +106,39 @@ sammy.get
}
);
$( '.multiple a', query_form )
.die( 'click' )
.live
(
'click',
function( event )
{
var self = $( this );
var row = self.closest( '.row' );
var container = self.closest( '.multiple' );
var add = parseInt( self.data( 'action' ), 10 );
if( add )
{
var new_row = row.clone();
new_row.find( 'input' ).val( '' );
row.after( new_row );
row.next().find( 'input' ).focus();
}
else if( 1 === $( '.row', container ).size() )
{
row.find( 'input' ).val( '' ).focus();
}
else
{
row.remove();
container.find( 'input:last' ).focus();
}
return false;
}
)
query_form
.die( 'submit' )
.live

View File

@ -37,12 +37,20 @@ limitations under the License.
<label for="fq">
<a rel="help">fq</a>
</label>
<input type="text" id="fq" name="fq" class="multiple" title="Filter query.">
<div class="multiple">
<div class="row clearfix">
<input type="text" id="fq" name="fq" title="Filter query.">
<div class="buttons">
<a class="rem" data-action="0"><span>[-]</span></a>
<a class="add" data-action="1"><span>[+]</span></a>
</div>
</div>
</div>
<label for="sort">
<a rel="help">sort</a>
</label>
<input type="text" id="sort" name="sort" class="multiple" title="Sort field or function with asc|desc.">
<input type="text" id="sort" name="sort" title="Sort field or function with asc|desc.">
<label for="start">
<a rel="help">start</a>,