diff --git a/js/lib_ajax.js b/js/lib_ajax.js index 9997942251..28062e6653 100644 --- a/js/lib_ajax.js +++ b/js/lib_ajax.js @@ -21,10 +21,21 @@ //The callBack object provides an easy way to pass a member of an object as callback parameter and makes sure that the 'this' is always set correctly when called. callBack=function(func,obj){ + this.id=callBack.callBacks.length; + callBack.callBacks[this.id]=this; this.func=func; this.obj=obj; } +callBack.callBacks=Array(); + +callBack.call=function(id,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10){ + callback=callBack.callBacks[id]; + if(callback){ + callback.func.call(callback.obj,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); + } +} + callBack.prototype=function(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10){ this.call(false,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); } diff --git a/js/lib_files.js b/js/lib_files.js index 2b2c566506..466bf2f676 100644 --- a/js/lib_files.js +++ b/js/lib_files.js @@ -30,7 +30,8 @@ OC_FILES.getdirectorycontent_parse=function(req){ files['max_upload']=dir.getAttribute('max_upload'); var fileElements=response.getElementsByTagName('file'); if(fileElements.length>0){ - for(index in fileElements){ + for(index=0;index=1){ item.oldContent[item.oldContent.length]=item.firstChild;