浏览代码

HUE-1456 Better column type defaults in create table wizard

Fixed jQuery selectors
Enrico Berti 12 年之前
父节点
当前提交
5263869a8d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      apps/beeswax/src/beeswax/templates/define_columns.mako

+ 2 - 2
apps/beeswax/src/beeswax/templates/define_columns.mako

@@ -214,7 +214,7 @@ ${ layout.metastore_menubar() }
 
     $(".dataSample").each(function () {
       var _val = $.trim($(this).text());
-      var _field = $(this).siblings().find("select#id_cols-0-column_type");
+      var _field = $(this).siblings().find("select[id^=id_cols-]");
       var _foundType = "string";
       if ($.isNumeric(_val)) {
         _val = _val * 1;
@@ -245,7 +245,7 @@ ${ layout.metastore_menubar() }
       }
     });
 
-    $("select#id_cols-0-column_type").each(function () {
+    $("select[id^=id_cols-]").each(function () {
       $(this).val($(this).data("possibleType"));
     });