From 4fdabd32b68edc1ece18e7c30c28f74a1955f75e Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Wed, 13 Sep 2017 17:56:49 +0200 Subject: [PATCH] Bugfix per IE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Risoluzione di alcuni bug presenti su IE e versioni piĆ¹ vecchie di alcuni browser. --- lib/functions.js | 32 ++++++++++++++++++-------------- package.json | 2 +- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/lib/functions.js b/lib/functions.js index 8374c4868..6c58b6e11 100644 --- a/lib/functions.js +++ b/lib/functions.js @@ -121,10 +121,14 @@ $(document).ready(function () { $(".bulk-action").click(function () { var table = $(document).find("#" + $(this).parent().parent().parent().parent().data("target")); - $(this).attr("data-id_records", table.data('selected')); - if (table.data('selected')) { + $(this).attr("data-id_records", table.data('selected')); + $(this).data("id_records", table.data('selected')); + message(this); + + $(this).attr("data-id_records", ""); + $(this).data("id_records", ""); } else { swal(globals.translations.waiting, globals.translations.waiting_msg, "error"); } @@ -1219,32 +1223,32 @@ function redirect(href, data, method, blank) { method = method ? method : "get"; blank = blank ? blank : false; - var text = (method == "post") ? '
' : []; + if (method == "post") { + var text = ''; - for (var name in data) { - if (method == "post") { + for (var name in data) { text += ''; - } else { - text.push(name + '=' + data[name]); } - } - if (method == "post") { text += '
'; - } - if (method == "post") { var form = $(text); $('body').append(form); form.submit(); } else { - var link = href + (href.indexOf('?') !== -1 ? '&' : '?') + text.join('&') + window.location.hash; + var values = []; + + for (var name in data) { + values.push(name + '=' + data[name]); + } + + var link = href + (href.indexOf('?') !== -1 ? '&' : '?') + values.join('&') + window.location.hash; if (blank) { - window.open(link); - } else { location.href = link; + } else { + window.open(link); } } } diff --git a/package.json b/package.json index 8c263252e..5beab1f54 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "bootstrap-daterangepicker": "^2.1.25", "ckeditor": "^4.6.2", "components-jqueryui": "^1.12.1", + "core-js": "^2.5.1", "datatables.net-bs": "^1.10.15", "datatables.net-buttons-bs": "^1.3.1", "datatables.net-scroller-bs": "^1.4.2", @@ -50,7 +51,6 @@ "jquery-ui-touch-punch": "^0.2.3", "moment": "^2.18.1", "parsleyjs": "^2.7.2", - "promise-polyfill": "^6.0.2", "select2": "^4.0.3", "select2-bootstrap-theme": "^0.1.0-beta.10", "signature_pad": "^2.1.1",