Ticket #2070: i18n-list-manip.diff
File i18n-list-manip.diff, 2.5 KB (added by , 19 years ago) |
---|
-
wp-admin/list-manipulation.js
old new 1 <?php 2 require_once '../wp-config.php'; 3 header('Content-Type: text/javascript; charset=utf-8'); 4 ?> 5 1 6 var listItems; 2 7 var reg_color = '#FFFFFF'; 3 8 var alt_color = '#F1F1F1'; … … 6 11 7 12 function deleteSomething( what, id, message ) { 8 13 what.replace('-', ' '); 9 if (!message) message = ' Are you sure you want to delete this' + what + '?';14 if (!message) message = '<?php echo addslashes(__('Are you sure you want to delete this')); ?>' + ' ' + what + '?'; 10 15 if ( confirm(message) ) { 11 16 return ajaxDelete( what.replace(' ', '-'), id ); 12 17 } else { … … 29 34 if ( ajaxDel.failed ) return true; 30 35 ajaxDel.myResponseElement = getResponseElement(); 31 36 ajaxDel.method = 'POST'; 32 ajaxDel.onLoading = function() { ajaxDel.myResponseElement.innerHTML = ' Sending Data...';};33 ajaxDel.onLoaded = function() { ajaxDel.myResponseElement.innerHTML = 'Data Sent...'; };34 ajaxDel.onInteractive = function() { ajaxDel.myResponseElement.innerHTML = 'Processing Data...'; };37 ajaxDel.onLoading = function() { ajaxDel.myResponseElement.innerHTML = '<?php echo addslashes(__('Sending Data...')); ?>';}; 38 ajaxDel.onLoaded = function() { ajaxDel.myResponseElement.innerHTML = '<?php echo addslashes(__('Data Sent...')); ?>'; }; 39 ajaxDel.onInteractive = function() { ajaxDel.myResponseElement.innerHTML = '<?php echo addslashes(__('Processing Data...')); ?>'; }; 35 40 ajaxDel.onCompletion = function() { removeThisItem( what + '-' + id ); }; 36 41 ajaxDel.runAJAX('action=delete-' + what + '&id=' + id); 37 42 return false; … … 41 46 var response = ajaxDel.response; 42 47 if ( isNaN(response) ) { alert(response); } 43 48 response = parseInt(response, 10); 44 if ( -1 == response ) { ajaxDel.myResponseElement.innerHTML = " You don't have permission to do that."; }45 else if ( 0 == response ) { ajaxDel.myResponseElement.interHTML = "Something odd happened. Try refreshing the page? Either that or what you tried to delete never existed in the first place."; }49 if ( -1 == response ) { ajaxDel.myResponseElement.innerHTML = "<?php echo addslashes(__("You don't have permission to do that.")); ?>"; } 50 else if ( 0 == response ) { ajaxDel.myResponseElement.interHTML = "<?php echo addslashes(__('Something odd happened. Try refreshing the page? Either that or what you tried to delete never existed in the first place.')); ?>"; } 46 51 else if ( 1 == response ) { 47 52 theItem = document.getElementById(id); 48 53 Fat.fade_element(id,null,700,'#FF3333');