fix error message
[qcg-portal.git] / qcg / templates / qcg / gridftp.html
index 6bf6a5d..e75e621 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 %}
@@ -11,7 +27,8 @@
     {% include 'filex/source.js.html' %}
 
     <script>
-        var filex = filex || {};
+        var filex = filex || {},
+            hostArchiveSupport = ['moss.man.poznan.pl', 'ui.plgrid.wcss.wroc.pl'];
 
         $(function () {
             'use strict';
@@ -56,7 +73,7 @@
                 if (filex.files.some(function(item) { return item.get('name') == name })) {
                     $('<div>', {
                         'class': 'alert alert-danger',
-                        html: '<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> Plik o podanej już nazwie istnieje!'
+                        html: '<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> Plik o podanej nazwie już istnieje!'
                     }).prependTo(modal.find('.modal-body'));
 
                     return true;
             }
 
             filex.files.on('change:checked reset', function() {
-                var selected = filex.selectedFiles().length;
+                var selected = filex.selectedFiles().length,
+                    supportsArchive = hostArchiveSupport.indexOf(filex.host) != -1;
 
                 $('#btn-rename').toggleClass('disabled', selected != 1);
                 $('#btn-delete').toggleClass('disabled', selected == 0);
-                $('#btn-compress').toggleClass('disabled', filex.host != 'moss.man.poznan.pl' || selected == 0);
+                $('#btn-compress').toggleClass('disabled', !supportsArchive || selected == 0);
 
-                if (filex.host == 'moss.man.poznan.pl' && selected == 1) {
+                if (supportsArchive && selected == 1) {
                     var filename = filex.selectedFiles()[0].get('name'),
                         is_archive = _.some(['.zip', '.tar.gz', '.tgz', '.tar.bz2', 'tbz'], function(ext) {
                             return filename.endsWith(ext);
 {% 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">