add saving favorite locations
[qcg-portal.git] / filex / templates / filex / source.js.html
index 4942015..18cc281 100644 (file)
@@ -1,4 +1,4 @@
-{% load staticfiles %}
+{% load staticfiles filex %}
 
 <script src="{% static 'qcg/selectize/selectize.min.js' %}"></script>
 <script src="{% static 'filex/underscore/underscore.js' %}"></script>
@@ -8,16 +8,7 @@
 <script>
     var filex;
     $(function() {
-        filex = new Filex.FilexView({
-            host: 'qcg.man.poznan.pl',
-            hostOptions: [
-                {host: 'qcg.man.poznan.pl', path: '/home/plgrid/{{ request.user.username }}/reef'},
-                {host: 'ui.grid.icm.edu.pl', path: '/icm/hydra/home/grid/{{ request.user.username }}'},
-                {host: 'ui.plgrid.wcss.wroc.pl', path: '/home/grid/users/{{ request.user.username }}'},
-                {host: 'ui.grid.task.gda.pl', path: '/home/plgrid/{{ request.user.username }}'},
-                {host: 'zeus.cyfronet.pl', path: '/people/{{ request.user.username }}'}
-            ]
-        });
+        filex = new Filex.FilexView({locations: {% locations %}});
     });
 </script>
 
 </script>
 
 <script type="text/template" id="dir-template">
+    <td class="text-center">
+        <label for="dir-<%= cid %>" class="sr-only">Zaznacz katalog <%= name %></label>
+        <input id="dir-<%= cid %>" type="checkbox" autocomplete="off" <%= checked ? 'checked="checked"' : '' %>>
+    </td>
     <td class="text-center"><span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span></td>
     <td><a class="link" href="#"><%= name %></a></td>
     <td class="text-right"><%= size %></td>
 </script>
 
 <script type="text/template" id="file-template">
+    <td class="text-center">
+        <label for="file-<%= cid %>" class="sr-only">Zaznacz plik <%= name %></label>
+        <input id="file-<%= cid %>" type="checkbox" autocomplete="off" <%= checked ? 'checked="checked"' : '' %>>
+    </td>
     <td class="text-center"><span class="glyphicon glyphicon-file" aria-hidden="true"></span></td>
     <td>
-        <a href="{% url 'filex:download' %}?<%= url_params %>"
-           class="btn btn-default btn-xs pull-right" title="Pobierz plik">
-            <span class="glyphicon glyphicon-cloud-download" aria-hidden="true"></span>
-        </a>
-        <a class="link" href="#"><%= name %></a>
+        <a class="link" href="{% url 'filex:download' %}?<%= url_params %>"><%= name %></a>
     </td>
     <td class="text-right"><%= size %></td>
     <td><%= date %></td>