gridftp: fixed height file list
authorMaciej Tronowski <mtro@man.poznan.pl>
Fri, 8 May 2015 12:37:33 +0000 (14:37 +0200)
committerMaciej Tronowski <mtro@man.poznan.pl>
Fri, 8 May 2015 12:37:33 +0000 (14:37 +0200)
filex/static/filex/filex.js
filex/templates/filex/source.html
qcg/static/qcg/main.css
qcg/templates/qcg/gridftp.html
qcg/templates/qcg/job_submit.html
qcg/templates/qcg/task.html

index a19b354..011f47c 100644 (file)
@@ -329,7 +329,7 @@ $(function(){
             this.hostSelectize = this.$('#host-selector')[0].selectize;
 
             this.render();
-               Backbone.history.start({silent: true});
+               Backbone.history.start();
         },
 
         render: function() {
index 551ae51..e99cb68 100644 (file)
         </div>
     </nav>
 
-    <table class="table table-hover">
-        <thead>
-            <tr>
-                <th class="text-center" style="width: 40px">
-                    <label for="select-all" class="sr-only">Wybierz wszystkie pliki</label>
-                    <input id="select-all" type="checkbox" autocomplete="off">
-                </th>
-                <th style="width: 40px"></th>
-                <th>Nazwa</th>
-                <th style="width: 120px">Rozmiar</th>
-                <th style="width: 200px">Data</th>
-            </tr>
-        </thead>
-        <tbody></tbody>
-    </table>
+    <div id="list">
+        <table class="table table-hover">
+            <thead>
+                <tr>
+                    <th class="text-center" style="width: 40px">
+                        <label for="select-all" class="sr-only">Wybierz wszystkie pliki</label>
+                        <input id="select-all" type="checkbox" autocomplete="off">
+                    </th>
+                    <th style="width: 40px"></th>
+                    <th>Nazwa</th>
+                    <th style="width: 120px">Rozmiar</th>
+                    <th style="width: 200px">Data</th>
+                </tr>
+            </thead>
+            <tbody></tbody>
+        </table>
 
-    <div id="no-items" class="alert alert-info" hidden>
-        <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
-        Brak elementów
-    </div>
+        <div id="no-items" class="alert alert-info" hidden>
+            <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
+            Brak elementów
+        </div>
 
-    <div id="error" class="alert alert-danger" hidden>
-        <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
-        <span class="msg"></span>
+        <div id="error" class="alert alert-danger" hidden>
+            <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
+            <span class="msg"></span>
+        </div>
     </div>
 
     <div id="spinner-overlay"></div>
index 160a15c..147ed19 100644 (file)
@@ -84,6 +84,12 @@ textarea {
 #filex {
     /* needed for positioning spinner */
     position: relative;
+    height: 100%;
+}
+
+#list {
+    height: calc(100% - 55px);
+    overflow: auto;
 }
 
 #filex input[type=checkbox] {
index 6bf6a5d..5ee519f 100644 (file)
@@ -3,6 +3,22 @@
 
 {% block extra_css %}
     <link href="{% static 'qcg/selectize/selectize.bootstrap3.css' %}" rel="stylesheet">
+
+    <style>
+        html {
+            height: 100%;
+        }
+
+        body {
+            height: 100%;
+            margin-bottom: 0;
+        }
+
+        body > .container {
+            height: calc(100% - 122px);
+            overflow-y: hidden;
+        }
+    </style>
 {% endblock %}
 
 {% block extra_js %}
 {% endblock container %}
 
 {% block footer %}
-    <footer class="navbar navbar-default navbar-fixed-bottom" style="position:fixed">
+    <footer class="navbar navbar-default navbar-fixed-bottom">
         <div class="container">
             <div class="btn-toolbar" role="toolbar" style="float: left">
                 <div class="btn-group" role="group">
index 83e9025..a9ca868 100644 (file)
 
             $('#gridftp').one('show.bs.modal', function() {
                 filex.initialLoad();
+                $(this).find('.modal-body').css('height', window.innerHeight - 200 + 'px');
             });
 
             $('#template').on('show.bs.modal', function() {
index 584fa63..a610ea6 100644 (file)
             $('.working-dir').on('click', function() {
                 filex.load($(this).data('url'));
             });
+
+            $('#gridftp').one('show.bs.modal', function() {
+                $(this).find('.modal-body').css('height', window.innerHeight - 120 + 'px');
+            });
         });
     </script>
 {% endblock extra_js %}