Refactor Quicktags, props garyc40, see #16695

git-svn-id: https://develop.svn.wordpress.org/trunk@18497 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2011-08-03 10:11:12 +00:00
parent 27e866dfd1
commit d5a6cf3dfd
5 changed files with 456 additions and 546 deletions

View File

@ -548,8 +548,12 @@ $(document).ready(function(){
commentReply.init();
$(document).delegate('span.delete a.delete', 'click', function(){return false;});
if ( typeof QTags != 'undefined' )
ed_reply = new QTags('ed_reply', 'replycontent', 'replycontainer', 'more,fullscreen');
if ( typeof QTags != 'undefined' ) {
quicktags({quicktags_id: 'replycontent', quicktags_buttons: 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close'});
console.debug('typeof QTags')
}
if ( typeof $.table_hotkeys != 'undefined' ) {
make_hotkeys_redirect = function(which) {

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -67,9 +67,8 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", false, '1.6.1', 1 );
$scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20110502', 1 );
$scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20110802', 1 );
$scripts->add_script_data( 'quicktags', 'quicktagsL10n', array(
'quickLinks' => __('(Quick Links)'),
'wordLookup' => __('Enter a word to look up:'),
'dictionaryLookup' => esc_attr(__('Dictionary lookup')),
'lookup' => esc_attr(__('lookup')),
@ -265,7 +264,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'admin-custom-fields', "/wp-admin/js/custom-fields$suffix.js", array('wp-lists'), '20110429', 1 );
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'jquery-query'), '20110602', 1 );
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'jquery-query'), '20110802', 1 );
$scripts->add_script_data( 'admin-comments', 'adminCommentsL10n', array(
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']),