Changeset 1741
- Timestamp:
- 12/03/09 10:31:28 (14 years ago)
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/inc/upload.php
r1694 r1741 95 95 { 96 96 97 $bo->vfs->cp(array(97 if ($bo->vfs->cp(array( 98 98 'from'=> $_FILES['upload_file']['tmp_name'][$i], 99 99 'to'=> $_FILES['upload_file']['name'][$i], 100 100 '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( 107 106 'mime_type' => $_FILES['upload_file']['type'][$i], 108 107 'comment' => stripslashes($_POST['upload_comment'][$i]) 109 108 ) 110 109 )); 110 else{ 111 $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('Your quota has exceeded the limit'); 112 return false; 113 } 111 114 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"; 113 116 } 114 117 } … … 129 132 )); 130 133 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"; 132 135 133 136 } -
sandbox/filemanager/js/common_functions.js
r1731 r1741 147 147 148 148 function setComments(el){ 149 if (el.innerHTML == "<"+get_lang('no comments')+">")150 var comment = "";151 else152 var comment = el.innerHTML;153 149 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); 165 151 } 166 152 … … 168 154 var returnVal = data.split(':'); 169 155 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);177 156 write_msg(get_lang('Updated comment for %1',returnVal[1])); 178 157 } -
sandbox/filemanager/js/draw_api.js
r1737 r1741 307 307 if (preferences.createdby_id =='1') newpage += fl.td+files[i].creatdby+'</td>'; 308 308 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 = "<"+get_lang("no comments")+">"; 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>'; 312 310 if (preferences.version =='1') newpage += fl.td+'<span onclick="loadHistory(\''+files[i].name+'\')">'+files[i].vers+'</span></td></tr>'; 313 311 } -
sandbox/filemanager/setup/phpgw_pt-br.lang
r1737 r1741 32 32 Note: Uploaded is limited to %1MB filemanager pt-br Nota: O tamanho máximo de envio é limitado a %1MB 33 33 This 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 semcomentários34 Click to change comments filemanager pt-br Clique para alterar comentários 35 35 created %1,%2 filemanager pt-br Criado %1, %2 36 36 created by filemanager pt-br Criado por … … 150 150 Resume filemanager pt-br Currículo 151 151 Impossible to edit this file filemanager pt-br Impossível editar o arquivo selecionado 152 Your quota has exceeded the limit filemanager pt-br Sua cota excedeu o limite 152 153 Enter with the name of new file/directory filemanager pt-br Insira o nome do novo arquivo/diretório 153 154 File extension forbidden or invalid file filemanager pt-br Formato de arquivo inválido -
sandbox/filemanager/templates/default/main.css
r1733 r1741 118 118 } 119 119 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 1139 1139 $data = array (); 1140 1140 } 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) 1145 1149 return false; 1146 1150
Note: See TracChangeset
for help on using the changeset viewer.