Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / examples / image-organizer / SWFUpload / plugins / swfupload.cookies.js
diff --git a/examples/image-organizer/SWFUpload/plugins/swfupload.cookies.js b/examples/image-organizer/SWFUpload/plugins/swfupload.cookies.js
deleted file mode 100644 (file)
index 1efc21f..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-/*\r
-       Cookie Plug-in\r
-       \r
-       This plug in automatically gets all the cookies for this site and adds them to the post_params.\r
-       Cookies are loaded only on initialization.  The refreshCookies function can be called to update the post_params.\r
-       The cookies will override any other post params with the same name.\r
-*/\r
-\r
-var SWFUpload;\r
-if (typeof(SWFUpload) === "function") {\r
-       SWFUpload.prototype.initSettings = function (oldInitSettings) {\r
-               return function () {\r
-                       if (typeof(oldInitSettings) === "function") {\r
-                               oldInitSettings.call(this);\r
-                       }\r
-                       \r
-                       this.refreshCookies(false);     // The false parameter must be sent since SWFUpload has not initialzed at this point\r
-               };\r
-       }(SWFUpload.prototype.initSettings);\r
-       \r
-       // refreshes the post_params and updates SWFUpload.  The sendToFlash parameters is optional and defaults to True\r
-       SWFUpload.prototype.refreshCookies = function (sendToFlash) {\r
-               if (sendToFlash === undefined) {\r
-                       sendToFlash = true;\r
-               }\r
-               sendToFlash = !!sendToFlash;\r
-               \r
-               // Get the post_params object\r
-               var postParams = this.settings.post_params;\r
-               \r
-               // Get the cookies\r
-               var i, cookieArray = document.cookie.split(';'), caLength = cookieArray.length, c, eqIndex, name, value;\r
-               for (i = 0; i < caLength; i++) {\r
-                       c = cookieArray[i];\r
-                       \r
-                       // Left Trim spaces\r
-                       while (c.charAt(0) === " ") {\r
-                               c = c.substring(1, c.length);\r
-                       }\r
-                       eqIndex = c.indexOf("=");\r
-                       if (eqIndex > 0) {\r
-                               name = c.substring(0, eqIndex);\r
-                               value = c.substring(eqIndex + 1);\r
-                               postParams[name] = value;\r
-                       }\r
-               }\r
-               \r
-               if (sendToFlash) {\r
-                       this.setPostParams(postParams);\r
-               }\r
-       };\r
-\r
-}\r