From 4cfd1cf149951ee2cb4a1a9538ffe6d6d3c3a310 Mon Sep 17 00:00:00 2001 From: Jo Michael Date: Sun, 8 Apr 2012 16:45:46 +0200 Subject: Replace removeProp("checked") with prop("checked", false), calling removeProp("checked") is irreversible in Chrome --- js/export.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'js/export.js') diff --git a/js/export.js b/js/export.js index 2982e1ef14..3c8f56a0e3 100644 --- a/js/export.js +++ b/js/export.js @@ -136,13 +136,14 @@ function toggle_sql_include_comments() * For SQL plugin, if "CREATE TABLE options" is checked/unchecked, check/uncheck each of its sub-options */ $(document).ready(function() { - $("#checkbox_sql_create_table_statements").change(function() { - if($("#checkbox_sql_create_table_statements:checked").length == 0) { - $("#checkbox_sql_if_not_exists").removeProp('checked'); - $("#checkbox_sql_auto_increment").removeProp('checked'); - } else { - $("#checkbox_sql_if_not_exists").prop('checked', true); - $("#checkbox_sql_auto_increment").prop('checked', true); + var $create = $("#checkbox_sql_create_table_statements"); + var $create_options = $("#ul_create_table_statements input"); + $create.change(function() { + $create_options.prop('checked', $(this).prop("checked")); + }); + $create_options.change(function() { + if ($create_options.is(":checked")) { + $create.prop('checked', true); } }); }); -- cgit v1.2.3