Changeset 3879 for branches/2.2/filemanager/js/common_functions.js
- Timestamp:
- 03/18/11 18:18:12 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/filemanager/js/common_functions.js
r3679 r3879 98 98 99 99 var pArgs = unserialize(data); 100 pArgs.lang_add_file = get_lang("Add file");101 100 pArgs.lang_click_here = get_lang("Click here"); 102 101 pArgs.lang_more_files = get_lang("More files"); … … 104 103 pArgs.height = 210; 105 104 pArgs.path_filemanager = path_filemanager; 106 pArgs.width = 450;105 pArgs.width = 500; 107 106 108 107 var _html = Xtools.parse( Xtools.xml("upload_files"), "upload.xsl", pArgs ); … … 233 232 234 233 235 function setRestricted(name){ 234 function setRestricted(name) 235 { 236 236 var continue_set = confirm(get_lang('This property will change the visibility of all users that have access to this file, continue?')); 237 if (continue_set) 238 cExecute_('./index.php?menuaction=filemanager.vfs_functions.setRestricted&file='+base64_encode(name)+'&path='+base64_encode(currentPath),handler.restricted); 239 } 240 241 function presetComments(el){ 237 238 if ( continue_set ) 239 { 240 cExecute_('./index.php?menuaction=filemanager.vfs_functions.setRestricted&file=' 241 + base64_encode(name)+'&path='+base64_encode(currentPath),handler.restricted); 242 } 243 } 244 245 function presetComments(el) 246 { 242 247 if (permissions['edit'] == 0){ 243 248 el.blur(); … … 247 252 } 248 253 249 function setComments(el){ 250 if (el.value == oldValue) return; 254 function setComments(el) 255 { 256 if ( el.value == oldValue ) 257 return; 258 251 259 var filename = base64_encode(el.id); 252 cExecute_('./index.php?menuaction=filemanager.vfs_functions.editComment&file='+filename+'&comment='+base64_encode(el.value),handler.updateComment); 260 261 cExecute_('./index.php?menuaction=filemanager.vfs_functions.editComment&file=' 262 + filename+'&comment='+base64_encode(el.value), handler.updateComment); 253 263 } 254 264 … … 320 330 width : 250, 321 331 height : 290, 322 top : 100,323 left : 400,332 top : 100, 333 left : 400, 324 334 draggable : true, 325 visible : "display",335 visible : "display", 326 336 resizable : true, 327 337 zindex : zIndex++, 328 338 title : "Expresso FileManager - " + get_lang('View'), 329 closeAction : "remove",339 closeAction : "remove", 330 340 content : Xtools.parse(Xtools.xml("view_config"), "view.xsl", pTools) 331 341 }; … … 369 379 if (size < kbyte) 370 380 { 371 return size + ' B';381 return size + ' B'; 372 382 } 373 383 else if (size < mbyte) 374 384 { 375 return parseInt(size/kbyte) + ' KB';385 return parseInt(size/kbyte) + ' KB'; 376 386 } 377 387 else if (size < gbyte) 378 388 { 379 389 if ( size/mbyte > 100) 380 return (size/mbyte).toFixed(0) + ' MB';390 return (size/mbyte).toFixed(0) + ' MB'; 381 391 else 382 return (size/mbyte).toFixed(1) + ' MB';392 return (size/mbyte).toFixed(1) + ' MB'; 383 393 } 384 394 else 385 395 { 386 return (size/gbyte).toFixed(1) + ' GB';396 return (size/gbyte).toFixed(1) + ' GB'; 387 397 } 388 398 } … … 391 401 { 392 402 var newElement = document.createElement('div'); 393 newElement.innerHTML = '<input maxlength="255" name="upload_file[]" type="file" style="margin-right:5px;" />' + 394 '<input name="upload_comment[]" type="text" style="margin-right:2px;" />' + 395 '<span style="color:red; cursor:pointer;" onclick="removeInput(this);">'+get_lang('delete')+'</span>'; 403 newElement.innerHTML = '<div></div>' + 404 '<input maxlength="255" name="upload_file[]" type="file" style="margin-right:5px;" />' + 405 '<input name="upload_comment[]" type="text" style="margin-right:2px;" />' + 406 '<span style="color:red; cursor:pointer;" onclick="removeInput(this);">'+get_lang('delete')+'</span>'; 396 407 397 408 document.getElementById('uploadOption').parentNode.appendChild(newElement); … … 447 458 { 448 459 var _formUp = document.getElementById('form_up'); 449 var _uploadFiles = document.getElementsByTagName('input');460 var _uploadFiles = document.getElementsByTagName('input'); 450 461 var _flagSend = true; 451 462 … … 463 474 464 475 if( _flagSend ) 465 { 466 cExecuteForm_( _formUp ,handler.upload); 467 } 476 cExecuteForm_( _formUp , handler.upload ); 468 477 else 469 478 write_msg(get_lang("No file(s) to send") + "!"); 470 471 close_window(); 472 } 479 }
Note: See TracChangeset
for help on using the changeset viewer.