Changeset 1741


Ignore:
Timestamp:
12/03/09 10:31:28 (14 years ago)
Author:
amuller
Message:

Ticket #597 - Melhorias no módulos gerenciador de arquivos do expresso livre

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sandbox/filemanager/inc/upload.php

    r1694 r1741  
    9595                        { 
    9696 
    97                                 $bo->vfs->cp(array( 
     97                                if ($bo->vfs->cp(array( 
    9898                                        'from'=> $_FILES['upload_file']['tmp_name'][$i], 
    9999                                        'to'=> $_FILES['upload_file']['name'][$i], 
    100100                                        'relatives'     => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) 
    101                                 )); 
    102  
    103                                 $bo->vfs->set_attributes(array( 
    104                                         'string'=> $_FILES['upload_file']['name'][$i], 
    105                                         'relatives'     => array(RELATIVE_ALL), 
    106                                         'attributes'=> array( 
     101                                ))) 
     102                                        $bo->vfs->set_attributes(array( 
     103                                                'string'=> $_FILES['upload_file']['name'][$i], 
     104                                                'relatives'     => array(RELATIVE_ALL), 
     105                                                'attributes'=> array( 
    107106                                                'mime_type' => $_FILES['upload_file']['type'][$i], 
    108107                                                'comment' => stripslashes($_POST['upload_comment'][$i]) 
    109108                                        ) 
    110109                                )); 
     110                                else{ 
     111                                        $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('Your quota has exceeded the limit'); 
     112                                        return false; 
     113                                } 
    111114 
    112                                  $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $_FILES['upload_file']['size'][$i])."\n"; 
     115                                 $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $bo->borkb($_FILES['upload_file']['size'][$i]))."\n"; 
    113116                        } 
    114117                } 
     
    129132                        )); 
    130133 
    131                          $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $file_size[$i])."\n"; 
     134                         $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $bo->borkb($file_size[$i]))."\n"; 
    132135 
    133136                } 
  • sandbox/filemanager/js/common_functions.js

    r1731 r1741  
    147147 
    148148function setComments(el){ 
    149         if (el.innerHTML == "<"+get_lang('no comments')+">") 
    150                 var comment = ""; 
    151         else 
    152                 var comment = el.innerHTML; 
    153149        var filename = base64_encode(el.id); 
    154         input_el = document.createElement('INPUT'); 
    155         input_el.id = "inputTemp"+el.id; 
    156         if (comment.length > 0) 
    157                 input_el.size = comment.length; 
    158         input_el.maxlength = "255"; 
    159         input_el.value = comment; 
    160         el.parentNode.appendChild(input_el); 
    161         el.parentNode.removeChild(el); 
    162         input_el.focus(); 
    163         input_el.onblur = function () { cExecute('/index.php?menuaction=filemanager.vfs_functions.editComment&file='+ 
    164                         filename+'&comment='+base64_encode(this.value),updateComment); }; 
     150        cExecute('/index.php?menuaction=filemanager.vfs_functions.editComment&file='+filename+'&comment='+base64_encode(el.value),updateComment); 
    165151} 
    166152 
     
    168154        var returnVal = data.split(':'); 
    169155        if (data.indexOf("True") == 0){ 
    170                 var input_el = document.getElementById("inputTemp"+returnVal[1]); 
    171                 span_comment = document.createElement('span'); 
    172                 span_comment.innerHTML = input_el.value; 
    173                 span_comment.id=returnVal[1]; 
    174                 span_comment.onclick=function () { setComments(span_comment) }; 
    175                 input_el.parentNode.appendChild(span_comment); 
    176                 input_el.parentNode.removeChild(input_el); 
    177156                write_msg(get_lang('Updated comment for %1',returnVal[1])); 
    178157        } 
  • sandbox/filemanager/js/draw_api.js

    r1737 r1741  
    307307                if (preferences.createdby_id =='1') newpage += fl.td+files[i].creatdby+'</td>'; 
    308308                if (preferences.modifiedby_id =='1') newpage += fl.td+files[i].modifdby+'</td>'; 
    309                 if (files[i].comm == null || files[i].comm.length == 0) 
    310                         files[i].comm = "&lt;"+get_lang("no comments")+"&gt;"; 
    311                 if (preferences.comment =='1') newpage += fl.td+'<span id="'+files[i].name+'" onclick="setComments(this)">'+files[i].comm+'</span></td>'; 
     309                if (preferences.comment =='1') newpage += fl.td+'<input id="'+files[i].name+'" class="inputComment" onblur="setComments(this)" value="'+files[i].comm+'" alt="'+get_lang('Click to change comments')+'" title="'+get_lang('Click to change comments')+'"></input></td>'; 
    312310                if (preferences.version =='1') newpage += fl.td+'<span onclick="loadHistory(\''+files[i].name+'\')">'+files[i].vers+'</span></td></tr>'; 
    313311        } 
  • sandbox/filemanager/setup/phpgw_pt-br.lang

    r1737 r1741  
    3232Note: Uploaded is limited to %1MB       filemanager     pt-br   Nota: O tamanho máximo de envio é limitado a %1MB 
    3333This property will change the visibility of all users that have access to this file, continue?  filemanager     pt-br   Esta propriedade altera visibilidade dos usuários que estão compartilhados, deseja continuar? 
    34 no comments     filemanager     pt-br   sem comentários 
     34Click to change comments        filemanager     pt-br   Clique para alterar comentários 
    3535created %1,%2   filemanager     pt-br   Criado %1, %2 
    3636created by      filemanager     pt-br   Criado por 
     
    150150Resume  filemanager     pt-br   Currículo 
    151151Impossible to edit this file    filemanager     pt-br   Impossível editar o arquivo selecionado 
     152Your quota has exceeded the limit       filemanager     pt-br   Sua cota excedeu o limite 
    152153Enter with the name of new file/directory       filemanager     pt-br   Insira o nome do novo arquivo/diretório 
    153154File extension forbidden or invalid file        filemanager     pt-br   Formato de arquivo inválido 
  • sandbox/filemanager/templates/default/main.css

    r1733 r1741  
    118118} 
    119119 
     120.inputComment { 
     121        border: 0px !important; 
     122        color: #3f3f3f !important; 
     123        background: transparent !important; 
     124} 
  • trunk/phpgwapi/inc/class.vfs_sql.inc.php

    r1726 r1741  
    11391139                                $data = array (); 
    11401140                        } 
    1141                         $path = explode('/',$data['to']); 
    1142                         $quota = $this->get_quota(array('string' => '/'.$path[1].'/'.$path[2])); 
    1143                         $size = $this->get_size(array('string' => '/'.$path[1].'/'.$path[2], 'relatives' => $data['relatives'][1])); 
    1144                         if ($quota > 0 && $size >= $quota * 1024 * 1024) 
     1141                        if ($data['relatives'][1] == RELATIVE_NONE) 
     1142                                $path = explode(SEP,$data['to']); 
     1143                        else 
     1144                                $path = explode(SEP,$this->my_home); 
     1145                        $quota = $this->get_quota(array('string' => SEP.$path[1].SEP.$path[2])); 
     1146                        $size = $this->get_size(array('string' => SEP.$path[1].SEP.$path[2], 'relatives' => $data['relatives'][1])); 
     1147 
     1148                        if ($quota > 0 && ($quota * 1024 * 1024) < $size) 
    11451149                                return false; 
    11461150 
Note: See TracChangeset for help on using the changeset viewer.