From 7da83511ec3443bd198e5a29d3c149a1866d495f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 13 Feb 2017 15:24:25 +0100 Subject: [PATCH 1/2] Do not use deprecated jQuery functionality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- js/normalization.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/normalization.js b/js/normalization.js index 4d0644290c..341ca744ce 100644 --- a/js/normalization.js +++ b/js/normalization.js @@ -393,7 +393,7 @@ function processDependencies(primary_key, isTransitive) tablesTds[tblname].push(primary_key); } var form_id = $(this).attr('id'); - $('#' + form_id + ' input[type=checkbox]:not(:checked)').removeAttr('checked'); + $('#' + form_id + ' input[type=checkbox]:not(:checked)').prop('checked', false); dependsOn = ''; $('#' + form_id + ' input[type=checkbox]:checked').each(function(){ dependsOn += $(this).val() + ', '; @@ -637,7 +637,7 @@ AJAX.registerOnload('normalization.js', function() { '( ' + escapeHtml(primary_key.toString()) + ', )' + ''; $("#newCols").html(confirmStr); - $('.tblFooters').html('' + + $('.tblFooters').html('' + ''); } }); From 58472a97d2b593681cdef7c767f4054790dfd5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 13 Feb 2017 15:30:51 +0100 Subject: [PATCH 2/2] Fixed javascript error on 3NF normalization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #12927 Signed-off-by: Michal Čihař --- ChangeLog | 1 + js/normalization.js | 6 +++--- libraries/normalization.lib.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48edcb14a3..1ee6aa6a52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -70,6 +70,7 @@ phpMyAdmin - ChangeLog - issue #12957 Fixed manipulation with GIS data having zero coordinates - issue #12804 Fixed various designer javascript errors - issue #12934 Fixed possible javascript error on server status page +- issue #12927 Fixed javascript error on 3NF normalization 4.6.6 (2017-01-23) - issue #12759 Fix Notice regarding 'Undefined index: old_usergroup' diff --git a/js/normalization.js b/js/normalization.js index 341ca744ce..f9484c6dbc 100644 --- a/js/normalization.js +++ b/js/normalization.js @@ -303,7 +303,7 @@ function goTo2NFStep2(pd, primary_key) "pd": JSON.stringify(pd), "getNewTables2NF":1}; $.ajax({ - type: "GET", + type: "POST", url: "normalization.php", data: datastring, async:false, @@ -352,12 +352,12 @@ function goTo3NFStep2(pd, tablesTds) "pd": JSON.stringify(pd), "getNewTables3NF":1}; $.ajax({ - type: "GET", + type: "POST", url: "normalization.php", data: datastring, async:false, success: function(data) { - data_parsed = JSON.parse(data.message); + data_parsed = data; if (data.success === true) { extra += data_parsed.html; } else { diff --git a/libraries/normalization.lib.php b/libraries/normalization.lib.php index bdcab1ddc5..39572ec9fd 100644 --- a/libraries/normalization.lib.php +++ b/libraries/normalization.lib.php @@ -558,7 +558,7 @@ function PMA_getHtmlForNewTables3NF($dependencies, $tables, $db) } } } - return array('html' => $html, 'newTables' => $newTables); + return array('html' => $html, 'newTables' => $newTables, 'success' => true); } /**