1 {% extends "base.html" %} |
1 {% extends "base.html" %} |
2 {% block title %}Submit Paper for Proceedings{% endblock %} |
2 {% block title %}Submit Paper for Proceedings{% endblock %} |
3 |
3 |
4 {% block addscripts %} |
4 {% block addscripts %} |
5 <script type="text/javascript" src="/static/jquery/jquery.watermarkinput.js"></script> |
5 <link rel="stylesheet" href="/static/css/autoSuggest.css" type="text/css" media="screen" charset="utf-8"> |
6 <link rel="stylesheet" href="/static/css/autosuggest_inquisitor.css" type="text/css" media="screen" charset="utf-8"> |
6 <script type="text/javascript" src="/static/jquery/jquery.autoSuggest.js"></script> |
7 <script type="text/javascript" src="/static/jquery/jquery.autosuggest.js"></script> |
7 <script type="text/javascript"> |
8 <script type="text/javascript"> |
8 $(document).ready(function() { |
9 /** Init autosuggest on Search Input **/ |
9 var initial_authors_obj = eval("{{ initial_authors|escapejs }}"); |
10 jQuery(function() { |
10 $("#id_authors").autoSuggest("{% url kiwipycon_get_usernames %}", |
|
11 {minChars: 2, asHtmlID: "authors", |
|
12 selectedValuesProp: "name", |
|
13 preFill: initial_authors_obj }); |
|
14 }); |
|
15 </script> |
11 |
16 |
12 // Set autosuggest options with all plugins activated |
|
13 var options = { |
|
14 script:"{% url kiwipycon_get_usernames %}?limit=10&", |
|
15 varname:"input", |
|
16 json:true, // Returned response type |
|
17 shownoresults:true, // If disable, display nothing if no results |
|
18 noresults:"No Results", // String displayed when no results |
|
19 maxresults:8, // Max num results displayed |
|
20 cache:false, // To enable cache |
|
21 minchars:2, // Start AJAX request with at leat 2 chars |
|
22 timeout:100000, // AutoHide in XX ms |
|
23 callback: function (obj) { // Callback after click or selection |
|
24 // => TO submit form (general use) |
|
25 //$('#id_authors').val('sucks'); |
|
26 //$('#form_search_country').submit(); |
|
27 } |
|
28 }; |
|
29 |
|
30 // Init autosuggest |
|
31 var as_json = new bsn.AutoSuggest('id_authors', options); |
|
32 |
|
33 // Display a little watermak |
|
34 $("#id_authors").Watermark("Ex : alex, guido, travis"); |
|
35 }); |
|
36 </script> |
|
37 {% endblock %} |
17 {% endblock %} |
38 |
18 |
39 {% block content %} |
19 {% block content %} |
40 <h1>Submit Proceedings paper</h1> |
20 <h1>Submit Proceedings paper</h1> |
41 |
21 |