set focus on modal form
[qcg-portal.git] / qcg / templates / qcg / job_new.html
index 6f829d0..966c5d2 100644 (file)
     {% include 'filex/source.js.html' %}
 
     <script>
-        $(function() {
+        var filex = filex || {};
+
+        $(function () {
+            'use strict';
+
             var gridftpButton = $('<button/>', {
                 'type': 'button',
                 'class': 'btn btn-default pull-right',
@@ -41,7 +45,7 @@
                             return;
                         }
 
-                        var file = fullPath(filex.host + filex.path.full() + '/', selected[0]);
+                        var file = fullPath(filex.host + '/' + filex.path.full() + '/', selected[0]);
 
                         target.selectize.clear();
                         target.selectize.addOption({value: file, text: file});
@@ -58,7 +62,7 @@
                 var target = this;
                 return gridftpButton.clone().click(function() {
                     $('#select-btn').off().click(function() {
-                        var path = filex.host + filex.path.full() + '/';
+                        var path = filex.host + '/' + filex.path.full() + '/';
 
                         _.each(filex.selectedFiles(), function(item) {
                             var file = fullPath(path, item);