X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=qcg%2Ftemplates%2Fqcg%2Fgridftp.html;h=6bf6a5d3236517279537990c28d4fda1de9ec1ba;hb=5d89371016f27ca592862971f0e4c56a32c497bd;hp=9eb5cee05d9e36d95afb19fc32e3d6104de071f2;hpb=1f0f07bbb4e5a5b1cc37428e8b33897fddf279aa;p=qcg-portal.git diff --git a/qcg/templates/qcg/gridftp.html b/qcg/templates/qcg/gridftp.html index 9eb5cee..6bf6a5d 100644 --- a/qcg/templates/qcg/gridftp.html +++ b/qcg/templates/qcg/gridftp.html @@ -54,8 +54,6 @@ function conflictingName(name, modal) { if (filex.files.some(function(item) { return item.get('name') == name })) { - modal.find('.alert').remove(); - $('
', { 'class': 'alert alert-danger', html: ' Plik o podanej już nazwie istnieje!' @@ -72,9 +70,9 @@ $('#btn-rename').toggleClass('disabled', selected != 1); $('#btn-delete').toggleClass('disabled', selected == 0); - $('#btn-compress').toggleClass('disabled', selected == 0); + $('#btn-compress').toggleClass('disabled', filex.host != 'moss.man.poznan.pl' || selected == 0); - if (selected == 1) { + if (filex.host == 'moss.man.poznan.pl' && 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); @@ -88,8 +86,10 @@ }); $('form').on('show.bs.modal', function() { - console.log('reset'); + $(this).find('.alert').remove(); this.reset(); + }).on('shown.bs.modal', function() { + $(this).find('input[type="text"]')[0].focus(); }); $('#btn-upload').on('click', function() {