import v1.1.0_beta1 | 2009-08-21
This commit is contained in:
Binary file not shown.
1057
webdir/javascript/yui/uploader/uploader-debug.js
vendored
Normal file
1057
webdir/javascript/yui/uploader/uploader-debug.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
|
||||
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
|
||||
Code licensed under the BSD License:
|
||||
http://developer.yahoo.net/yui/license.txt
|
||||
version: 2.6.0
|
||||
version: 2.7.0
|
||||
*/
|
||||
/*extern ActiveXObject, __flash_unloadHandler, __flash_savedUnloadHandler */
|
||||
/*!
|
||||
@ -10,24 +10,28 @@ version: 2.6.0
|
||||
*
|
||||
* SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* @namespace YAHOO
|
||||
*/
|
||||
var deconcept = deconcept || {};
|
||||
|
||||
if(typeof deconcept.util == "undefined" || !deconcept.util)
|
||||
YAHOO.namespace("deconcept");
|
||||
|
||||
YAHOO.deconcept = YAHOO.deconcept || {};
|
||||
|
||||
if(typeof YAHOO.deconcept.util == "undefined" || !YAHOO.deconcept.util)
|
||||
{
|
||||
deconcept.util = {};
|
||||
YAHOO.deconcept.util = {};
|
||||
}
|
||||
|
||||
if(typeof deconcept.SWFObjectUtil == "undefined" || !deconcept.SWFObjectUtil)
|
||||
if(typeof YAHOO.deconcept.SWFObjectUtil == "undefined" || !YAHOO.deconcept.SWFObjectUtil)
|
||||
{
|
||||
deconcept.SWFObjectUtil = {};
|
||||
YAHOO.deconcept.SWFObjectUtil = {};
|
||||
}
|
||||
|
||||
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey)
|
||||
YAHOO.deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey)
|
||||
{
|
||||
if(!document.getElementById) { return; }
|
||||
this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
|
||||
this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
|
||||
this.skipDetect = YAHOO.deconcept.util.getRequestParameter(this.DETECT_KEY);
|
||||
this.params = {};
|
||||
this.variables = {};
|
||||
this.attributes = [];
|
||||
@ -35,12 +39,12 @@ deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, re
|
||||
if(id) { this.setAttribute('id', id); }
|
||||
if(w) { this.setAttribute('width', w); }
|
||||
if(h) { this.setAttribute('height', h); }
|
||||
if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
|
||||
this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
|
||||
if(ver) { this.setAttribute('version', new YAHOO.deconcept.PlayerVersion(ver.toString().split("."))); }
|
||||
this.installedVer = YAHOO.deconcept.SWFObjectUtil.getPlayerVersion();
|
||||
if (!window.opera && document.all && this.installedVer.major > 7)
|
||||
{
|
||||
// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
|
||||
deconcept.SWFObject.doPrepUnload = true;
|
||||
YAHOO.deconcept.SWFObject.doPrepUnload = true;
|
||||
}
|
||||
if(c)
|
||||
{
|
||||
@ -59,7 +63,7 @@ deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, re
|
||||
}
|
||||
};
|
||||
|
||||
deconcept.SWFObject.prototype =
|
||||
YAHOO.deconcept.SWFObject.prototype =
|
||||
{
|
||||
useExpressInstall: function(path)
|
||||
{
|
||||
@ -148,7 +152,7 @@ deconcept.SWFObject.prototype =
|
||||
{
|
||||
if(this.getAttribute('useExpressInstall')) {
|
||||
// check to see if we need to do an express install
|
||||
var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
|
||||
var expressInstallReqVer = new YAHOO.deconcept.PlayerVersion([6,0,65]);
|
||||
if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
|
||||
this.setAttribute('doExpressInstall', true);
|
||||
this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
|
||||
@ -174,16 +178,16 @@ deconcept.SWFObject.prototype =
|
||||
};
|
||||
|
||||
/* ---- detection functions ---- */
|
||||
deconcept.SWFObjectUtil.getPlayerVersion = function()
|
||||
YAHOO.deconcept.SWFObjectUtil.getPlayerVersion = function()
|
||||
{
|
||||
var axo = null;
|
||||
var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
|
||||
var PlayerVersion = new YAHOO.deconcept.PlayerVersion([0,0,0]);
|
||||
if(navigator.plugins && navigator.mimeTypes.length)
|
||||
{
|
||||
var x = navigator.plugins["Shockwave Flash"];
|
||||
if(x && x.description)
|
||||
{
|
||||
PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
|
||||
PlayerVersion = new YAHOO.deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
|
||||
}
|
||||
}
|
||||
else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0)
|
||||
@ -196,7 +200,7 @@ deconcept.SWFObjectUtil.getPlayerVersion = function()
|
||||
counter++;
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
|
||||
// document.write("player v: "+ counter);
|
||||
PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
|
||||
PlayerVersion = new YAHOO.deconcept.PlayerVersion([counter,0,0]);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
@ -217,7 +221,7 @@ deconcept.SWFObjectUtil.getPlayerVersion = function()
|
||||
try
|
||||
{
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
|
||||
PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
|
||||
PlayerVersion = new YAHOO.deconcept.PlayerVersion([6,0,21]);
|
||||
axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
|
||||
}
|
||||
catch(e)
|
||||
@ -236,20 +240,20 @@ deconcept.SWFObjectUtil.getPlayerVersion = function()
|
||||
|
||||
if(axo !== null)
|
||||
{
|
||||
PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
|
||||
PlayerVersion = new YAHOO.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
|
||||
}
|
||||
}
|
||||
return PlayerVersion;
|
||||
};
|
||||
|
||||
deconcept.PlayerVersion = function(arrVersion)
|
||||
YAHOO.deconcept.PlayerVersion = function(arrVersion)
|
||||
{
|
||||
this.major = arrVersion[0] !== null ? parseInt(arrVersion[0], 0) : 0;
|
||||
this.minor = arrVersion[1] !== null ? parseInt(arrVersion[1], 0) : 0;
|
||||
this.rev = arrVersion[2] !== null ? parseInt(arrVersion[2], 0) : 0;
|
||||
};
|
||||
|
||||
deconcept.PlayerVersion.prototype.versionIsValid = function(fv)
|
||||
YAHOO.deconcept.PlayerVersion.prototype.versionIsValid = function(fv)
|
||||
{
|
||||
if(this.major < fv.major)
|
||||
{
|
||||
@ -275,7 +279,7 @@ deconcept.PlayerVersion.prototype.versionIsValid = function(fv)
|
||||
};
|
||||
|
||||
/* ---- get value of query string param ---- */
|
||||
deconcept.util =
|
||||
YAHOO.deconcept.util =
|
||||
{
|
||||
getRequestParameter: function(param)
|
||||
{
|
||||
@ -297,7 +301,7 @@ deconcept.util =
|
||||
};
|
||||
|
||||
/* fix for video streaming bug */
|
||||
deconcept.SWFObjectUtil.cleanupSWFs = function()
|
||||
YAHOO.deconcept.SWFObjectUtil.cleanupSWFs = function()
|
||||
{
|
||||
var objects = document.getElementsByTagName("OBJECT");
|
||||
for(var i = objects.length - 1; i >= 0; i--)
|
||||
@ -314,18 +318,18 @@ deconcept.SWFObjectUtil.cleanupSWFs = function()
|
||||
};
|
||||
|
||||
// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
|
||||
if(deconcept.SWFObject.doPrepUnload)
|
||||
if(YAHOO.deconcept.SWFObject.doPrepUnload)
|
||||
{
|
||||
if(!deconcept.unloadSet)
|
||||
if(!YAHOO.deconcept.unloadSet)
|
||||
{
|
||||
deconcept.SWFObjectUtil.prepUnload = function()
|
||||
YAHOO.deconcept.SWFObjectUtil.prepUnload = function()
|
||||
{
|
||||
__flash_unloadHandler = function(){};
|
||||
__flash_savedUnloadHandler = function(){};
|
||||
window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
|
||||
window.attachEvent("onunload", YAHOO.deconcept.SWFObjectUtil.cleanupSWFs);
|
||||
};
|
||||
window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
|
||||
deconcept.unloadSet = true;
|
||||
window.attachEvent("onbeforeunload", YAHOO.deconcept.SWFObjectUtil.prepUnload);
|
||||
YAHOO.deconcept.unloadSet = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -334,11 +338,6 @@ if(!document.getElementById && document.all)
|
||||
{
|
||||
document.getElementById = function(id) { return document.all[id]; };
|
||||
}
|
||||
|
||||
/* add some aliases for ease of use/backwards compatibility */
|
||||
var getQueryParamValue = deconcept.util.getRequestParameter;
|
||||
var FlashObject = deconcept.SWFObject; // for legacy support
|
||||
var SWFObject = deconcept.SWFObject;
|
||||
/**
|
||||
* Wraps Flash embedding functionality and allows communication with SWF through
|
||||
* attributes.
|
||||
@ -349,7 +348,7 @@ var SWFObject = deconcept.SWFObject;
|
||||
*/
|
||||
YAHOO.widget.FlashAdapter = function(swfURL, containerID, attributes, buttonSkin)
|
||||
{
|
||||
// set up the initial events and attributes stuff
|
||||
|
||||
this._queue = this._queue || [];
|
||||
this._events = this._events || {};
|
||||
this._configs = this._configs || {};
|
||||
@ -384,6 +383,8 @@ YAHOO.widget.FlashAdapter = function(swfURL, containerID, attributes, buttonSkin
|
||||
catch(e){}
|
||||
};
|
||||
|
||||
YAHOO.widget.FlashAdapter.owners = YAHOO.widget.FlashAdapter.owners || {};
|
||||
|
||||
YAHOO.extend(YAHOO.widget.FlashAdapter, YAHOO.util.AttributeProvider,
|
||||
{
|
||||
/**
|
||||
@ -485,7 +486,7 @@ YAHOO.extend(YAHOO.widget.FlashAdapter, YAHOO.util.AttributeProvider,
|
||||
_embedSWF: function(swfURL, containerID, swfID, version, backgroundColor, expressInstall, wmode, buttonSkin)
|
||||
{
|
||||
//standard SWFObject embed
|
||||
var swfObj = new deconcept.SWFObject(swfURL, swfID, "100%", "100%", version, backgroundColor);
|
||||
var swfObj = new YAHOO.deconcept.SWFObject(swfURL, swfID, "100%", "100%", version, backgroundColor);
|
||||
|
||||
if(expressInstall)
|
||||
{
|
||||
@ -518,9 +519,7 @@ YAHOO.extend(YAHOO.widget.FlashAdapter, YAHOO.util.AttributeProvider,
|
||||
if(result)
|
||||
{
|
||||
this._swf = YAHOO.util.Dom.get(swfID);
|
||||
//if successful, let's add an owner property to the SWF reference
|
||||
//this will allow the event handler to communicate with a YAHOO.widget.FlashAdapter
|
||||
this._swf.owner = this;
|
||||
YAHOO.widget.FlashAdapter.owners[swfID] = this;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -547,6 +546,7 @@ YAHOO.extend(YAHOO.widget.FlashAdapter, YAHOO.util.AttributeProvider,
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//be sure to return after your case or the event will automatically fire!
|
||||
this.fireEvent(type, event);
|
||||
},
|
||||
@ -675,6 +675,7 @@ YAHOO.extend(YAHOO.widget.FlashAdapter, YAHOO.util.AttributeProvider,
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Receives event messages from SWF and passes them to the correct instance
|
||||
* of FlashAdapter.
|
||||
@ -685,15 +686,15 @@ YAHOO.extend(YAHOO.widget.FlashAdapter, YAHOO.util.AttributeProvider,
|
||||
*/
|
||||
YAHOO.widget.FlashAdapter.eventHandler = function(elementID, event)
|
||||
{
|
||||
var loadedSWF = YAHOO.util.Dom.get(elementID);
|
||||
if(!loadedSWF.owner)
|
||||
|
||||
if(!YAHOO.widget.FlashAdapter.owners[elementID])
|
||||
{
|
||||
//fix for ie: if owner doesn't exist yet, try again in a moment
|
||||
setTimeout(function() { YAHOO.widget.FlashAdapter.eventHandler( elementID, event ); }, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
loadedSWF.owner._eventHandler(event);
|
||||
YAHOO.widget.FlashAdapter.owners[elementID]._eventHandler(event);
|
||||
}
|
||||
};
|
||||
|
||||
@ -780,19 +781,22 @@ YAHOO.widget.FlashAdapter.removeProxyFunction = function(funcName)
|
||||
* fourth section is "disabled".
|
||||
* If the parameter is not supplied, the uploader is rendered transparent,
|
||||
* and it's the developer's responsibility to create a visible UI below it.
|
||||
* @param forceTransparent {Boolean} This parameter, if true, forces the Flash
|
||||
* UI to be rendered with wmode set to "transparent". This behavior is useful
|
||||
* in conjunction with non-rectangular button skins with PNG transparency.
|
||||
* The parameter is false by default, and ignored if no buttonSkin is defined.
|
||||
*/
|
||||
YAHOO.widget.Uploader = function(containerId, buttonSkin)
|
||||
YAHOO.widget.Uploader = function(containerId, buttonSkin, forceTransparent)
|
||||
{
|
||||
var newWMode = "window";
|
||||
|
||||
if (!(buttonSkin)) {
|
||||
if (!(buttonSkin) || (buttonSkin && forceTransparent)) {
|
||||
newWMode = "transparent";
|
||||
}
|
||||
|
||||
|
||||
YAHOO.widget.Uploader.superclass.constructor.call(this, YAHOO.widget.Uploader.SWFURL, containerId, {wmode:newWMode}, buttonSkin);
|
||||
|
||||
this._swf.tabIndex="1";
|
||||
|
||||
/**
|
||||
* Fires when the mouse is pressed over the Uploader.
|
||||
* Only fires when the Uploader UI is enabled and
|
||||
@ -842,7 +846,7 @@ YAHOO.widget.Uploader = function(containerId, buttonSkin)
|
||||
*
|
||||
* @event fileSelect
|
||||
* @param event.type {String} The event type
|
||||
* @param event.fileList {Array} An array of objects with file information
|
||||
* @param event.fileList {Object} A dictionary of objects with file information
|
||||
* @param event.fileList[].size {Number} File size in bytes for a specific file in fileList
|
||||
* @param event.fileList[].cDate {Date} Creation date for a specific file in fileList
|
||||
* @param event.fileList[].mDate {Date} Modification date for a specific file in fileList
|
||||
@ -931,14 +935,6 @@ YAHOO.extend(YAHOO.widget.Uploader, YAHOO.widget.FlashAdapter,
|
||||
* @param method {String} Either "GET" or "POST", specifying how the variables accompanying the file upload POST request should be submitted. "GET" by default.
|
||||
* @param vars {Object} The object containing variables to be sent in the same request as the file upload.
|
||||
* @param fieldName {String} The name of the variable in the POST request containing the file data. "Filedata" by default.
|
||||
* @param headers {Object} An object containing variables that should be set as headers in the POST request. The following header names
|
||||
* cannot be used:
|
||||
* <code>
|
||||
* Accept-Charset, Accept-Encoding, Accept-Ranges, Age, Allow, Allowed, Authorization, Charge-To, Connect, Connection,
|
||||
* Content-Length, Content-Location, Content-Range, Cookie, Date, Delete, ETag, Expect, Get, Head, Host, Keep-Alive,
|
||||
* Last-Modified, Location, Max-Forwards, Options, Post, Proxy-Authenticate, Proxy-Authorization, Proxy-Connection,
|
||||
* Public, Put, Range, Referer, Request-Range, Retry-After, Server, TE, Trace, Trailer, Transfer-Encoding, Upgrade,
|
||||
* URI, User-Agent, Vary, Via, Warning, WWW-Authenticate, x-flash-version.
|
||||
* </code>
|
||||
*/
|
||||
upload: function(fileID, uploadScriptPath, method, vars, fieldName)
|
||||
@ -953,14 +949,6 @@ YAHOO.extend(YAHOO.widget.Uploader, YAHOO.widget.FlashAdapter,
|
||||
* @param method {String} Either "GET" or "POST", specifying how the variables accompanying the file upload POST request should be submitted. "GET" by default.
|
||||
* @param vars {Object} The object containing variables to be sent in the same request as the file upload.
|
||||
* @param fieldName {String} The name of the variable in the POST request containing the file data. "Filedata" by default.
|
||||
* @param headers {Object} An object containing variables that should be set as headers in the POST request. The following header names
|
||||
* cannot be used:
|
||||
* <code>
|
||||
* Accept-Charset, Accept-Encoding, Accept-Ranges, Age, Allow, Allowed, Authorization, Charge-To, Connect, Connection,
|
||||
* Content-Length, Content-Location, Content-Range, Cookie, Date, Delete, ETag, Expect, Get, Head, Host, Keep-Alive,
|
||||
* Last-Modified, Location, Max-Forwards, Options, Post, Proxy-Authenticate, Proxy-Authorization, Proxy-Connection,
|
||||
* Public, Put, Range, Referer, Request-Range, Retry-After, Server, TE, Trace, Trailer, Transfer-Encoding, Upgrade,
|
||||
* URI, User-Agent, Vary, Via, Warning, WWW-Authenticate, x-flash-version.
|
||||
* </code>
|
||||
*/
|
||||
uploadAll: function(uploadScriptPath, method, vars, fieldName)
|
||||
@ -1005,7 +993,7 @@ YAHOO.extend(YAHOO.widget.Uploader, YAHOO.widget.FlashAdapter,
|
||||
*/
|
||||
setAllowLogging: function (allowLogging)
|
||||
{
|
||||
this._swf.setAllowLogging(allowLogging);
|
||||
this._swf.setAllowLogging(allowLogging);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1066,4 +1054,4 @@ YAHOO.extend(YAHOO.widget.Uploader, YAHOO.widget.FlashAdapter,
|
||||
this._swf.disable();
|
||||
}
|
||||
});
|
||||
YAHOO.register("uploader", YAHOO.widget.Uploader, {version: "2.6.0", build: "1321"});
|
||||
YAHOO.register("uploader", YAHOO.widget.Uploader, {version: "2.7.0", build: "1799"});
|
||||
|
15
webdir/javascript/yui/uploader/uploader-min.js
vendored
Normal file
15
webdir/javascript/yui/uploader/uploader-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1054
webdir/javascript/yui/uploader/uploader.js
vendored
Normal file
1054
webdir/javascript/yui/uploader/uploader.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user