Sha256: 1308d403d4bcc3c7a6c757829b0e31c0f2b3fffcedd57db3fd4f7445caaa8e5c

Contents?: true

Size: 1.41 KB

Versions: 5

Compression:

Stored size: 1.41 KB

Contents

#**
 *  Provide elements for the <head> section of the HTML document
 *#

  ## An example of using an arbitrary request parameter
  <title>#param('title')</title>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

  <script type="text/javascript" src="#{url_root}/js/lib/jquery-1.7.2.min.js"></script>
  <link rel="stylesheet" type="text/css" href="#{url_for_solr}/admin/file?file=/velocity/main.css&contentType=text/css"/>
  <link rel="stylesheet" href="#{url_for_solr}/admin/file?file=/velocity/jquery.autocomplete.css&contentType=text/css" type="text/css" />
  <script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/jquery.autocomplete.js&contentType=text/javascript"></script>


    <script>
    $(document).ready(function(){
      $("\#q").autocomplete('#{url_for_solr}/terms', {  ## backslash escaped #q as that is a macro defined in VM_global_library.vm
           extraParams:{
             'terms.prefix': function() { return $("\#q").val();},
             'terms.sort': 'count',
             'terms.fl': 'name',
             'wt': 'velocity',
             'v.template': 'suggest'
           }
         }
      ).keydown(function(e){
        if (e.keyCode === 13){
          $("#query-form").trigger('submit');
        }
      });

      // http://localhost:8983/solr/collection1/terms?terms.fl=name&terms.prefix=i&terms.sort=count&wt=velocity&v.template=suggest
    });

    </script>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
simple_solr_client-0.2.1 solr_sample_core/conf/velocity/head.vm
simple_solr_client-0.2.0 solr_sample_core/conf/velocity/head.vm
simple_solr_client-0.1.2 solr_sample_core/conf/velocity/head.vm
simple_solr_client-0.1.1 solr_sample_core/conf/velocity/head.vm
simple_solr_client-0.1.0 solr_sample_core/conf/velocity/head.vm