Changeset 2490 for trunk/filemanager/js/draw_api.js
- Timestamp:
- 04/12/10 15:07:32 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/filemanager/js/draw_api.js
r2019 r2490 12 12 13 13 function loadHistory(filename){ 14 cExecute_( './index.php?menuaction=filemanager.uifilemanager.history&file='+base64_encode(filename)+"&path="+base64_encode(currentPath),draw_window);14 cExecute_( URL_SERVER + '/index.php?menuaction=filemanager.uifilemanager.history&file='+base64_encode(filename)+"&path="+base64_encode(currentPath),draw_window); 15 15 } 16 16 … … 163 163 window.onresize = resizeDiv; 164 164 document.body.style.overflow = "hidden"; 165 cExecute_( './index.php?menuaction=filemanager.uifilemanager.get_folders_list',handler.draw_folders_list);165 cExecute_( URL_SERVER + '/index.php?menuaction=filemanager.uifilemanager.get_folders_list',handler.draw_folders_list); 166 166 } 167 167 … … 216 216 newpage += '<td></td><td></td>'; 217 217 newpage += fl.td+'<img src="'+files[i].icon+'">'; 218 newpage += '<a id="name_'+files[i].name+'" href=" ./index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(files[i].name)+'&path='+base64_encode(files[i].directory)+'" target="_blank">'+files[i].name+'</a> </td>';218 newpage += '<a id="name_'+files[i].name+'" href="' + URL_SERVER + '/index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(files[i].name)+'&path='+base64_encode(files[i].directory)+'" target="_blank">'+files[i].name+'</a> </td>'; 219 219 newpage += fl.td+files[i].directory+'</td>'; 220 220 if (preferences.mime_type =='1') newpage += fl.td+files[i].mime_type+'</td>'; … … 246 246 { 247 247 case 'text/html': 248 retBuff += '<td><a href=" ./index.php?menuaction=filemanager.uifilemanager.export&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'"><div class="exportButton" alt="'+get_lang('export')+'" title="'+get_lang('export')+'"></div></a></td>';248 retBuff += '<td><a href="' + URL_SERVER + '/index.php?menuaction=filemanager.uifilemanager.export&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'"><div class="exportButton" alt="'+get_lang('export')+'" title="'+get_lang('export')+'"></div></a></td>'; 249 249 break; 250 250 case 'application/zip': … … 259 259 else 260 260 var mousefunc = 'hide_card()'; 261 retBuff += '<a onmouseover="'+mousefunc+'" id="name_'+file.name+'" href=" ./index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'" target="_blank">'+file.name+'</a></div></td>';261 retBuff += '<a onmouseover="'+mousefunc+'" id="name_'+file.name+'" href="' + URL_SERVER + '/index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'" target="_blank">'+file.name+'</a></div></td>'; 262 262 if (preferences.mime_type =='1') retBuff += fl.td+file.mime_type+'</td>'; 263 263 if (preferences.size =='1') retBuff += fl.td+borkb(file.size)+'</td>'; … … 319 319 var contentQuota = document.getElementById('content_quota'); 320 320 if (contentQuota != null) 321 contentQuota.innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota"><tbody><tr><td width="102" nowrap="true" height="15" background=" ../phpgwapi/templates/default/images/dsunused.gif"><table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;"><tbody><tr><td height="15" class="dsused"/></tr></tbody></table></td><td nowrap="true" align="center"><span class="boxHeaderText">'+parseInt(usedSpace/quotaSize*100)+'% ('+borkb(usedSpace)+'/'+borkb(quotaSize)+')</span></td></tr></tbody></table></td></tr></table>';321 contentQuota.innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota"><tbody><tr><td width="102" nowrap="true" height="15" background="' + URL_SERVER + '/phpgwapi/templates/default/images/dsunused.gif"><table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;"><tbody><tr><td height="15" class="dsused"/></tr></tbody></table></td><td nowrap="true" align="center"><span class="boxHeaderText">'+parseInt(usedSpace/quotaSize*100)+'% ('+borkb(usedSpace)+'/'+borkb(quotaSize)+')</span></td></tr></tbody></table></td></tr></table>'; 322 322 } 323 323 } … … 335 335 { 336 336 newicon = '<div class="icon">'; 337 newicon += '<a href=" ./index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(files[i].name)+'&path='+base64_encode(currentPath)+'" target="_blank">';337 newicon += '<a href="' + URL_SERVER + '/index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(files[i].name)+'&path='+base64_encode(currentPath)+'" target="_blank">'; 338 338 newicon += '<div style="width:64; height:64; background-image:url('+files[i].icon+'); background-repeat: no-repeat;"></div>'; 339 339 newicon += '<span class="iconCaption">'+files[i].name+'</span>'; … … 483 483 inputName.value = filename; 484 484 inputName.onclick = function () { oldValue = inputName.value; } 485 inputName.onblur = function () { if (inputName.value == oldValue) handler.rename(); else cExecute_( './index.php?menuaction=filemanager.vfs_functions.rename&file='+base64_encode(this.id.substr(6))+'&to='+base64_encode(this.value)+"&path="+base64_encode(currentPath),handler.rename) };485 inputName.onblur = function () { if (inputName.value == oldValue) handler.rename(); else cExecute_( URL_SERVER + '/index.php?menuaction=filemanager.vfs_functions.rename&file='+base64_encode(this.id.substr(6))+'&to='+base64_encode(this.value)+"&path="+base64_encode(currentPath),handler.rename) }; 486 486 inputName.onkeydown=function (event) {if (event.keyCode == KEY_ENTER) this.blur(); }; 487 487 nameLink.parentNode.appendChild(inputName); … … 502 502 address = document.location.toString(); 503 503 address = address.split("&"); 504 document.location = address[0]+"&"+arg+".x=1&filename="+base64_encode(filename)+".&path="+base64_encode(currentPath);504 document.location = URL_SERVER + '/index.php?menuaction=filemanager.uifilemanager.index&'+arg+".x=1&filename="+base64_encode(filename)+".&path="+base64_encode(currentPath); 505 505 } 506 506 else … … 512 512 case 'delete': 513 513 var filesUrl = this.getCheckedFiles(); 514 cExecute_( './index.php?menuaction=filemanager.vfs_functions.delete&path='+514 cExecute_( URL_SERVER + '/index.php?menuaction=filemanager.vfs_functions.delete&path='+ 515 515 base64_encode(currentPath)+filesUrl,handler.del); 516 516 break; … … 530 530 } 531 531 var pswd = crypt.encode(password); 532 cExecute_( './index.php?menuaction=filemanager.vfs_functions.archive&pswd='+base64_encode(pswd.toString())+'&path='+base64_encode(currentPath)+filesUrl,handler.archive);532 cExecute_( URL_SERVER + '/index.php?menuaction=filemanager.vfs_functions.archive&pswd='+base64_encode(pswd.toString())+'&path='+base64_encode(currentPath)+filesUrl,handler.archive); 533 533 break; 534 534 case 'move_to': … … 549 549 last_folder = last_folder ? last_folder : currentPath; 550 550 current_folder = current_folder ? current_folder : currentPath; 551 cExecute_( './index.php?menuaction=filemanager.uifilemanager.dir_ls&path='+base64_encode(currentPath)+'&criteria='+criteria+'&otype='+order_type+'&limit='+preferences.files_per_page+'&offset='+offset,folderList.drawFiles);551 cExecute_( URL_SERVER + '/index.php?menuaction=filemanager.uifilemanager.dir_ls&path='+base64_encode(currentPath)+'&criteria='+criteria+'&otype='+order_type+'&limit='+preferences.files_per_page+'&offset='+offset,folderList.drawFiles); 552 552 return; 553 553 case 'tools': 554 554 elements = new Array(); 555 555 elements[0] = { 'text' : get_lang('Preferences'), 556 'url' : 'preferences/preferences.php?appname=filemanager',556 'url' : URL_SERVER + '/preferences/preferences.php?appname=filemanager', 557 557 'img' : templatePath+'images/preferences.png'}; 558 558 elements[1] = { 'text' : get_lang('Search'), … … 564 564 'img' : templatePath+'images/button_createdir.png'}; 565 565 elements[3] = { 'text' : get_lang('Share Folders'), 566 'url' : "./index.php?menuaction=preferences.uiaclprefs.index&acl_app=filemanager",566 'url' : URL_SERVER + "/index.php?menuaction=preferences.uiaclprefs.index&acl_app=filemanager", 567 567 'img' : templatePath+'images/mime16_directory.png'}; 568 568 elements[4] = { 'text' : get_lang('View'), … … 584 584 if (password == null) 585 585 return; 586 cExecute_( './index.php?menuaction=filemanager.vfs_functions.unarchive&pswd='+base64_encode(password)+'&path='+base64_encode(currentPath)+'&file='+base64_encode(filename),handler.archive);586 cExecute_( URL_SERVER + '/index.php?menuaction=filemanager.vfs_functions.unarchive&pswd='+base64_encode(password)+'&path='+base64_encode(currentPath)+'&file='+base64_encode(filename),handler.archive); 587 587 } 588 588 function move_to(to,filesUrl){ 589 cExecute_( './index.php?menuaction=filemanager.vfs_functions.moveto&from='+base64_encode(currentPath)+'&to='+base64_encode(to)+filesUrl,handler.moveto);589 cExecute_( URL_SERVER + '/index.php?menuaction=filemanager.vfs_functions.moveto&from='+base64_encode(currentPath)+'&to='+base64_encode(to)+filesUrl,handler.moveto); 590 590 } 591 591 function copy_to(to,filesUrl){ 592 cExecute_( './index.php?menuaction=filemanager.vfs_functions.copyto&from='+base64_encode(currentPath)+'&to='+base64_encode(to)+filesUrl,handler.copyto);592 cExecute_(URL_SERVER + '/index.php?menuaction=filemanager.vfs_functions.copyto&from='+base64_encode(currentPath)+'&to='+base64_encode(to)+filesUrl,handler.copyto); 593 593 } 594 594 … … 597 597 switch(type){ 598 598 case 'preview': 599 var url = './index.php?menuaction=filemanager.vfs_functions.summary&file='+base64_encode(name)+"&path="+base64_encode(currentPath);599 var url = URL_SERVER + '/index.php?menuaction=filemanager.vfs_functions.summary&file='+base64_encode(name)+"&path="+base64_encode(currentPath); 600 600 var htmlData = '<img src=\"'+url+'\">'; 601 601 menuTimeout = setTimeout("draw_window_card(\'"+htmlData+"\')",500); 602 602 break; 603 603 case 'user': 604 var url = './index.php?menuaction=filemanager.user.card&lid='+base64_encode(name);604 var url = URL_SERVER + '/index.php?menuaction=filemanager.user.card&lid='+base64_encode(name); 605 605 menuTimeout = setTimeout("cExecute_('"+url+"',draw_window_card)",500); 606 606 break; … … 616 616 { 617 617 var parentDir = document.getElementById('folders_box').value; 618 cExecute_( './index.php?menuaction=filemanager.uifilemanager.createdir&path='+base64_encode(parentDir)+'&filename='+base64_encode(name),handler.refreshDir);618 cExecute_( URL_SERVER + '/index.php?menuaction=filemanager.uifilemanager.createdir&path='+base64_encode(parentDir)+'&filename='+base64_encode(name),handler.refreshDir); 619 619 currentPath = parentDir+'/'+name; 620 620 close_window(); … … 626 626 if (confirm(get_lang('Do you really want to remove folder: %1?',Dfolder), '')) 627 627 { 628 cExecute_( './index.php?menuaction=filemanager.uifilemanager.removedir&path='+base64_encode(crypt.encode(Dfolder)),handler.refreshDir);628 cExecute_( URL_SERVER + '/index.php?menuaction=filemanager.uifilemanager.removedir&path='+base64_encode(crypt.encode(Dfolder)),handler.refreshDir); 629 629 var lastIndex = Dfolder.lastIndexOf('/'); 630 630 currentPath = Dfolder.substr(0,lastIndex);
Note: See TracChangeset
for help on using the changeset viewer.