Add JS files

This commit is contained in:
2025-05-12 15:45:17 +00:00
parent 7ddd15c4fa
commit 967007b0c7
3239 changed files with 1157078 additions and 0 deletions

269
include/javascript/yui/build/swf/swf-debug.js vendored Executable file
View File

@@ -0,0 +1,269 @@
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.8.0r4
*/
YAHOO.namespace("widget");
(function () {
var version = 0;
var UA = YAHOO.env.ua;
var sF = "ShockwaveFlash";
if (UA.gecko || UA.webkit || UA.opera) {
if ((mF = navigator.mimeTypes['application/x-shockwave-flash'])) {
if ((eP = mF.enabledPlugin)) {
var vS = [];
vS = eP.description.replace(/\s[rd]/g, '.').replace(/[A-Za-z\s]+/g, '').split('.');
version = vS[0] + '.';
switch((vS[2].toString()).length)
{
case 1:
version += "00";
break;
case 2:
version += "0";
break;
}
version += vS[2];
version = parseFloat(version);
}
}
}
else if(UA.ie) {
try
{
var ax6 = new ActiveXObject(sF + "." + sF + ".6");
ax6.AllowScriptAccess = "always";
}
catch(e)
{
if(ax6 != null)
{
version = 6.0;
}
}
if (version == 0) {
try
{
var ax = new ActiveXObject(sF + "." + sF);
var vS = [];
vS = ax.GetVariable("$version").replace(/[A-Za-z\s]+/g, '').split(',');
version = vS[0] + '.';
switch((vS[2].toString()).length)
{
case 1:
version += "00";
break;
case 2:
version += "0";
break;
}
version += vS[2];
version = parseFloat(version);
} catch (e) {}
}
}
UA.flash = version;
YAHOO.util.SWFDetect = {
getFlashVersion : function () {
return version;
},
isFlashVersionAtLeast : function (ver) {
return version >= ver;
}
};
var Dom = YAHOO.util.Dom,
Event = YAHOO.util.Event,
SWFDetect = YAHOO.util.SWFDetect,
Lang = YAHOO.lang,
// private
FLASH_CID = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",
FLASH_TYPE = "application/x-shockwave-flash",
FLASH_VER = "10.22",
EXPRESS_INSTALL_URL = "http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + Math.random(),
EVENT_HANDLER = "YAHOO.widget.SWF.eventHandler",
possibleAttributes = {align:"", allowNetworking:"", allowScriptAccess:"", base:"", bgcolor:"", menu:"", name:"", quality:"", salign:"", scale:"", tabindex:"", wmode:""};
/**
* The SWF utility is a tool for embedding Flash applications in HTMl pages.
* @module swf
* @title SWF Utility
* @requires yahoo, dom, event
* @namespace YAHOO.widget
*/
/**
* Creates the SWF instance and keeps the configuration data
*
* @class SWF
* @extends YAHOO.util.Element
* @constructor
* @param {String|HTMLElement} id The id of the element, or the element itself that the SWF will be inserted into.
* The width and height of the SWF will be set to the width and height of this container element.
* @param {String} swfURL The URL of the SWF to be embedded into the page.
* @param {Object} p_oAttributes (optional) Configuration parameters for the Flash application and values for Flashvars
* to be passed to the SWF.
*/
YAHOO.widget.SWF = function (p_oElement /*:String*/, swfURL /*:String*/, p_oAttributes /*:Object*/ ) {
this._queue = this._queue || [];
this._events = this._events || {};
this._configs = this._configs || {};
/**
* The DOM id of this instance of the element. Automatically generated.
* @property _id
* @type String
*/
this._id = Dom.generateId(null, "yuiswf");
if(p_oAttributes.host) this._host = p_oAttributes.host;
var _id = this._id;
var oElement = Dom.get(p_oElement);
var flashVersion = (p_oAttributes["version"] || FLASH_VER);
var isFlashVersionRight = SWFDetect.isFlashVersionAtLeast(flashVersion);
var canExpressInstall = (UA.flash >= 8.0);
var shouldExpressInstall = canExpressInstall && !isFlashVersionRight && p_oAttributes["useExpressInstall"];
var flashURL = (shouldExpressInstall)?EXPRESS_INSTALL_URL:swfURL;
var objstring = '<object ';
var w, h;
var flashvarstring = "YUISwfId=" + _id + "&YUIBridgeCallback=" + EVENT_HANDLER;
YAHOO.widget.SWF._instances[_id] = this;
if (oElement && (isFlashVersionRight || shouldExpressInstall) && flashURL) {
objstring += 'id="' + _id + '" ';
if (UA.ie) {
objstring += 'classid="' + FLASH_CID + '" '
}
else {
objstring += 'type="' + FLASH_TYPE + '" data="' + flashURL + '" ';
}
w = "100%";
h = "100%";
objstring += 'width="' + w + '" height="' + h + '">';
if (UA.ie) {
objstring += '<param name="movie" value="' + flashURL + '"/>';
}
for (var attribute in p_oAttributes.fixedAttributes) {
if (possibleAttributes.hasOwnProperty(attribute)) {
objstring += '<param name="' + attribute + '" value="' + p_oAttributes.fixedAttributes[attribute] + '"/>';
}
}
for (var flashvar in p_oAttributes.flashVars) {
var fvar = p_oAttributes.flashVars[flashvar];
if (Lang.isString(fvar)) {
flashvarstring += "&" + flashvar + "=" + encodeURIComponent(fvar);
}
}
if (flashvarstring) {
objstring += '<param name="flashVars" value="' + flashvarstring + '"/>';
}
objstring += "</object>";
oElement.innerHTML = objstring;
}
YAHOO.widget.SWF.superclass.constructor.call(this, Dom.get(_id));
this._swf = Dom.get(_id);
};
/**
* The static collection of all instances of the SWFs on the page.
* @property _instances
* @private
* @type Object
*/
YAHOO.widget.SWF._instances = YAHOO.widget.SWF._instances || {};
/**
* Handles an event coming from within the SWF and delegate it
* to a specific instance of SWF.
* @method eventHandler
* @param swfid {String} the id of the SWF dispatching the event
* @param event {Object} the event being transmitted.
* @private
*/
YAHOO.widget.SWF.eventHandler = function (swfid, event) {
YAHOO.widget.SWF._instances[swfid]._eventHandler(event);
};
YAHOO.extend(YAHOO.widget.SWF, YAHOO.util.Element, {
_eventHandler: function(event)
{
if (event.type == "swfReady")
{
this.createEvent("swfReady", {fireOnce:true});
this.fireEvent("swfReady", event);
}
else if(event.type == "log")
{
YAHOO.log(event.message, event.category, this._host ? this._host.toString() : this.toString());
}
else
{
if(this._host && this._host.fireEvent)
{
this._host.fireEvent(event.type, event);
}
else
{
this.fireEvent(event.type, event);
}
}
},
/**
* Calls a specific function exposed by the SWF's
* ExternalInterface.
* @method callSWF
* @param func {String} the name of the function to call
* @param args {Object} the set of arguments to pass to the function.
*/
callSWF: function (func, args)
{
if (!args) {
args= [];
};
if (this._swf[func]) {
return(this._swf[func].apply(this._swf, args));
} else {
return null;
}
},
/**
* Public accessor to the unique name of the SWF instance.
*
* @method toString
* @return {String} Unique name of the SWF instance.
*/
toString: function()
{
return "SWF " + this._id;
}
});
})();
YAHOO.register("swf", YAHOO.widget.SWF, {version: "2.8.0r4", build: "2449"});

