Changeset 1804 for sandbox/filemanager/js/draw_api.js
- Timestamp:
- 12/10/09 15:26:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/js/draw_api.js
r1803 r1804 9 9 } 10 10 } 11 document.onmousemove = getPointer;12 11 13 12 function loadHistory(filename){ … … 33 32 function close_window(){ 34 33 var menu = document.getElementById('dwindow'); 35 menu.style.visibility = 'hidden' 34 if (menu != null) 35 menu.style.visibility = 'hidden' 36 36 } 37 37 function draw_window(htmlData){ 38 38 var menu = document.getElementById('dwindow'); 39 buttonClose = '<input value="'+get_lang('close')+'" onclick="close_window()" type="button">'; 39 headerWin = '<div class="message_header" style="width: 100%; heigth: 22px;"'+ 40 ' onselectstart="return false">'+ 41 '<img align="right" alt="'+get_lang('close')+'" title="'+get_lang('close')+'" '+ 42 'onclick="close_window()" src="'+templatePath+'/images/button_cancel.png">'+ 43 get_lang('filemanager')+'</div>'; 40 44 if (!menu){ 41 45 menu = document.createElement('DIV'); 42 46 menu.id = "dwindow"; 43 menu.style.left = DocX - 500;47 menu.style.left = DocX - 200; 44 48 menu.style.width = "auto"; 45 49 menu.style.top = DocY; 46 50 menu.className = 'menubox'; 47 51 menu.style.zIndex='1'; 48 menu.innerHTML = h tmlData+buttonClose;52 menu.innerHTML = headerWin+htmlData; 49 53 document.getElementById('divAppboxHeader').appendChild(menu); 50 54 } 51 55 else{ 52 menu.innerHTML = h tmlData+buttonClose;56 menu.innerHTML = headerWin+htmlData; 53 57 menu.style.visibility = 'visible'; 54 58 } … … 63 67 menu.style.left = DocX; 64 68 menu.style.top = DocY; 65 //menu.style.left = left_pos+"px";66 //menu.style.top = top_pos+"px";67 69 for(j in elements) 68 70 { … … 276 278 } 277 279 folderList.prototype.updateQuota = function(quotaSize,usedSpace){ 278 if (parseInt(quotaSize) != 0) 279 document.getElementById('content_quota').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>'; 280 if (parseInt(quotaSize) != 0){ 281 var contentQuota = document.getElementById('content_quota'); 282 if (contentQuota != null) 283 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>'; 284 } 280 285 } 281 286 folderList.prototype.drawFiles = function(data){ … … 381 386 case 'new': 382 387 elements = new Array(); 383 elements[0] = new Array(); 384 elements[0]['text'] = get_lang('empty file'); 385 elements[0]['url'] = 'javascript:newEmptyFile();'; 388 elements[0] = { 'text': get_lang('empty file'), 389 'url': 'javascript:newEmptyFile()'}; 386 390 elements[1] = new Array(); 387 391 elements[1]['text'] = get_lang('File from model'); … … 389 393 address = address.split("?"); 390 394 elements[1]['url'] = address[0]+"?menuaction=filemanager.uifilemanager.fileModels"; 391 elements[2] = new Array(); 392 elements[2]['text'] = get_lang('Upload'); 393 address = document.location.toString(); 394 address = address.split("?"); 395 elements[2]['url'] = address[0]+"?menuaction=filemanager.uifilemanager.index&upload=clicked&upload.x=1&path="+base64_encode(currentPath); 395 elements[2] = { 'text' : get_lang('Upload'), 396 'url': 'javascript:newUpload()'}; 396 397 draw_menu(arg,elements); 397 398 break;
Note: See TracChangeset
for help on using the changeset viewer.