Bugfix per IE

Risoluzione di alcuni bug presenti su IE e versioni più vecchie di alcuni browser.
This commit is contained in:
Thomas Zilio 2017-09-13 17:56:49 +02:00
parent d115caf229
commit 4fdabd32b6
2 changed files with 19 additions and 15 deletions

View File

@ -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") ? '<form action="' + href + window.location.hash + '" method="post"' + (blank ? ' target="_blank"' : '') + '>' : [];
if (method == "post") {
var text = '<form action="' + href + window.location.hash + '" method="post"' + (blank ? ' target="_blank"' : '') + '>';
for (var name in data) {
if (method == "post") {
for (var name in data) {
text += '<input type="hidden" name="' + name + '" value="' + data[name] + '"/>';
} else {
text.push(name + '=' + data[name]);
}
}
if (method == "post") {
text += '</form>';
}
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);
}
}
}

View File

@ -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",