stuff we did and used in ilikeil

15
stuff we did and used in ilikeil

Upload: reganne-coakley

Post on 30-Dec-2015

27 views

Category:

Documents


0 download

DESCRIPTION

stuff we did and used in ilikeil. Client code. {% extends "main.html" %} {% block search %} < div id =" searchdiv " class =" searchdiv "> < form action ="/search" method ="get"> - PowerPoint PPT Presentation

TRANSCRIPT

stuff we did and used in ilikeil

Client code1. {% extends "main.html" %}2. {% block search %}3. <div id="searchdiv" class="searchdiv">4. <form action="/search" method="get">5. <input autocomplete="off" name="q" id="q" type="text" tabindex="1" value="{{query}}"/>6.

7. <script type="text/javascript" src="/static/slideshow/scripts.js"></script>8. 9. <script type="text/javascript">10. function showTopics(){11. document.getElementById('topics').style.visibility='visible';12. document.getElementById('random-topics').style.display='none';13. }14. $(document).ready(function() { 15. $("#q").autocomplete(16. [ {%for keyw in allkeywords%}17. "{{keyw}}",18. {%endfor%}''],19. {20. delay:1,21. minChars:1,22. matchSubset:1,23. autoFill:true,24. maxItemsToShow:10,25. multiple:true,26. multipleSeparator: " " 27. }28. );29. });

Client code1. </script>2. <input type="submit" value="Search" />3. </form>4. <span class="hottopics">5. <span id="random-topics" class="keywords">6. Hot topics: 7. {%for keyw in hotkeywords|slice:"3"%}8. <a href="?q={{keyw}}">{{keyw}}</a>9. {%endfor%}10. <a href="/" onclick="showTopics();">more...</a>11. <br>12. 13. </span>14. <!--15. <span id="topics" style="visibility:hidden" class="keywords">16. {%for keyw in hotkeywords|slice:"20"%}17. <a href="?q={{keyw}}">{{keyw}}</a>18. {%endfor%}19. </span>-->20. </span>21. </div>22. {% endblock %}