Browse Source

HUE-1152 [oozie] Can't select a file

Fixes infinite loop on Firefox
Now filechooser modals are closed when you click on a file
Enrico Berti 12 years ago
parent
commit
da8963f

+ 4 - 3
apps/oozie/src/oozie/templates/utils.inc.mako

@@ -286,6 +286,9 @@
 
 
   <script type="text/javascript" charset="utf-8">
   <script type="text/javascript" charset="utf-8">
     $(document).ready(function(){
     $(document).ready(function(){
+
+      $("*").on("focusin", false); //fixes an infinite loop on Firefox
+
       % if not skip_init:
       % if not skip_init:
         $(".pathChooser").each(function(){
         $(".pathChooser").each(function(){
           var self = $(this);
           var self = $(this);
@@ -327,9 +330,7 @@
             },
             },
             onFileChoose:function (filePath) {
             onFileChoose:function (filePath) {
               handleChoice(filePath);
               handleChoice(filePath);
-              if (selectFolder == undefined || !selectFolder) {
-                $("#chooseFile").modal("hide");
-              }
+              $("#chooseFile").modal("hide");
             },
             },
             createFolder:false,
             createFolder:false,
             uploadFile:true,
             uploadFile:true,

+ 9 - 9
apps/oozie/static/js/workflow.models.js

@@ -82,7 +82,7 @@ var MAPPING_OPTIONS = {
     },
     },
     update: function(options) {
     update: function(options) {
       return map_params(options, function() {});
       return map_params(options, function() {});
-    },
+    }
   },
   },
   archives: {
   archives: {
     create: function(options) {
     create: function(options) {
@@ -110,7 +110,7 @@ var MAPPING_OPTIONS = {
       };
       };
 
 
       return map_params(options, subscribe);
       return map_params(options, subscribe);
-    },
+    }
   },
   },
   params: {
   params: {
     create: function(options) {
     create: function(options) {
@@ -138,7 +138,7 @@ var MAPPING_OPTIONS = {
       };
       };
 
 
       return map_params(options, subscribe);
       return map_params(options, subscribe);
-    },
+    }
   },
   },
   prepares: {
   prepares: {
     create: function(options) {
     create: function(options) {
@@ -166,17 +166,17 @@ var MAPPING_OPTIONS = {
       };
       };
 
 
       return map_params(options, subscribe);
       return map_params(options, subscribe);
-    },
+    }
   },
   },
   deletes: {
   deletes: {
     create: function(options) {
     create: function(options) {
       return map_params(options, function() {});
       return map_params(options, function() {});
-    },
+    }
   },
   },
   mkdirs: {
   mkdirs: {
     create: function(options) {
     create: function(options) {
       return map_params(options, function() {});
       return map_params(options, function() {});
-    },
+    }
   },
   },
   moves: {
   moves: {
     create: function(options) {
     create: function(options) {
@@ -191,7 +191,7 @@ var MAPPING_OPTIONS = {
       };
       };
 
 
       return map_params(options, subscribe);
       return map_params(options, subscribe);
-    },
+    }
    },
    },
    chmods: {
    chmods: {
      create: function(options) {
      create: function(options) {
@@ -209,12 +209,12 @@ var MAPPING_OPTIONS = {
        };
        };
 
 
        return map_params(options, subscribe);
        return map_params(options, subscribe);
-     },
+     }
    },
    },
    touchzs: {
    touchzs: {
      create: function(options) {
      create: function(options) {
        return map_params(options, function() {});
        return map_params(options, function() {});
-     },
+     }
    }
    }
 };
 };