diff options
author | Robin <robin@Amaya.(none)> | 2010-03-29 15:25:00 +0200 |
---|---|---|
committer | Robin <robin@Amaya.(none)> | 2010-03-29 15:25:00 +0200 |
commit | 5ac201dc834664989b04da9b28fc44bcd84874da (patch) | |
tree | 84a2bb90ad16a06ba6e593d5e2c4a628ad815d74 /js | |
parent | 6822185c5bc33abe892bb9db904a96fbaa916f2c (diff) | |
download | nextcloud-server-5ac201dc834664989b04da9b28fc44bcd84874da.tar.gz nextcloud-server-5ac201dc834664989b04da9b28fc44bcd84874da.zip |
most of the ajax frontend works in IE now (IE8 not sure about other versions)
Diffstat (limited to 'js')
-rw-r--r-- | js/lib_ajax.js | 11 | ||||
-rw-r--r-- | js/lib_files.js | 15 |
2 files changed, 20 insertions, 6 deletions
diff --git a/js/lib_ajax.js b/js/lib_ajax.js index 99979422511..28062e66532 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 2b2c5665063..466bf2f676b 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<fileElements.length;index++){ +// for(index in fileElements){ var file=new Array(); var attributes=Array('size','name','type','directory','date'); for(i in attributes){ @@ -190,6 +191,7 @@ OC_FILES.showbrowser_callback=function(content){ tr.appendChild(td); td.className='nametext'; td.setAttribute('name',file['name']); + td.setAttribute('id',file['name']); a=document.createElement('a'); td.appendChild(a); a.appendChild(document.createTextNode(file['name'])) @@ -248,10 +250,10 @@ OC_FILES.showbrowser_callback=function(content){ } } td.appendChild(document.createTextNode(' selected. ')); - button=document.createElement('input'); + button=document.createElement('button'); td.appendChild(button); - button.setAttribute('type','button'); - button.setAttribute('value','Go'); +// button.type='button'; + button.appendChild(document.createTextNode('Go')); button.setAttribute('onclick','OC_FILES.action_selected()'); tr=document.createElement('tr'); tbody.appendChild(tr); @@ -310,8 +312,9 @@ OC_FILES.upload_callback=function(dir){ } OC_FILES.rename=function(dir,file){ - var item=document.getElementsByName(file).item(0); - item.oldContent=new Array(); + var item=document.getElementById(file); +// item=item.item(0); + item.oldContent=Array(); if(item.hasChildNodes()){ while(item.childNodes.length >=1){ item.oldContent[item.oldContent.length]=item.firstChild; |