浏览代码

HUE-8753 [frontend] Fix about page step 2 js exception

Caused by jquery upgrade, when referencing an attribute in a selector the value needs to be within quotes.
Johan Ahlen 6 年之前
父节点
当前提交
5f9ba5d

+ 1 - 1
apps/about/src/about/templates/admin_wizard.mako

@@ -356,7 +356,7 @@ $(document).ready(function(){
     }
 
     $("a.step").parent().removeClass("active");
-    $("a.step[href=#" + step + "]").parent().addClass("active");
+    $("a.step[href='#" + step + "']").parent().addClass("active");
     if (step == "step4") {
       $("#lastStep").parent().addClass("active");
     }

+ 8 - 8
apps/filebrowser/src/filebrowser/templates/listdir_components.mako

@@ -1521,20 +1521,20 @@ from filebrowser.conf import ENABLE_EXTRACT_UPLOADED_ARCHIVE
 
           $("#chownForm").attr("action", "/filebrowser/chown?next=${url('filebrowser.views.view', path='')}" + self.currentPath());
 
-          $("select[name=user]").val(self.selectedFile().stats.user);
+          $("select[name='user']").val(self.selectedFile().stats.user);
 
           $("#chownForm input[name='group_other']").removeClass("fieldError");
           $("#chownForm input[name='user_other']").removeClass("fieldError");
           $("#chownRequired").hide();
 
-          if ($("select[name=group] option:contains('" + self.selectedFile().stats.group + "')").length > 0) {
-            $("select[name=group]").val(self.selectedFile().stats.group);
+          if ($("select[name='group'] option:contains('" + self.selectedFile().stats.group + "')").length > 0) {
+            $("select[name='group']").val(self.selectedFile().stats.group);
           } else {
-            $("select[name=group]").val("__other__");
-            $("input[name=group_other]").val(self.selectedFile().stats.group);
+            $("select[name='group']").val("__other__");
+            $("input[name='group_other']").val(self.selectedFile().stats.group);
           }
 
-          $("select[name=group]").change();
+          $("select[name='group']").change();
 
           $("#changeOwnerModal").modal({
             keyboard: true,
@@ -1599,9 +1599,9 @@ from filebrowser.conf import ENABLE_EXTRACT_UPLOADED_ARCHIVE
 
           for (var i = 0; i < permissions.length; i++) {
             if (mode & 1) {
-              $("#chmodForm input[name=" + permissions[i] + "]").attr("checked", true);
+              $("#chmodForm input[name='" + permissions[i] + "']").attr("checked", true);
             } else {
-              $("#chmodForm input[name=" + permissions[i] + "]").attr("checked", false);
+              $("#chmodForm input[name='" + permissions[i] + "']").attr("checked", false);
             }
             mode >>>= 1;
           }

+ 1 - 1
apps/oozie/src/oozie/templates/editor/create_coordinator.mako

@@ -195,7 +195,7 @@ ${ layout.menubar(section='coordinators') }
         $("#backBtn").addClass("disabled");
       }
       $("a.step").parent().removeClass("active");
-      $("a.step[href=#" + step + "]").parent().addClass("active");
+      $("a.step[href='#" + step + "']").parent().addClass("active");
       $(".stepDetails").hide();
       $("#" + step).show();
     }

+ 1 - 1
apps/oozie/src/oozie/templates/editor/edit_bundle.mako

@@ -447,7 +447,7 @@ ${ layout.menubar(section='bundles') }
           $("#nextBtn").addClass("disabled");
         }
         $("a.step").parent().removeClass("active");
-        $("a.step[href=#" + step + "]").parent().addClass("active");
+        $("a.step[href='#" + step + "']").parent().addClass("active");
         $(".stepDetails").hide();
         $("#" + step).show();
       }

+ 2 - 2
apps/oozie/src/oozie/templates/editor/edit_coordinator.mako

@@ -522,7 +522,7 @@ ${ layout.menubar(section='coordinators') }
       % endif
 
       $("#datasets-btn").click(function () {
-        $('[href=#datasets]').tab('show');
+        $('[href=\'#datasets\']').tab('show');
       });
 
       $('#add-dataset-btn').click(function () {
@@ -720,7 +720,7 @@ ${ layout.menubar(section='coordinators') }
           $("#nextBtn").addClass("disabled");
         }
         $("a.step").parent().removeClass("active");
-        $("a.step[href=#" + step + "]").parent().addClass("active");
+        $("a.step[href='#" + step + "']").parent().addClass("active");
         $(".stepDetails").hide();
         $("#" + step).show();
       }

+ 2 - 2
apps/pig/src/pig/templates/app.mako

@@ -1089,8 +1089,8 @@ ${ commonshare() | n,unicode }
     });
 
     $(document).on("updateTooltips", function () {
-      $("a[rel=tooltip]").tooltip("destroy");
-      $("a[rel=tooltip]").tooltip();
+      $("a[rel='tooltip']").tooltip("destroy");
+      $("a[rel='tooltip']").tooltip();
     });
 
     $(document).on("saving", function () {

+ 1 - 1
apps/useradmin/src/useradmin/templates/change_password.mako

@@ -97,7 +97,7 @@ $(document).ready(function(){
     }
 
     $("a.step").parent().removeClass("active");
-    $("a.step[href=#" + step + "]").parent().addClass("active");
+    $("a.step[href='#" + step + "']").parent().addClass("active");
     $(".stepDetails").hide();
     $("#" + step).show();
   }