proper escaping of file attributes in js templates
[qcg-portal.git] / filex / templates / filex / source.js.html
1 {% load staticfiles filex %}
2
3 <script src="{% static 'qcg/selectize/selectize.min.js' %}"></script>
4 <script src="{% static 'filex/underscore/underscore.js' %}"></script>
5 <script src="{% static 'filex/backbone/backbone.js' %}"></script>
6 <script src="{% static 'filex/filex.js' %}"></script>
7
8 <script>
9     var filex;
10     $(function() {
11         filex = new Filex.FilexView({locations: {% locations %}});
12     });
13 </script>
14
15 <script type="text/template" id="dir-template">
16     <td class="text-center">
17         <label for="dir-<%- cid %>" class="sr-only">Zaznacz katalog <%- name %></label>
18         <input id="dir-<%- cid %>" type="checkbox" autocomplete="off">
19     </td>
20     <td class="text-center"><span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span></td>
21     <td><a class="link" href="#<%- url %>"><%- name %></a></td>
22     <td class="text-right"><%- size %></td>
23     <td><%- date %></td>
24 </script>
25
26 <script type="text/template" id="file-template">
27     <td class="text-center">
28         <label for="file-<%- cid %>" class="sr-only">Zaznacz plik <%- name %></label>
29         <input id="file-<%- cid %>" type="checkbox" autocomplete="off">
30     </td>
31     <td class="text-center"><span class="glyphicon glyphicon-file" aria-hidden="true"></span></td>
32     <td>
33         <a class="link" href="{% url 'filex:download' %}?<%- params %>"><%- name %></a>
34     </td>
35     <td class="text-right"><%- size %></td>
36     <td><%- date %></td>
37 </script>