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:
Ryan McKinley 2012-04-12 17:21:09 +00:00
parent c23ba0564c
commit 09df31df42
1 changed files with 18 additions and 10 deletions

View File

@ -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' );
}
}
);
}