Changeset 3619 for branches/2.2/filemanager/js/handler.js
- Timestamp:
- 12/21/10 17:15:26 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/filemanager/js/handler.js
r3591 r3619 1 1 function handler(){ 2 2 } 3 handler.prototype.del = function(data){ 4 var returnVal = data.split('|'); 5 var deletedFiles = ""; 6 for (i=0; i < returnVal.length; i++) 7 if (returnVal[i] == 'False'){ 8 write_error(get_lang('Could not delete %1',returnVal[i+1])); 9 return; 10 }else 11 { 12 if (returnVal[i] != ""){ 13 deletedFiles += ", "+returnVal[i]; 14 /*var element = document.getElementById("name_"+returnVal[i]); 15 var pai = element.parentNode.parentNode.parentNode; 16 pai.parentNode.removeChild(pai);*/ 17 } 3 4 handler.prototype.del = function(data) 5 { 6 var _return = data; 7 var deletedFiles = ""; 8 9 _return = _return.substring(0, ( _return.length - 1 ) ); 10 _return = _return.split("|"); 11 12 13 for (var i = 0 ; i < _return.length; i++) 14 { 15 if ( _return[i] == 'False') 16 { 17 write_error(get_lang('Could not delete %1', _return[i+1]) ); 18 return; 19 } 20 else 21 { 22 if ( _return[i] != "" ) 23 { 24 deletedFiles += ", " + _return[i]; 25 } 26 18 27 if (i > 3) //to avoid big message 19 28 { 20 deletedFiles = " " + returnVal.length + " " +get_lang("files");29 deletedFiles = " " + _return.length + " " +get_lang("files"); 21 30 break; 22 31 } 23 } 24 write_msg(get_lang('Deleted %1',deletedFiles.substr(2))); 25 //Repaint stripes 32 } 33 } 34 35 write_msg(get_lang('Deleted %1',deletedFiles.substr(2))); 36 26 37 toolbar.control('reload'); 27 //folderList.drawStripes(); 28 } 38 39 } 40 29 41 handler.prototype.rename = function(data) { 30 42 if (data == null){ … … 62 74 63 75 } 64 handler.prototype.upload = function(data){ 65 close_window(); 76 77 handler.prototype.upload = function(data) 78 { 79 66 80 connector.hideProgressBar(); 67 81 var response = unserialize(data); … … 73 87 toolbar.control('reload'); 74 88 } 75 handler.prototype.restricted = function(data){ 89 90 handler.prototype.restricted = function(data) 91 { 76 92 if (data.indexOf("True") == 0){ 77 93 returnVal = data.split('|'); … … 91 107 write_error("Could not mark as restricted"); 92 108 } 93 handler.prototype.archive = function(data) { 109 110 handler.prototype.archive = function(data) 111 { 94 112 returnVal = data.split('|'); 95 113 if (returnVal[0] == 'False') … … 108 126 109 127 } 110 handler.prototype.updateComment = function (data) { 128 129 handler.prototype.updateComment = function (data) 130 { 111 131 var returnVal = data.split('|'); 112 132 if (data.indexOf("True") == 0) … … 174 194 } 175 195 176 handler.prototype.copyto = function (data) { 196 handler.prototype.copyto = function (data) 197 { 177 198 returnVal = data.split('|'); 178 199 if (returnVal[0] == 'NODIR') … … 188 209 } 189 210 } 211 190 212 handler.prototype.moveto = function (data) { 191 213 returnVal = data.split('|');
Note: See TracChangeset
for help on using the changeset viewer.