mirror of https://github.com/apache/lucene.git
SOLR-3325: linking to query UI with parameters will execute them
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1325390 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c23ba0564c
commit
09df31df42
|
@ -95,16 +95,7 @@ sammy.get
|
|||
? fieldset.addClass( 'expanded' )
|
||||
: fieldset.removeClass( 'expanded' );
|
||||
}
|
||||
)
|
||||
|
||||
for( var key in context.params )
|
||||
{
|
||||
if( 'string' === typeof context.params[key] )
|
||||
{
|
||||
$( '[name="' + key + '"]', query_form )
|
||||
.val( context.params[key] );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
query_form
|
||||
.die( 'submit' )
|
||||
|
@ -149,6 +140,23 @@ sammy.get
|
|||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
var fields = 0;
|
||||
for( var key in context.params )
|
||||
{
|
||||
if( 'string' === typeof context.params[key] )
|
||||
{
|
||||
fields++;
|
||||
$( '[name="' + key + '"]', query_form )
|
||||
.val( context.params[key] );
|
||||
}
|
||||
}
|
||||
|
||||
if( 0 !== fields )
|
||||
{
|
||||
query_form
|
||||
.trigger( 'submit' );
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue