Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove dependence on MooTools 1.2 legacy code.

  • Loading branch information...
commit ed55ff3dfc072565fddfdaef920e62114f6f5044 1 parent 9c68148
@realityking authored
View
2  libraries/joomla/html/html/behavior.php
@@ -577,7 +577,7 @@ public static function tree($id, $params = array(), $root = array())
$opt['onExpand'] = (array_key_exists('onExpand', $params)) ? '\\' . $params['onExpand'] : null;
$opt['onSelect'] = (array_key_exists('onSelect', $params)) ? '\\' . $params['onSelect'] : null;
$opt['onClick'] = (array_key_exists('onClick', $params)) ? '\\' . $params['onClick']
- : '\\function(node){ window.open(node.data.url, $chk(node.data.target) ? node.data.target : \'_self\'); }';
+ : '\\function(node){ window.open(node.data.url, node.data.target != null ? node.data.target : \'_self\'); }';
$options = JHtmlBehavior::_getJSObject($opt);
View
2  media/system/js/mootree-uncompressed.js
@@ -248,7 +248,7 @@ var MooTreeControl = new Class({
if (pcs.length == 2) con[pcs[0].trim()] = pcs[1].trim();
}
}
- if ($chk(c[i].id)) {
+ if (c[i].id != null) {
con.id = 'node_'+c[i].id;
}
node = parentNode.insert(con);
View
4 media/system/js/mootree.js
@@ -1,7 +1,7 @@
var MooTreeIcon="I,L,Lminus,Lplus,Rminus,Rplus,T,Tminus,Tplus,_closed,_doc,_open,minus,plus".split(","),MooTreeControl=new Class({initialize:function(a,b){b.control=this;b.div=a.div;this.root=new MooTreeNode(b);this.index={};this.enabled=!0;this.theme=a.theme||"mootree.gif";this.loader=a.loader||{icon:"mootree_loader.gif",text:"Loading...",color:"#a0a0a0"};this.selected=null;this.mode=a.mode;this.grid=a.grid;this.onExpand=a.onExpand||new Function;this.onSelect=a.onSelect||new Function;this.onClick=
a.onClick||new Function;this.root.update(!0)},insert:function(a){a.control=this;return this.root.insert(a)},select:function(a){this.onClick(a);a.onClick();this.selected!==a&&(this.selected&&(this.selected.select(!1),this.onSelect(this.selected,!1)),this.selected=a,a.select(!0),this.onSelect(a,!0))},expand:function(){this.root.toggle(!0,!0)},collapse:function(){this.root.toggle(!0,!1)},get:function(a){return this.index[a]||null},adopt:function(a,b){void 0===b&&(b=this.root);this.disable();this._adopt(a,
b);b.update(!0);document.id(a).destroy();this.enable()},_adopt:function(a,b){e=document.id(a);for(var c=0,d=e.getChildren(),c=0;c<d.length;c++)if("LI"==d[c].nodeName){for(var f={text:""},i="",h=null,l=null,g=0,h=0,k=null,j=d[c].getChildren(),g=0;g<j.length;g++)switch(j[g].nodeName){case "A":for(h=0;h<j[g].childNodes.length;h++)switch(k=j[g].childNodes[h],k.nodeName){case "#text":f.text+=k.nodeValue;break;case "#comment":i+=k.nodeValue}f.data=j[g].getProperties("href","target","title","name");break;
-case "UL":l=j[g]}if(""!=f.label){f.data.url=f.data.href;if(""!=i){i=i.split(";");for(h=0;h<i.length;h++)g=i[h].trim().split(":"),2==g.length&&(f[g[0].trim()]=g[1].trim())}$chk(d[c].id)&&(f.id="node_"+d[c].id);h=b.insert(f);l&&this._adopt(l,h)}}},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0;this.root.update(!0,!0)}}),MooTreeNode=new Class({initialize:function(a){this.text=a.text;this.id=a.id||null;this.nodes=[];this.parent=null;this.last=!0;this.control=a.control;this.selected=
+case "UL":l=j[g]}if(""!=f.label){f.data.url=f.data.href;if(""!=i){i=i.split(";");for(h=0;h<i.length;h++)g=i[h].trim().split(":"),2==g.length&&(f[g[0].trim()]=g[1].trim())}null!=d[c].id&&(f.id="node_"+d[c].id);h=b.insert(f);l&&this._adopt(l,h)}}},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0;this.root.update(!0,!0)}}),MooTreeNode=new Class({initialize:function(a){this.text=a.text;this.id=a.id||null;this.nodes=[];this.parent=null;this.last=!0;this.control=a.control;this.selected=
!1;this.color=a.color||null;this.data=a.data||{};this.onExpand=a.onExpand||new Function;this.onSelect=a.onSelect||new Function;this.onClick=a.onClick||new Function;this.open=a.open?!0:!1;this.icon=a.icon;this.openicon=a.openicon||this.icon;this.id&&(this.control.index[this.id]=this);this.div={main:(new Element("div")).addClass("mooTree_node"),indent:new Element("div"),gadget:new Element("div"),icon:new Element("div"),text:(new Element("div")).addClass("mooTree_text"),sub:new Element("div")};this.div.main.adopt(this.div.indent);
this.div.main.adopt(this.div.gadget);this.div.main.adopt(this.div.icon);this.div.main.adopt(this.div.text);document.id(a.div).adopt(this.div.main);document.id(a.div).adopt(this.div.sub);this.div.gadget._node=this;this.div.gadget.onclick=this.div.gadget.ondblclick=function(){this._node.toggle()};this.div.icon._node=this.div.text._node=this;this.div.icon.onclick=this.div.icon.ondblclick=this.div.text.onclick=this.div.text.ondblclick=function(){this._node.control.select(this._node)}},insert:function(a){a.div=
this.div.sub;a.control=this.control;a=new MooTreeNode(a);a.parent=this;var b=this.nodes;b.length&&(b[b.length-1].last=!1);b.push(a);a.update();1==b.length&&this.update();1<b.length&&b[b.length-2].update(!0);return a},remove:function(){var a=this.parent;this._remove();a.update(!0)},_remove:function(){for(var a=this.nodes;a.length;)a[a.length-1]._remove();delete this.control.index[this.id];this.div.main.destroy();this.div.sub.destroy();this.parent&&(a=this.parent.nodes,a.erase(this),a.length&&(a[a.length-
@@ -9,4 +9,4 @@ this.div.sub;a.control=this.control;a=new MooTreeNode(a);a.parent=this;var b=thi
this.color&&(c.style.color=this.color);this.div.icon.innerHTML=this.getImg(this.nodes.length?this.open?this.openicon||this.icon||"_open":this.icon||"_closed":this.icon||("folders"==this.control.mode?"_closed":"_doc"));this.div.gadget.innerHTML=this.getImg((this.control.grid?this.control.root==this?this.nodes.length?"R":"":this.last?"L":"T":"")+(this.nodes.length?this.open?"minus":"plus":""));this.div.sub.style.display=this.open?"block":"none"}a&&this.nodes.forEach(function(a){a.update(!0,b)})},getImg:function(a){var b=
'<div class="mooTree_img"';if(""!=a){var c=this.control.theme,d=MooTreeIcon.indexOf(a);-1==d&&(a=a.split("#"),c=a[0],d=2==a.length?parseInt(a[1])-1:0);b+=' style="background-image:url('+c+"); background-position:-"+18*d+'px 0px;"'}return b+"></div>"},toggle:function(a,b){this.open=void 0===b?!this.open:b;this.update();this.onExpand(this.open);this.control.onExpand(this,this.open);a&&this.nodes.forEach(function(a){a.toggle(!0,this.open)},this)},select:function(a){this.selected=a;this.update();this.onSelect(a)},
load:function(a,b){this.loading||(this.loading=!0,this.toggle(!1,!0),this.clear(),this.insert(this.control.loader),function(){(new Request({method:"GET",url:a,onSuccess:this._loaded.bind(this),onFailure:this._load_err.bind(this)})).send(b||"")}.bind(this).delay(20))},_loaded:function(a,b){this.control.disable();this.clear();this._import(b.documentElement);this.control.enable();this.loading=!1},_import:function(a){for(var a=a.childNodes,b=0;b<a.length;b++)if("node"==a[b].tagName){for(var c={data:{}},
-d=a[b].attributes,f=0;f<d.length;f++)switch(d[f].name){case "text":case "id":case "icon":case "openicon":case "color":case "open":c[d[f].name]=d[f].value;break;default:c.data[d[f].name]=d[f].value}c=this.insert(c);c.data.load&&(c.open=!1,c.insert(this.control.loader),c.onExpand=function(){this.load(this.data.load);this.onExpand=new Function});a[b].childNodes.length&&c._import(a[b])}},_load_err:function(){window.alert("Error loading: "+this.text)}});
+d=a[b].attributes,f=0;f<d.length;f++)switch(d[f].name){case "text":case "id":case "icon":case "openicon":case "color":case "open":c[d[f].name]=d[f].value;break;default:c.data[d[f].name]=d[f].value}c=this.insert(c);c.data.load&&(c.open=!1,c.insert(this.control.loader),c.onExpand=function(){this.load(this.data.load);this.onExpand=new Function});a[b].childNodes.length&&c._import(a[b])}},_load_err:function(){window.alert("Error loading: "+this.text)}});
View
10 media/system/js/swf-uncompressed.js
@@ -115,7 +115,7 @@ Swiff.Uploader = new Class({
};
var path = this.options.path;
- if (!path.contains('?')) path += '?noCache=' + $time(); // cache in IE
+ if (!path.contains('?')) path += '?noCache=' + Date.now; // cache in IE
// container options for Swiff class
this.options.container = this.box = new Element('span', {'class': 'swiff-uploader-box'}).inject(document.id(this.options.container) || document.body);
@@ -204,7 +204,7 @@ Swiff.Uploader = new Class({
update: function(data) {
// the data is saved right to the instance
- $extend(this, data);
+ Object.append(this, data);
this.fireEvent('queue', [this], 10);
return this;
},
@@ -316,7 +316,7 @@ Swiff.Uploader = new Class({
var data = this.options.data || {};
if ($type(append) == 'string') data[append] = hash;
- else $extend(data, hash);
+ else Object.append(data, hash);
this.setOptions({data: data});
},
@@ -360,7 +360,7 @@ Swiff.Uploader = new Class({
});
-$extend(Swiff.Uploader, {
+Object.append(Swiff.Uploader, {
STATUS_QUEUED: 0,
STATUS_RUNNING: 1,
@@ -430,7 +430,7 @@ Swiff.Uploader.File = new Class({
},
update: function(data) {
- return $extend(this, data);
+ return Object.append(this, data);
},
validate: function() {
View
14 media/system/js/swf.js
@@ -6,17 +6,17 @@
@copyright Authors
*/
Swiff.Uploader=new Class({Extends:Swiff,Implements:Events,options:{path:"Swiff.Uploader.swf",target:null,zIndex:9999,callBacks:null,params:{wMode:"opaque",menu:"false",allowScriptAccess:"always"},typeFilter:null,multiple:!0,queued:!0,verbose:!1,height:30,width:100,passStatus:null,url:null,method:null,data:null,mergeData:!0,fieldName:null,fileSizeMin:1,fileSizeMax:null,allowDuplicates:!1,timeLimit:Browser.Platform.linux?0:30,policyFile:null,buttonImage:null,fileListMax:0,fileListSizeMax:0,instantStart:!1,
-appendCookieData:!1,fileClass:null},initialize:function(a){this.addEvent("load",this.initializeSwiff,!0).addEvent("select",this.processFiles,!0).addEvent("complete",this.update,!0).addEvent("fileRemove",function(a){this.fileList.erase(a)}.bind(this),!0);this.setOptions(a);this.options.callBacks&&Hash.each(this.options.callBacks,function(a,b){this.addEvent(b,a)},this);this.options.callBacks={fireCallback:this.fireCallback.bind(this)};a=this.options.path;a.contains("?")||(a+="?noCache="+$time());this.options.container=
+appendCookieData:!1,fileClass:null},initialize:function(a){this.addEvent("load",this.initializeSwiff,!0).addEvent("select",this.processFiles,!0).addEvent("complete",this.update,!0).addEvent("fileRemove",function(a){this.fileList.erase(a)}.bind(this),!0);this.setOptions(a);this.options.callBacks&&Hash.each(this.options.callBacks,function(a,b){this.addEvent(b,a)},this);this.options.callBacks={fireCallback:this.fireCallback.bind(this)};a=this.options.path;a.contains("?")||(a+="?noCache="+Date.now);this.options.container=
this.box=(new Element("span",{"class":"swiff-uploader-box"})).inject(document.id(this.options.container)||document.body);if(this.target=document.id(this.options.target)){var b=window.getScroll();this.box.setStyles({position:"absolute",visibility:"visible",zIndex:this.options.zIndex,overflow:"hidden",height:1,width:1,top:b.y,left:b.x});this.parent(a,{params:{wMode:"transparent"},height:"100%",width:"100%"});this.target.addEvent("mouseenter",this.reposition.bind(this,[]));this.addEvents({buttonEnter:this.targetRelay.bind(this,
["mouseenter"]),buttonLeave:this.targetRelay.bind(this,["mouseleave"]),buttonDown:this.targetRelay.bind(this,["mousedown"]),buttonDisable:this.targetRelay.bind(this,["disable"])});this.reposition();window.addEvent("resize",this.reposition.bind(this,[]))}else this.parent(a);this.inject(this.box);this.fileList=[];this.size=this.uploading=this.bytesLoaded=this.percentLoaded=0;9>Browser.Plugins.Flash.version?this.fireEvent("fail",["flash"]):this.verifyLoad.delay(1E3,this)},verifyLoad:function(){this.loaded||
-(this.object.parentNode?"none"==this.object.style.display?this.fireEvent("fail",["hidden"]):this.object.offsetWidth||this.fireEvent("fail",["empty"]):this.fireEvent("fail",["disabled"]))},fireCallback:function(a,b){if("file"==a.substr(0,4)){1<b.length&&this.update(b[1]);var e=b[0],d=this.findFile(e.id);this.fireEvent(a,d||e,5);if(d){var f=a.replace(/^file([A-Z])/,function(a,b){return b.toLowerCase()});d.update(e).fireEvent(f,[e],10)}}else this.fireEvent(a,b,5)},update:function(a){$extend(this,a);
-this.fireEvent("queue",[this],10);return this},findFile:function(a){for(var b=0;b<this.fileList.length;b++)if(this.fileList[b].id==a)return this.fileList[b];return null},initializeSwiff:function(){this.remote("xInitialize",{typeFilter:this.options.typeFilter,multiple:this.options.multiple,queued:this.options.queued,verbose:this.options.verbose,width:this.options.width,height:this.options.height,passStatus:this.options.passStatus,url:this.options.url,method:this.options.method,data:this.options.data,
+(this.object.parentNode?"none"==this.object.style.display?this.fireEvent("fail",["hidden"]):this.object.offsetWidth||this.fireEvent("fail",["empty"]):this.fireEvent("fail",["disabled"]))},fireCallback:function(a,b){if("file"==a.substr(0,4)){1<b.length&&this.update(b[1]);var e=b[0],d=this.findFile(e.id);this.fireEvent(a,d||e,5);if(d){var f=a.replace(/^file([A-Z])/,function(a,b){return b.toLowerCase()});d.update(e).fireEvent(f,[e],10)}}else this.fireEvent(a,b,5)},update:function(a){Object.append(this,
+a);this.fireEvent("queue",[this],10);return this},findFile:function(a){for(var b=0;b<this.fileList.length;b++)if(this.fileList[b].id==a)return this.fileList[b];return null},initializeSwiff:function(){this.remote("xInitialize",{typeFilter:this.options.typeFilter,multiple:this.options.multiple,queued:this.options.queued,verbose:this.options.verbose,width:this.options.width,height:this.options.height,passStatus:this.options.passStatus,url:this.options.url,method:this.options.method,data:this.options.data,
mergeData:this.options.mergeData,fieldName:this.options.fieldName,fileSizeMin:this.options.fileSizeMin,fileSizeMax:this.options.fileSizeMax,allowDuplicates:this.options.allowDuplicates,timeLimit:this.options.timeLimit,policyFile:this.options.policyFile,buttonImage:this.options.buttonImage});this.loaded=!0;this.appendCookieData()},targetRelay:function(a){this.target&&this.target.fireEvent(a)},reposition:function(a){a=a||this.target&&this.target.offsetHeight?this.target.getCoordinates(this.box.getOffsetParent()):
{top:window.getScrollTop(),left:0,width:40,height:40};this.box.setStyles(a);this.fireEvent("reposition",[a,this.box,this.target])},setOptions:function(a){a&&(a.url&&(a.url=Swiff.Uploader.qualifyPath(a.url)),a.buttonImage&&(a.buttonImage=Swiff.Uploader.qualifyPath(a.buttonImage)),this.parent(a),this.loaded&&this.remote("xSetOptions",a));return this},setEnabled:function(a){this.remote("xSetEnabled",a)},start:function(){this.fireEvent("beforeStart");this.remote("xStart")},stop:function(){this.fireEvent("beforeStop");
this.remote("xStop")},remove:function(){this.fireEvent("beforeRemove");this.remote("xRemove")},fileStart:function(a){this.remote("xFileStart",a.id)},fileStop:function(a){this.remote("xFileStop",a.id)},fileRemove:function(a){this.remote("xFileRemove",a.id)},fileRequeue:function(a){this.remote("xFileRequeue",a.id)},appendCookieData:function(){var a=this.options.appendCookieData;if(a){var b={};document.cookie.split(/;\s*/).each(function(a){a=a.split("=");2==a.length&&(b[decodeURIComponent(a[0])]=decodeURIComponent(a[1]))});
-var e=this.options.data||{};"string"==$type(a)?e[a]=b:$extend(e,b);this.setOptions({data:e})}},processFiles:function(a,b,e){var d=this.options.fileClass||Swiff.Uploader.File,f=[],c=[];a&&(a.each(function(a){var b=new d(this,a);b.validate()?(this.size+=a.size,this.fileList.push(b),c.push(b),b.render()):(b.remove.delay(10,b),f.push(b))},this),this.fireEvent("selectSuccess",[c],10));if(b||f.length)f.extend(b?b.map(function(a){return new d(this,a)},this):[]).each(function(a){a.invalidate().render()}),
+var e=this.options.data||{};"string"==$type(a)?e[a]=b:Object.append(e,b);this.setOptions({data:e})}},processFiles:function(a,b,e){var d=this.options.fileClass||Swiff.Uploader.File,f=[],c=[];a&&(a.each(function(a){var b=new d(this,a);b.validate()?(this.size+=a.size,this.fileList.push(b),c.push(b),b.render()):(b.remove.delay(10,b),f.push(b))},this),this.fireEvent("selectSuccess",[c],10));if(b||f.length)f.extend(b?b.map(function(a){return new d(this,a)},this):[]).each(function(a){a.invalidate().render()}),
this.fireEvent("selectFail",[f],10);this.update(e);this.options.instantStart&&c.length&&this.start()}});
-$extend(Swiff.Uploader,{STATUS_QUEUED:0,STATUS_RUNNING:1,STATUS_ERROR:2,STATUS_COMPLETE:3,STATUS_STOPPED:4,log:function(){window.console&&console.info&&console.info.apply(console,arguments)},unitLabels:{b:[{min:1,unit:"B"},{min:1024,unit:"kB"},{min:1048576,unit:"MB"},{min:1073741824,unit:"GB"}],s:[{min:1,unit:"s"},{min:60,unit:"m"},{min:3600,unit:"h"},{min:86400,unit:"d"}]},formatUnit:function(a,b,e){var d=Swiff.Uploader.unitLabels["bps"==b?"b":b],f="bps"==b?"/s":"",c;c=d.length;var g;if(1>a)return"0 "+
-d[0].unit+f;if("s"==b){f=[];for(c-=1;0<=c;c--)if(g=Math.floor(a/d[c].min))if(f.push(g+" "+d[c].unit),a-=g*d[c].min,!a)break;return!1===e?f:f.join(e||", ")}for(c-=1;0<=c&&!(g=d[c].min,a>=g);c--);return(a/g).toFixed(1)+" "+d[c].unit+f}});Swiff.Uploader.qualifyPath=function(){var a;return function(b){(a||(a=new Element("a"))).href=b;return a.href}}();
-Swiff.Uploader.File=new Class({Implements:Events,initialize:function(a,b){this.base=a;this.update(b)},update:function(a){return $extend(this,a)},validate:function(){var a=this.base.options;if(a.fileListMax&&this.base.fileList.length>=a.fileListMax)return this.validationError="fileListMax",!1;return a.fileListSizeMax&&this.base.size+this.size>a.fileListSizeMax?(this.validationError="fileListSizeMax",!1):!0},invalidate:function(){this.invalid=!0;this.base.fireEvent("fileInvalid",this,10);return this.fireEvent("invalid",
+Object.append(Swiff.Uploader,{STATUS_QUEUED:0,STATUS_RUNNING:1,STATUS_ERROR:2,STATUS_COMPLETE:3,STATUS_STOPPED:4,log:function(){window.console&&console.info&&console.info.apply(console,arguments)},unitLabels:{b:[{min:1,unit:"B"},{min:1024,unit:"kB"},{min:1048576,unit:"MB"},{min:1073741824,unit:"GB"}],s:[{min:1,unit:"s"},{min:60,unit:"m"},{min:3600,unit:"h"},{min:86400,unit:"d"}]},formatUnit:function(a,b,e){var d=Swiff.Uploader.unitLabels["bps"==b?"b":b],f="bps"==b?"/s":"",c;c=d.length;var g;if(1>
+a)return"0 "+d[0].unit+f;if("s"==b){f=[];for(c-=1;0<=c;c--)if(g=Math.floor(a/d[c].min))if(f.push(g+" "+d[c].unit),a-=g*d[c].min,!a)break;return!1===e?f:f.join(e||", ")}for(c-=1;0<=c&&!(g=d[c].min,a>=g);c--);return(a/g).toFixed(1)+" "+d[c].unit+f}});Swiff.Uploader.qualifyPath=function(){var a;return function(b){(a||(a=new Element("a"))).href=b;return a.href}}();
+Swiff.Uploader.File=new Class({Implements:Events,initialize:function(a,b){this.base=a;this.update(b)},update:function(a){return Object.append(this,a)},validate:function(){var a=this.base.options;if(a.fileListMax&&this.base.fileList.length>=a.fileListMax)return this.validationError="fileListMax",!1;return a.fileListSizeMax&&this.base.size+this.size>a.fileListSizeMax?(this.validationError="fileListSizeMax",!1):!0},invalidate:function(){this.invalid=!0;this.base.fireEvent("fileInvalid",this,10);return this.fireEvent("invalid",
this,10)},render:function(){return this},setOptions:function(a){a&&(a.url&&(a.url=Swiff.Uploader.qualifyPath(a.url)),this.base.remote("xFileSetOptions",this.id,a),this.options=$merge(this.options,a));return this},start:function(){this.base.fileStart(this);return this},stop:function(){this.base.fileStop(this);return this},remove:function(){this.base.fileRemove(this);return this},requeue:function(){this.base.fileRequeue(this)}});
View
2  media/system/js/uploader-uncompressed.js
@@ -20,7 +20,7 @@ var FancyUpload2 = new Class({
// compat
limitSize: 0,
limitFiles: 0,
- validateFile: $lambda(true)
+ validateFile: Function.from(true)
},
initialize: function(status, list, options) {
View
2  media/system/js/uploader.js
@@ -4,7 +4,7 @@
@author Harald Kirschner <http://digitarald.de>
@copyright Authors
*/
-var FancyUpload2=new Class({Extends:Swiff.Uploader,options:{queued:1,limitSize:0,limitFiles:0,validateFile:$lambda(!0)},initialize:function(b,c,a){this.status=document.id(b);this.list=document.id(c);a.fileClass=a.fileClass||FancyUpload2.File;a.fileSizeMax=a.limitSize||a.fileSizeMax;a.fileListMax=a.limitFiles||a.fileListMax;a.url+="&format=json";this.parent(a);this.addEvents({load:this.render,select:this.onSelect,cancel:this.onCancel,start:this.onStart,queue:this.onQueue,complete:this.onComplete})},
+var FancyUpload2=new Class({Extends:Swiff.Uploader,options:{queued:1,limitSize:0,limitFiles:0,validateFile:Function.from(!0)},initialize:function(b,c,a){this.status=document.id(b);this.list=document.id(c);a.fileClass=a.fileClass||FancyUpload2.File;a.fileSizeMax=a.limitSize||a.fileSizeMax;a.fileListMax=a.limitFiles||a.fileListMax;a.url+="&format=json";this.parent(a);this.addEvents({load:this.render,select:this.onSelect,cancel:this.onCancel,start:this.onStart,queue:this.onQueue,complete:this.onComplete})},
render:function(){this.overallTitle=this.status.getElement(".overall-title");this.currentTitle=this.status.getElement(".current-title");this.currentText=this.status.getElement(".current-text");var b=this.status.getElement(".overall-progress");this.overallProgress=new Fx.ProgressBar(b,{text:(new Element("span",{"class":"progress-text"})).inject(b,"after")});b=this.status.getElement(".current-progress");this.currentProgress=new Fx.ProgressBar(b,{text:(new Element("span",{"class":"progress-text"})).inject(b,
"after")});this.updateOverall()},onSelect:function(){this.status.removeClass("status-browsing")},onCancel:function(){this.status.removeClass("file-browsing")},onStart:function(){this.status.addClass("file-uploading");this.overallProgress.set(0)},onQueue:function(){this.updateOverall()},onComplete:function(){this.status.removeClass("file-uploading");this.size?this.overallProgress.start(100):(this.overallProgress.set(0),this.currentProgress.set(0))},updateOverall:function(){this.overallTitle.set("html",
Joomla.JText._("JLIB_HTML_BEHAVIOR_UPLOADER_PROGRESS_OVERALL","Overall Progress").substitute({total:Swiff.Uploader.formatUnit(this.size,"b")}));this.size||(this.currentTitle.set("html",Joomla.JText._("JLIB_HTML_BEHAVIOR_UPLOADER_CURRENT_TITLE","Current Title")),this.currentText.set("html",""))},upload:function(){this.start()},removeFile:function(){return this.remove()}});
Please sign in to comment.
Something went wrong with that request. Please try again.