From d0e1776af64acc185ab3a1260fc50d7bb7b98e6c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 9 Feb 2011 05:52:16 -0500 Subject: [PATCH] Correctly handle the ENUM editor message in case a column is added Add PMA_ prefix to function name --- js/functions.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/functions.js b/js/functions.js index c1a6b263b..07c623766 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1556,7 +1556,7 @@ function PMA_ajaxShowMessage(message, timeout) { /** * Hides/shows the "Open in ENUM/SET editor" message, depending on the data type of the column currently selected */ -function showNoticeForEnum(selectElement) { +function PMA_showNoticeForEnum(selectElement) { var enum_notice_id = selectElement.attr("id").split("_")[1]; enum_notice_id += "_" + (parseInt(selectElement.attr("id").split("_")[2]) + 1); var selectedType = selectElement.attr("value"); @@ -1832,6 +1832,7 @@ $(document).ready(function() { if ($("#create_table_div").length > 0) { $("#create_table_div").html(data); } + PMA_verifyTypeOfAllColumns(); }) //end $.post() }) // end create table form (add fields) @@ -2041,13 +2042,13 @@ $(document).ready(function() { // // needs live() to work also in the Create Table dialog $("select[class='column_type']").live('change', function() { - showNoticeForEnum($(this)); + PMA_showNoticeForEnum($(this)); }); }); function PMA_verifyTypeOfAllColumns() { $("select[class='column_type']").each(function() { - showNoticeForEnum($(this)); + PMA_showNoticeForEnum($(this)); }); } -- 2.11.4.GIT