Changeset 1804 for sandbox/filemanager/js/common_functions.js
- Timestamp:
- 12/10/09 15:26:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/js/common_functions.js
r1803 r1804 66 66 67 67 } 68 69 } 70 68 } 69 function newUpload(data){ 70 if (data == null) 71 { 72 address = document.location.toString(); 73 address = address.split("?"); 74 var url = address[0]+"?menuaction=filemanager.uifilemanager.showUploadboxes&path="+base64_encode(currentPath); 75 cExecute(url,newUpload); 76 } 77 else{ 78 draw_window(data); 79 } 80 } 71 81 72 82 /* … … 332 342 return parseInt(size/gbyte).toFixed(1) + 'GB'; 333 343 } 344 function addNewInput(){ 345 var line = document.getElementById('uploadOption'); 346 var newElement = document.createElement('TR'); 347 var newElement2 = document.createElement('TD'); 348 var newElement3 = document.createElement('TD'); 349 newElement2.innerHTML = '<input onchange="javascript:addNewInput();" maxlength="255" name="upload_file[]" type="file">'; 350 newElement3.innerHTML = '<input name="upload_comment[]" type="text">'; 351 newElement.appendChild(newElement2); 352 newElement.appendChild(newElement3); 353 line.parentNode.appendChild(newElement); 354 document.getElementById('show_upload_boxes').value +=1; 355 } 356 357 function sendFiles(){ 358 cExecuteForm(document.getElementById('form_up'),handler_upload); 359 document.getElementById('button_up').style.visibility = "hidden"; 360 var line = document.getElementById('uploadOption'); 361 line.parentNode.innerHTML = "<img src='"+templatePath+"images/progress.gif'>"; 362 } 363 364 function handler_upload(data){ 365 close_window(); 366 connector.hideProgressBar(); 367 var response = unserialize(data); 368 if (response[0] == "Ok") 369 write_msg('All files created sucessfuly'); 370 else 371 for (var i=0;i < response.length; i++) 372 write_error(response[i]); 373 toolbar.control('reload'); 374 }
Note: See TracChangeset
for help on using the changeset viewer.