From b95ac13613921443f24895d797bab4207798cfbb Mon Sep 17 00:00:00 2001
From: Florent Torregrosa <florent.torregrosa@gmail.com>
Date: Wed, 24 Dec 2014 09:58:48 +0100
Subject: [PATCH] Use Dnd on IE9 and below.

---
 modules/library/dnd/js/dnd-library.js |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/modules/library/dnd/js/dnd-library.js b/modules/library/dnd/js/dnd-library.js
index 4257b02..eaeec91 100644
--- a/modules/library/dnd/js/dnd-library.js
+++ b/modules/library/dnd/js/dnd-library.js
@@ -8,6 +8,28 @@
  */
 
 (function($, Drupal) {
+
+  // Compatibility for old IE.
+  if (!Array.prototype.filter) {
+    Array.prototype.filter = function(fun /*, thisp*/) {
+      var len = this.length;
+      if (typeof fun != "function")
+        throw new TypeError();
+
+      var res = new Array();
+      var thisp = arguments[1];
+      for (var i = 0; i < len; i++) {
+        if (i in this) {
+          var val = this[i]; // in case fun mutates this
+          if (fun.call(thisp, val, i, this))
+            res.push(val);
+        }
+      }
+
+      return res;
+    };
+  }
+
 /**
  * Initialize our namespace.
  */
-- 
1.7.9.5