7
include/javascript/yui/build/swf/swf-min.js vendored Executable file
View File

@@ -0,0 +1,7 @@
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.8.0r4
*/
YAHOO.namespace("widget");(function(){var M=0;var L=YAHOO.env.ua;var P="ShockwaveFlash";if(L.gecko||L.webkit||L.opera){if((mF=navigator.mimeTypes["application/x-shockwave-flash"])){if((eP=mF.enabledPlugin)){var F=[];F=eP.description.replace(/\s[rd]/g,".").replace(/[A-Za-z\s]+/g,"").split(".");M=F[0]+".";switch((F[2].toString()).length){case 1:M+="00";break;case 2:M+="0";break;}M+=F[2];M=parseFloat(M);}}}else{if(L.ie){try{var Q=new ActiveXObject(P+"."+P+".6");Q.AllowScriptAccess="always";}catch(K){if(Q!=null){M=6;}}if(M==0){try{var B=new ActiveXObject(P+"."+P);var F=[];F=B.GetVariable("$version").replace(/[A-Za-z\s]+/g,"").split(",");M=F[0]+".";switch((F[2].toString()).length){case 1:M+="00";break;case 2:M+="0";break;}M+=F[2];M=parseFloat(M);}catch(K){}}}}L.flash=M;YAHOO.util.SWFDetect={getFlashVersion:function(){return M;},isFlashVersionAtLeast:function(R){return M>=R;}};var H=YAHOO.util.Dom,O=YAHOO.util.Event,I=YAHOO.util.SWFDetect,J=YAHOO.lang,G="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",E="application/x-shockwave-flash",D="10.22",A="http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?"+Math.random(),C="YAHOO.widget.SWF.eventHandler",N={align:"",allowNetworking:"",allowScriptAccess:"",base:"",bgcolor:"",menu:"",name:"",quality:"",salign:"",scale:"",tabindex:"",wmode:""};YAHOO.widget.SWF=function(R,i,c){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._id=H.generateId(null,"yuiswf");if(c.host){this._host=c.host;}var e=this._id;var U=H.get(R);var S=(c["version"]||D);var b=I.isFlashVersionAtLeast(S);var a=(L.flash>=8);var V=a&&!b&&c["useExpressInstall"];var Z=(V)?A:i;var Y="<object ";var f,X;var g="YUISwfId="+e+"&YUIBridgeCallback="+C;YAHOO.widget.SWF._instances[e]=this;if(U&&(b||V)&&Z){Y+='id="'+e+'" ';if(L.ie){Y+='classid="'+G+'" ';}else{Y+='type="'+E+'" data="'+Z+'" ';}f="100%";X="100%";Y+='width="'+f+'" height="'+X+'">';if(L.ie){Y+='<param name="movie" value="'+Z+'"/>';}for(var T in c.fixedAttributes){if(N.hasOwnProperty(T)){Y+='<param name="'+T+'" value="'+c.fixedAttributes[T]+'"/>';}}for(var d in c.flashVars){var W=c.flashVars[d];if(J.isString(W)){g+="&"+d+"="+encodeURIComponent(W);}}if(g){Y+='<param name="flashVars" value="'+g+'"/>';}Y+="</object>";U.innerHTML=Y;}YAHOO.widget.SWF.superclass.constructor.call(this,H.get(e));this._swf=H.get(e);};YAHOO.widget.SWF._instances=YAHOO.widget.SWF._instances||{};YAHOO.widget.SWF.eventHandler=function(R,S){YAHOO.widget.SWF._instances[R]._eventHandler(S);};YAHOO.extend(YAHOO.widget.SWF,YAHOO.util.Element,{_eventHandler:function(R){if(R.type=="swfReady"){this.createEvent("swfReady",{fireOnce:true});this.fireEvent("swfReady",R);}else{if(R.type=="log"){}else{if(this._host&&this._host.fireEvent){this._host.fireEvent(R.type,R);}else{this.fireEvent(R.type,R);}}}},callSWF:function(S,R){if(!R){R=[];}if(this._swf[S]){return(this._swf[S].apply(this._swf,R));}else{return null;}},toString:function(){return"SWF "+this._id;}});})();YAHOO.register("swf",YAHOO.widget.SWF,{version:"2.8.0r4",build:"2449"});

