From 1bc0b6c51de8f5b497d540a4ffccc0740fbf43a7 Mon Sep 17 00:00:00 2001
From: diosmosis <benaka@piwik.pro>
Date: Mon, 11 May 2015 21:23:05 -0700
Subject: [PATCH] Getting Piwik to work on IE8 again by fixing a couple issues
 in various JS files. Specifically, avoid using catch/delete
 methods/properties directly, instead access via strings.

---
 plugins/CoreHome/angularjs/ajax-form/ajax-form.controller.js    | 2 +-
 plugins/CoreHome/angularjs/common/services/piwik-api.js         | 2 +-
 .../angularjs/sites-manager/sites-manager-site.controller.js    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/CoreHome/angularjs/ajax-form/ajax-form.controller.js b/plugins/CoreHome/angularjs/ajax-form/ajax-form.controller.js
index 4f6bd77d69..8a1f3b529c 100644
--- a/plugins/CoreHome/angularjs/ajax-form/ajax-form.controller.js
+++ b/plugins/CoreHome/angularjs/ajax-form/ajax-form.controller.js
@@ -75,7 +75,7 @@
                     });
                     notification.scrollToNotification();
                 }
-            }).catch(function (errorMessage) {
+            })['catch'](function (errorMessage) {
                 vm.errorPostResponse = errorMessage;
             })['finally'](function () {
                 vm.isSubmitting = false;
diff --git a/plugins/CoreHome/angularjs/common/services/piwik-api.js b/plugins/CoreHome/angularjs/common/services/piwik-api.js
index 80ac84312d..8a6b8471a6 100644
--- a/plugins/CoreHome/angularjs/common/services/piwik-api.js
+++ b/plugins/CoreHome/angularjs/common/services/piwik-api.js
@@ -262,7 +262,7 @@
                     }
 
                     deferred.resolve(response);
-                }).catch(function () {
+                })['catch'](function () {
                     deferred.reject.apply(deferred, arguments);
                 });
 
diff --git a/plugins/SitesManager/angularjs/sites-manager/sites-manager-site.controller.js b/plugins/SitesManager/angularjs/sites-manager/sites-manager-site.controller.js
index def55a8b39..85ad64716f 100644
--- a/plugins/SitesManager/angularjs/sites-manager/sites-manager-site.controller.js
+++ b/plugins/SitesManager/angularjs/sites-manager/sites-manager-site.controller.js
@@ -24,7 +24,7 @@
             $scope.editSite = editSite;
             $scope.saveSite = saveSite;
             $scope.openDeleteDialog = openDeleteDialog;
-            $scope.site.delete = deleteSite;
+            $scope.site['delete'] = deleteSite;
         };
 
         var initModel = function() {
-- 
GitLab