diff options
Diffstat (limited to 'js/tbl_structure.js')
-rw-r--r-- | js/tbl_structure.js | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/js/tbl_structure.js b/js/tbl_structure.js index 3436c66a63..bf5f626036 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -82,6 +82,12 @@ AJAX.registerTeardown('tbl_structure.js', function () { AJAX.registerOnload('tbl_structure.js', function () { + // Re-initialize variables. + primary_indexes = []; + unique_indexes = []; + indexes = []; + fulltext_indexes = []; + /** *Ajax action for submitting the "Column Change" and "Add Column" form */ @@ -262,9 +268,9 @@ AJAX.registerOnload('tbl_structure.js', function () { var question = $.sprintf(PMA_messages.strDoYouReally, 'ALTER TABLE `' + escapeHtml(curr_table_name) + '` ADD PRIMARY KEY(`' + escapeHtml(curr_column_name) + '`);'); $(this).PMA_confirm(question, $(this).attr('href'), function (url) { var $msg = PMA_ajaxShowMessage(PMA_messages.strAddingPrimaryKey, false); - $.get(url - , {'is_js_confirmed' : 1, 'ajax_request' : true, 'index_change' : true} - , function (data) { + $.get(url, + {'is_js_confirmed' : 1, 'ajax_request' : true, 'index_change' : true}, + function (data) { if (data.success === true) { PMA_ajaxRemoveMessage($msg); $(this).remove(); @@ -311,9 +317,9 @@ AJAX.registerOnload('tbl_structure.js', function () { var question = $.sprintf(PMA_messages.strDoYouReally, 'ALTER TABLE `' + escapeHtml(curr_table_name) + '` ADD INDEX(`' + escapeHtml(curr_column_name) + '`);'); $(this).PMA_confirm(question, $(this).attr('href'), function (url) { var $msg = PMA_ajaxShowMessage(PMA_messages.strAddingIndex, false); - $.get(url - , {'is_js_confirmed' : 1, 'ajax_request' : true, 'index_change' : true} - , function (data) { + $.get(url, + {'is_js_confirmed' : 1, 'ajax_request' : true, 'index_change' : true}, + function (data) { if (data.success === true) { PMA_ajaxRemoveMessage($msg); if ($('#result_query').length) { @@ -355,9 +361,9 @@ AJAX.registerOnload('tbl_structure.js', function () { var question = $.sprintf(PMA_messages.strDoYouReally, 'ALTER TABLE `' + escapeHtml(curr_table_name) + '` ADD UNIQUE(`' + escapeHtml(curr_column_name) + '`);'); $(this).PMA_confirm(question, $(this).attr('href'), function (url) { var $msg = PMA_ajaxShowMessage(PMA_messages.strAddingUnique, false); - $.get(url - , {'is_js_confirmed' : 1, 'ajax_request' : true, 'index_change' : true} - , function (data) { + $.get(url, + {'is_js_confirmed' : 1, 'ajax_request' : true, 'index_change' : true}, + function (data) { if (data.success === true) { PMA_ajaxRemoveMessage($msg); if ($('#result_query').length) { |