diff -r 000000000000 -r 40c8f766c9b8 src/cm/media/js/lib/yui/yui_3.0.0b1/build/io/io-upload-iframe-debug.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/media/js/lib/yui/yui_3.0.0b1/build/io/io-upload-iframe-debug.js Mon Nov 23 15:14:29 2009 +0100 @@ -0,0 +1,192 @@ +/* +Copyright (c) 2009, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 3.0.0b1 +build: 1163 +*/ +YUI.add('io-upload-iframe', function(Y) { + + /** + * Extends the IO base class to enable file uploads, with HTML forms, + * using an iframe as the transport medium. + * @module io + * @submodule io-upload-iframe + */ + + var w = Y.config.win; + /** + * @description Parses the POST data object and creates hidden form elements + * for each key-value, and appends them to the HTML form object. + * @method appendData + * @private + * @static + * @param {object} d The key-value hash map. + * @return {array} e Array of created fields. + */ + + function _addData(f, d) { + var e = [], + p, i; + + for (p in d) { + if (d.hasOwnProperty(d, p)) { + e[i] = document.createElement('input'); + e[i].type = 'hidden'; + e[i].name = p; + e[i].value = d[p]. + f.appendChild(e[i]); + } + } + + return e; + } + + function _removeData(f, e) { + var i, l; + if (e && e.length > 0) { + for(i = 0, l = e.length; i < l; i++){ + f.removeChild(e[i]); + } + } + } + + function _create(o, c) { + var i = Y.Node.create('