268
include/javascript/yui/build/swf/swf.js vendored Executable file
View File

@@ -0,0 +1,268 @@
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.8.0r4
*/
YAHOO.namespace("widget");
(function () {
var version = 0;
var UA = YAHOO.env.ua;
var sF = "ShockwaveFlash";
if (UA.gecko || UA.webkit || UA.opera) {
if ((mF = navigator.mimeTypes['application/x-shockwave-flash'])) {
if ((eP = mF.enabledPlugin)) {
var vS = [];
vS = eP.description.replace(/\s[rd]/g, '.').replace(/[A-Za-z\s]+/g, '').split('.');
version = vS[0] + '.';
switch((vS[2].toString()).length)
{
case 1:
version += "00";
break;
case 2:
version += "0";
break;
}
version += vS[2];
version = parseFloat(version);
}
}
}
else if(UA.ie) {
try
{
var ax6 = new ActiveXObject(sF + "." + sF + ".6");
ax6.AllowScriptAccess = "always";
}
catch(e)
{
if(ax6 != null)
{
version = 6.0;
}
}
if (version == 0) {
try
{
var ax = new ActiveXObject(sF + "." + sF);
var vS = [];
vS = ax.GetVariable("$version").replace(/[A-Za-z\s]+/g, '').split(',');
version = vS[0] + '.';
switch((vS[2].toString()).length)
{
case 1:
version += "00";
break;
case 2:
version += "0";
break;
}
version += vS[2];
version = parseFloat(version);
} catch (e) {}
}
}
UA.flash = version;
YAHOO.util.SWFDetect = {
getFlashVersion : function () {
return version;
},
isFlashVersionAtLeast : function (ver) {
return version >= ver;
}
};
var Dom = YAHOO.util.Dom,
Event = YAHOO.util.Event,
SWFDetect = YAHOO.util.SWFDetect,
Lang = YAHOO.lang,
// private
FLASH_CID = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",
FLASH_TYPE = "application/x-shockwave-flash",
FLASH_VER = "10.22",
EXPRESS_INSTALL_URL = "http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + Math.random(),
EVENT_HANDLER = "YAHOO.widget.SWF.eventHandler",
possibleAttributes = {align:"", allowNetworking:"", allowScriptAccess:"", base:"", bgcolor:"", menu:"", name:"", quality:"", salign:"", scale:"", tabindex:"", wmode:""};
/**
* The SWF utility is a tool for embedding Flash applications in HTMl pages.
* @module swf
* @title SWF Utility
* @requires yahoo, dom, event
* @namespace YAHOO.widget
*/
/**
* Creates the SWF instance and keeps the configuration data
*
* @class SWF
* @extends YAHOO.util.Element
* @constructor
* @param {String|HTMLElement} id The id of the element, or the element itself that the SWF will be inserted into.
* The width and height of the SWF will be set to the width and height of this container element.
* @param {String} swfURL The URL of the SWF to be embedded into the page.
* @param {Object} p_oAttributes (optional) Configuration parameters for the Flash application and values for Flashvars
* to be passed to the SWF.
*/
YAHOO.widget.SWF = function (p_oElement /*:String*/, swfURL /*:String*/, p_oAttributes /*:Object*/ ) {
this._queue = this._queue || [];
this._events = this._events || {};
this._configs = this._configs || {};
/**
* The DOM id of this instance of the element. Automatically generated.
* @property _id
* @type String
*/
this._id = Dom.generateId(null, "yuiswf");
if(p_oAttributes.host) this._host = p_oAttributes.host;
var _id = this._id;
var oElement = Dom.get(p_oElement);
var flashVersion = (p_oAttributes["version"] || FLASH_VER);
var isFlashVersionRight = SWFDetect.isFlashVersionAtLeast(flashVersion);
var canExpressInstall = (UA.flash >= 8.0);
var shouldExpressInstall = canExpressInstall && !isFlashVersionRight && p_oAttributes["useExpressInstall"];
var flashURL = (shouldExpressInstall)?EXPRESS_INSTALL_URL:swfURL;
var objstring = '<object ';
var w, h;
var flashvarstring = "YUISwfId=" + _id + "&YUIBridgeCallback=" + EVENT_HANDLER;
YAHOO.widget.SWF._instances[_id] = this;
if (oElement && (isFlashVersionRight || shouldExpressInstall) && flashURL) {
objstring += 'id="' + _id + '" ';
if (UA.ie) {
objstring += 'classid="' + FLASH_CID + '" '
}
else {
objstring += 'type="' + FLASH_TYPE + '" data="' + flashURL + '" ';
}
w = "100%";
h = "100%";
objstring += 'width="' + w + '" height="' + h + '">';
if (UA.ie) {
objstring += '<param name="movie" value="' + flashURL + '"/>';
}
for (var attribute in p_oAttributes.fixedAttributes) {
if (possibleAttributes.hasOwnProperty(attribute)) {
objstring += '<param name="' + attribute + '" value="' + p_oAttributes.fixedAttributes[attribute] + '"/>';
}
}
for (var flashvar in p_oAttributes.flashVars) {
var fvar = p_oAttributes.flashVars[flashvar];
if (Lang.isString(fvar)) {
flashvarstring += "&" + flashvar + "=" + encodeURIComponent(fvar);
}
}
if (flashvarstring) {
objstring += '<param name="flashVars" value="' + flashvarstring + '"/>';
}
objstring += "</object>";
oElement.innerHTML = objstring;
}
YAHOO.widget.SWF.superclass.constructor.call(this, Dom.get(_id));
this._swf = Dom.get(_id);
};
/**
* The static collection of all instances of the SWFs on the page.
* @property _instances
* @private
* @type Object
*/
YAHOO.widget.SWF._instances = YAHOO.widget.SWF._instances || {};
/**
* Handles an event coming from within the SWF and delegate it
* to a specific instance of SWF.
* @method eventHandler
* @param swfid {String} the id of the SWF dispatching the event
* @param event {Object} the event being transmitted.
* @private
*/
YAHOO.widget.SWF.eventHandler = function (swfid, event) {
YAHOO.widget.SWF._instances[swfid]._eventHandler(event);
};
YAHOO.extend(YAHOO.widget.SWF, YAHOO.util.Element, {
_eventHandler: function(event)
{
if (event.type == "swfReady")
{
this.createEvent("swfReady", {fireOnce:true});
this.fireEvent("swfReady", event);
}
else if(event.type == "log")
{
}
else
{
if(this._host && this._host.fireEvent)
{
this._host.fireEvent(event.type, event);
}
else
{
this.fireEvent(event.type, event);
}
}
},
/**
* Calls a specific function exposed by the SWF's
* ExternalInterface.
* @method callSWF
* @param func {String} the name of the function to call
* @param args {Object} the set of arguments to pass to the function.
*/
callSWF: function (func, args)
{
if (!args) {
args= [];
};
if (this._swf[func]) {
return(this._swf[func].apply(this._swf, args));
} else {
return null;
}
},
/**
* Public accessor to the unique name of the SWF instance.
*
* @method toString
* @return {String} Unique name of the SWF instance.
*/
toString: function()
{
return "SWF " + this._id;
}
});
})();
YAHOO.register("swf", YAHOO.widget.SWF, {version: "2.8.0r4", build: "2449"});