Changeset 1869 for sandbox/filemanager/js
- Timestamp:
- 12/17/09 15:16:25 (15 years ago)
- Location:
- sandbox/filemanager/js
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/js/common_functions.js
r1865 r1869 160 160 if (el.value == oldValue) return; 161 161 var filename = base64_encode(el.id); 162 cExecute('./index.php?menuaction=filemanager.vfs_functions.editComment&file='+filename+'&comment='+base64_encode(el.value), updateComment);162 cExecute('./index.php?menuaction=filemanager.vfs_functions.editComment&file='+filename+'&comment='+base64_encode(el.value),handler.updateComment); 163 163 } 164 164 … … 168 168 } 169 169 170 function updateComment(data) { 171 var returnVal = data.split(':'); 172 if (data.indexOf("True") == 0){ 173 write_msg(get_lang('Updated comment for %1',returnVal[1])); 174 } 175 else 176 { 177 if (returnVal[1] == "badchar") 178 write_error(get_lang('Comments cannot contain "%1"',returnVal[2])); 179 else 180 write_error(get_lang('You have no permission to access this file')); 181 } 182 183 } 170 184 171 function EditColumns(param){ 185 172 if (param == 'close') -
sandbox/filemanager/js/draw_api.js
r1865 r1869 459 459 if (files[i].checked){ 460 460 one_checked = true; 461 filesUrl += "&fileman["+j+"]="+ files[i].value;461 filesUrl += "&fileman["+j+"]="+base64_encode(files[i].value); 462 462 j++; 463 463 } … … 479 479 if (files[i].checked){ 480 480 one_checked = true; 481 filesUrl += "&fileman["+j+"]="+ files[i].value;481 filesUrl += "&fileman["+j+"]="+base64_encode(files[i].value); 482 482 j++; 483 483 } -
sandbox/filemanager/js/handler.js
r1865 r1869 2 2 } 3 3 handler.prototype.del = function(data){ 4 var returnVal = data.split(' :');4 var returnVal = data.split('|'); 5 5 var deletedFiles = ""; 6 6 for (i=0; i < returnVal.length; i++) … … 16 16 pai.parentNode.removeChild(pai); 17 17 } 18 if (i > 3) //to avoid big message 19 { 20 deletedFiles = " " +returnVal.length + " " +get_lang("files"); 21 break; 22 } 18 23 } 19 24 write_msg(get_lang('Deleted %1',deletedFiles.substr(2))); … … 26 31 } 27 32 else 28 var returnVal = data.split(' :');33 var returnVal = data.split('|'); 29 34 if ( returnVal[0] == "True" ){ 30 35 if (returnVal[1] != returnVal[2]) write_msg(get_lang('Renamed %1 to %2',returnVal[1],returnVal[2])); … … 44 49 else 45 50 { 46 if (returnVal[1] == "badchar") 47 write_error(get_lang('File names cannot contain "%1"',returnVal[2])); 48 else 49 if (returnVal[1] == "slashes") 50 write_error(get_lang('File names cannot contain \\ or /')); 51 if (returnVal[1] == "editing") 52 write_error(get_lang('This file is being edited right now')); 53 else 54 write_error(get_lang('Could not rename %1 to %2', returnVal[1], returnVal[2])); 51 if (returnVal[1] == "badchar") 52 write_error(get_lang('File names cannot contain "%1"',returnVal[2])); 53 else if (returnVal[1] == "slashes") 54 write_error(get_lang('File names cannot contain \\ or /')); 55 else if (returnVal[1] == "editing") 56 write_error(get_lang('This file is being edited right now')); 57 else 58 write_error(get_lang('Could not rename %1 to %2', returnVal[1], returnVal[2])); 55 59 } 56 60 … … 69 73 handler.prototype.restricted = function(data){ 70 74 if (data.indexOf("True") == 0){ 71 returnVal = data.split(' :');75 returnVal = data.split('|'); 72 76 var img_lock = document.getElementById('restrict_'+returnVal[1]); 73 77 if (img_lock.src.indexOf('button_unlock') > 0) … … 86 90 } 87 91 handler.prototype.archive = function(data) { 88 returnVal = data.split(' :');92 returnVal = data.split('|'); 89 93 if (returnVal[0] == 'False') 90 94 { … … 102 106 103 107 } 108 handler.prototype.updateComment = function (data) { 109 var returnVal = data.split('|'); 110 if (data.indexOf("True") == 0) 111 { 112 write_msg(get_lang('Updated comment for %1',returnVal[1])); 113 } 114 else 115 { 116 if (returnVal[1] == "badchar") 117 write_error(get_lang('Comments cannot contain "%1"',returnVal[2])); 118 else 119 write_error(get_lang('You have no permission to access this file')); 120 } 121 122 } 104 123 105 124 var handler = new handler();
Note: See TracChangeset
for help on using the changeset viewer.