From 6d4d99aa62817d855cf710f7fc5f58065f645322 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 15 Jul 2015 15:49:34 +0200 Subject: [PATCH] js: Use window.FormData instead of just FormData refs #8758 --- public/js/icinga/events.js | 4 ++-- public/js/icinga/loader.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js index 2ba666f47..54ea46725 100644 --- a/public/js/icinga/events.js +++ b/public/js/icinga/events.js @@ -272,14 +272,14 @@ url = icinga.utils.addUrlParams(url, dataObj); } else { if (encoding === 'multipart/form-data') { - data = new FormData($form[0]); + data = new window.FormData($form[0]); } else { data = $form.serializeArray(); } if (typeof autosubmit === 'undefined' || ! autosubmit) { if ($button.length && $button.attr('name') !== 'undefined') { - if (data instanceof FormData) { + if (encoding === 'multipart/form-data') { data.append($button.attr('name'), $button.attr('value')); } else { data.push({ diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index e7645f313..5677eb629 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -103,7 +103,7 @@ // This is jQuery's default content type var contentType = 'application/x-www-form-urlencoded; charset=UTF-8'; - var isFormData = data instanceof FormData; + var isFormData = data instanceof window.FormData; if (isFormData) { // Setting false is mandatory as the form's data // won't be recognized by the server otherwise