Ticket #3181: 3181.2.diff
File 3181.2.diff, 3.3 KB (added by , 18 years ago) |
---|
-
wp-includes/js/quicktags-js.php
1 <?php @require_once('../../wp-config.php'); cache_javascript_headers(); ?> 1 2 // new edit toolbar used with permission 2 // by Alex King 3 // http://www.alexking.org/ 3 // by Alex King (www.alexking.org) 4 4 5 5 var edButtons = new Array(); 6 6 var edLinks = new Array(); … … 168 168 } 169 169 170 170 function edShowLinks() { 171 var tempStr = '<select onchange="edQuickLink(this.options[this.selectedIndex].value, this);"><option value="-1" selected> (Quick Links)</option>';171 var tempStr = '<select onchange="edQuickLink(this.options[this.selectedIndex].value, this);"><option value="-1" selected><?php echo js_escape(__('(Quick Links)')); ?></option>'; 172 172 for (i = 0; i < edLinks.length; i++) { 173 173 tempStr += '<option value="' + i + '">' + edLinks[i].display + '</option>'; 174 174 } … … 187 187 for (i = 0; i < edOpenTags.length; i++) { 188 188 if (edOpenTags[i] == button) { 189 189 edOpenTags.splice(i, 1); 190 document.getElementById(edButtons[button].id).value = 190 document.getElementById(edButtons[button].id).value = document.getElementById(edButtons[button].id).value.replace('/', ''); 191 191 } 192 192 } 193 193 } … … 248 248 } 249 249 } 250 250 if (word == '') { 251 word = prompt(' Enter a word to look up:', '');251 word = prompt('<?php echo js_escape(__('Enter a word to look up:')); ?>', ''); 252 252 } 253 253 if (word !== null && /^\w[\w ]*$/.test(word)) { 254 254 window.open('http://www.answers.com/' + escape(word)); … … 260 260 for (i = 0; i < edButtons.length; i++) { 261 261 edShowButton(edButtons[i], i); 262 262 } 263 document.write('<input type="button" id="ed_spell" class="ed_button" onclick="edSpell(edCanvas);" title=" Dictionary lookup" value="lookup" />');264 document.write('<input type="button" id="ed_close" class="ed_button" onclick="edCloseAllTags();" title=" Close all open tags" value="Close Tags" />');263 document.write('<input type="button" id="ed_spell" class="ed_button" onclick="edSpell(edCanvas);" title="<?php echo js_escape(__('Dictionary lookup')); ?>" value="<?php echo js_escape(__('lookup')); ?>" />'); 264 document.write('<input type="button" id="ed_close" class="ed_button" onclick="edCloseAllTags();" title="<?php echo js_escape(__('Close all open tags')); ?>" value="<?php echo js_escape(__('Close Tags')); ?>" />'); 265 265 // edShowLinks(); // disabled by default 266 266 document.write('</div>'); 267 267 } … … 366 366 defaultValue = 'http://'; 367 367 } 368 368 if (!edCheckOpenTags(i)) { 369 var URL = prompt(' Enter the URL' ,defaultValue);369 var URL = prompt('<?php echo js_escape(__('Enter the URL')); ?>' ,defaultValue); 370 370 if (URL) { 371 371 edButtons[i].tagStart = '<a href="' + URL + '">'; 372 372 edInsertTag(myField, i); … … 378 378 } 379 379 380 380 function edInsertImage(myField) { 381 var myValue = prompt(' Enter the URL of the image', 'http://');381 var myValue = prompt('<?php echo js_escape(__('Enter the URL of the image')); ?>', 'http://'); 382 382 if (myValue) { 383 383 myValue = '<img src="' 384 384 + myValue 385 + '" alt="' + prompt(' Enter a description of the image', '')385 + '" alt="' + prompt('<?php echo js_escape(__('Enter a description of the image')); ?>" />', '') 386 386 + '" />'; 387 387 edInsertContent(myField, myValue); 388 388 }