From bccf73d6eda38c2db257611c632e96d11d0d78aa Mon Sep 17 00:00:00 2001 From: Kartik Kathuria Date: Sat, 2 Mar 2019 00:22:20 +0530 Subject: [PATCH 1/4] charset as windows-1252 when format is MS Excel Signed-off-by: Kartik Kathuria --- js/export.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/js/export.js b/js/export.js index f47d829ede..2045e3a0ef 100644 --- a/js/export.js +++ b/js/export.js @@ -307,6 +307,17 @@ AJAX.registerOnload('export.js', function () { $('#checkbox_sql_auto_increment').prop('disabled', false).parent().fadeTo('fast', 1); } }); + + // When MS Excel is selected as the Format automatically Switch to Character Set as windows-1252 + $('#plugins').change(function () { + var selected_plugin_name = $('#plugins').find('option:selected').val(); + if(selected_plugin_name == "excel"){ + $('#select_charset').val('windows-1252'); + } + else{ + $('#select_charset').val('utf-8'); + } + }); // For separate-file exports only ZIP compression is allowed $('input[type="checkbox"][name="as_separate_files"]').on('change', function () { From e22a943ef5c090ec2e34fe4752cedee9aa6b860b Mon Sep 17 00:00:00 2001 From: Kartik Kathuria Date: Sat, 2 Mar 2019 00:42:02 +0530 Subject: [PATCH 2/4] Removed Trailing Whitespace Signed-off-by: Kartik Kathuria --- js/export.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/export.js b/js/export.js index 2045e3a0ef..b97b054421 100644 --- a/js/export.js +++ b/js/export.js @@ -309,7 +309,7 @@ AJAX.registerOnload('export.js', function () { }); // When MS Excel is selected as the Format automatically Switch to Character Set as windows-1252 - $('#plugins').change(function () { + $('#plugins').change(function () { var selected_plugin_name = $('#plugins').find('option:selected').val(); if(selected_plugin_name == "excel"){ $('#select_charset').val('windows-1252'); @@ -318,7 +318,7 @@ AJAX.registerOnload('export.js', function () { $('#select_charset').val('utf-8'); } }); - + // For separate-file exports only ZIP compression is allowed $('input[type="checkbox"][name="as_separate_files"]').on('change', function () { if ($(this).is(':checked')) { From 382da0378535bed509859e8ad257e85ac50d4248 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Fri, 1 Mar 2019 20:16:16 +0100 Subject: [PATCH 3/4] Fix trailing spaces and code style Fix trailing spaces and code style Signed-off-by: William Desportes --- js/export.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/js/export.js b/js/export.js index b97b054421..087477539a 100644 --- a/js/export.js +++ b/js/export.js @@ -307,18 +307,17 @@ AJAX.registerOnload('export.js', function () { $('#checkbox_sql_auto_increment').prop('disabled', false).parent().fadeTo('fast', 1); } }); - + // When MS Excel is selected as the Format automatically Switch to Character Set as windows-1252 $('#plugins').change(function () { var selected_plugin_name = $('#plugins').find('option:selected').val(); - if(selected_plugin_name == "excel"){ + if (selected_plugin_name == "excel") { $('#select_charset').val('windows-1252'); - } - else{ + } else { $('#select_charset').val('utf-8'); } }); - + // For separate-file exports only ZIP compression is allowed $('input[type="checkbox"][name="as_separate_files"]').on('change', function () { if ($(this).is(':checked')) { From 4b855c9a47e99bc1a070ff9183626da5a15b913c Mon Sep 17 00:00:00 2001 From: William Desportes Date: Fri, 1 Mar 2019 20:21:11 +0100 Subject: [PATCH 4/4] Fix code style Fix code style Signed-off-by: William Desportes --- js/export.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/export.js b/js/export.js index 087477539a..c678b03224 100644 --- a/js/export.js +++ b/js/export.js @@ -311,7 +311,7 @@ AJAX.registerOnload('export.js', function () { // When MS Excel is selected as the Format automatically Switch to Character Set as windows-1252 $('#plugins').change(function () { var selected_plugin_name = $('#plugins').find('option:selected').val(); - if (selected_plugin_name == "excel") { + if (selected_plugin_name === 'excel') { $('#select_charset').val('windows-1252'); } else { $('#select_charset').val('utf-8');