X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;ds=sidebyside;f=qcg%2Ftemplates%2Fqcg%2Fgridftp.html;h=0477aa8d9f8e3a78c6aeeadc6df7309960e9c9c7;hb=551b5fe34b191fd78106178245dcf3ee8563e8d7;hp=2505b04f3e77f3490e82aa347c646a28d1a4d745;hpb=76066c4cd6557fe84369f538d69f64f8955bf03a;p=qcg-portal.git diff --git a/qcg/templates/qcg/gridftp.html b/qcg/templates/qcg/gridftp.html index 2505b04..0477aa8 100644 --- a/qcg/templates/qcg/gridftp.html +++ b/qcg/templates/qcg/gridftp.html @@ -1,5 +1,5 @@ {% extends 'qcg/base.html' %} -{% load staticfiles %} +{% load staticfiles bootstrap3 %} {% block extra_css %} @@ -14,6 +14,15 @@ $(function () { var statusTimeout; + function status(msg) { + clearTimeout(statusTimeout); + statusTimeout = setTimeout(function() { + $('#status').text(''); + }, 3000); + + $('#status').text(msg); + } + filex.files.on('change:checked', function() { var selected = filex.selectedFiles().length; @@ -64,12 +73,7 @@ filex.idle(); } else { - clearTimeout(statusTimeout); - statusTimeout = setTimeout(function() { - $('#status').text(''); - }, 3000); - - $('#status').text('Usuwanie zakończone pomyślnie'); + status('Usuwanie zakończone pomyślnie'); } if (response.done.length) @@ -82,6 +86,22 @@ $confirmModal.modal(); }); + + $('#mkdir-form').submit(function(e) { + var $this = $(this); + + e.preventDefault(); + filex.busy(); + $this.modal('hide'); + + $this.find('#id_host').val(filex.host); + $this.find('#id_path').val(filex.path.full()); + + $.post($this.attr('action'), $this.serialize(), function(response) { + status('Katalog utworzono pomyślnie'); + filex.reloadFiles(); + }, 'json') + }); }) {% endblock extra_js %} @@ -131,6 +151,27 @@ + + {% endblock container %} {% block footer %} @@ -139,7 +180,7 @@