Ignore:
Timestamp:
12/10/09 15:26:19 (14 years ago)
Author:
amuller
Message:

Ticket #597 - Melhorias no modulo gerenciador de arquivos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/filemanager/js/draw_api.js

    r1803 r1804  
    99        } 
    1010} 
    11 document.onmousemove = getPointer; 
    1211 
    1312function loadHistory(filename){ 
     
    3332function close_window(){ 
    3433        var menu =  document.getElementById('dwindow'); 
    35         menu.style.visibility = 'hidden' 
     34        if (menu != null) 
     35                menu.style.visibility = 'hidden' 
    3636} 
    3737function draw_window(htmlData){ 
    3838        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>'; 
    4044        if (!menu){ 
    4145                menu = document.createElement('DIV'); 
    4246                menu.id = "dwindow"; 
    43                 menu.style.left = DocX - 500; 
     47                menu.style.left = DocX - 200; 
    4448                menu.style.width = "auto"; 
    4549                menu.style.top = DocY; 
    4650                menu.className = 'menubox'; 
    4751                menu.style.zIndex='1'; 
    48                 menu.innerHTML = htmlData+buttonClose; 
     52                menu.innerHTML = headerWin+htmlData; 
    4953                document.getElementById('divAppboxHeader').appendChild(menu); 
    5054        } 
    5155        else{ 
    52                 menu.innerHTML = htmlData+buttonClose; 
     56                menu.innerHTML = headerWin+htmlData; 
    5357                menu.style.visibility = 'visible'; 
    5458        } 
     
    6367                menu.style.left = DocX; 
    6468                menu.style.top = DocY; 
    65                 //menu.style.left = left_pos+"px"; 
    66                 //menu.style.top = top_pos+"px"; 
    6769                for(j in elements) 
    6870                { 
     
    276278} 
    277279folderList.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        } 
    280285} 
    281286folderList.prototype.drawFiles = function(data){ 
     
    381386                case 'new': 
    382387                        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()'}; 
    386390                        elements[1] = new Array(); 
    387391                        elements[1]['text'] = get_lang('File from model'); 
     
    389393                        address = address.split("?"); 
    390394                        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()'}; 
    396397                        draw_menu(arg,elements); 
    397398                        break; 
Note: See TracChangeset for help on using the changeset viewer.