Make WordPress Core

Changeset 17880


Ignore:
Timestamp:
05/12/2011 01:53:51 AM (13 years ago)
Author:
azaozz
Message:

Improve code for DFW buttons, fix colors in some rare TinyMCE popups, see #17136

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r17860 r17880  
    17131713    // Distraction Free Writing mode
    17141714    if ( in_array( 'wpfullscreen', $plugins, true ) ) {
    1715         $enable = array();
    1716 
    1717         if ( in_array( 'AtD', $plugins, true ) )
    1718             $enable[] = 'AtD';
    1719 
    1720         wp_fullscreen_html($enable);
     1715        wp_fullscreen_html();
    17211716        wp_print_scripts('wp-fullscreen');
    17221717    }
     
    17401735}
    17411736
    1742 function wp_fullscreen_html( $extra = array() ) {
     1737function wp_fullscreen_html() {
    17431738    global $content_width, $post;
    17441739
     
    17601755
    17611756        <div id="wp-fullscreen-button-bar"><div id="wp-fullscreen-buttons" class="wp_themeSkin">
    1762             <div>
    1763             <a title="<?php _e('Bold (Ctrl + B)'); ?>" onclick="fullscreen.b();return false;" class="mceButton mceButtonEnabled mce_bold" href="#" id="wp_fs_bold" role="button" aria-pressed="false">
    1764             <span class="mceIcon mce_bold"></span>
    1765             </a>
    1766             </div>
    1767 
    1768             <div>
    1769             <a title="<?php _e('Italic (Ctrl + I)'); ?>" onclick="fullscreen.i();return false;" class="mceButton mceButtonEnabled mce_italic" href="#" id="wp_fs_italic" role="button" aria-pressed="false">
    1770             <span class="mceIcon mce_italic"></span>
    1771             </a>
    1772             </div>
    1773 
    1774             <div>
    1775             <span aria-orientation="vertical" role="separator" class="mceSeparator"></span>
    1776             </div>
    1777 
    1778             <div>
    1779             <a title="<?php _e('Unordered list (Alt + Shift + U)'); ?>" onclick="fullscreen.ul();return false;" onmousedown="return false;" class="mceButton mceButtonEnabled mce_bullist" href="#" id="wp_fs_bullist" role="button" aria-pressed="false">
    1780             <span class="mceIcon mce_bullist"></span>
    1781             </a>
    1782             </div>
    1783 
    1784             <div>
    1785             <a title="<?php _e('Ordered list (Alt + Shift + O)'); ?>" onclick="fullscreen.ol();return false;" class="mceButton mceButtonEnabled mce_numlist" href="#" id="wp_fs_numlist" role="button" aria-pressed="false">
    1786             <span class="mceIcon mce_numlist"></span>
    1787             </a>
    1788             </div>
    1789 
    1790             <div>
    1791             <span aria-orientation="vertical" role="separator" class="mceSeparator"></span>
    1792             </div>
    1793 
    1794             <div>
    1795             <a title="<?php _e('Blockquote (Alt+Shift+Q)'); ?>" onclick="fullscreen.blockquote();return false;" class="mceButton mceButtonEnabled mce_blockquote" href="#" id="wp_fs_blockquote" role="button" tabindex="-1">
    1796             <span class="mceIcon mce_blockquote"></span>
    1797             </a>
    1798             </div>
    1799 
    1800             <div class="wp-fullscreen-both">
    1801             <a title="<?php _e('Insert/edit image (Alt + Shift + M)'); ?>" onclick="jQuery('#add_image').click();return false;" class="mceButton mceButtonEnabled mce_image" href="#" id="wp_fs_image" role="button" tabindex="-1">
    1802             <span class="mceIcon mce_image"></span>
    1803             </a>
    1804             </div>
    1805 
    1806             <div class="wp-fullscreen-both">
    1807             <span aria-orientation="vertical" role="separator" class="mceSeparator"></span>
    1808             </div>
    1809 
    1810             <div class="wp-fullscreen-both">
    1811             <a title="<?php _e('Insert/edit link (Alt + Shift + A)'); ?>" onclick="fullscreen.link();return false;" class="mceButton mce_link mceButtonEnabled" href="#" id="wp_fs_link" role="button" aria-pressed="false">
    1812             <span class="mceIcon mce_link"></span>
    1813             </a>
    1814             </div>
    1815 
    1816             <div>
    1817             <a title="<?php _e('Unlink (Alt + Shift + S)'); ?>" onclick="fullscreen.unlink();return false;" class="mceButton mce_unlink mceButtonEnabled" href="#" id="wp_fs_unlink" role="button" aria-pressed="false">
    1818             <span class="mceIcon mce_unlink"></span>
    1819             </a>
    1820             </div>
    1821            
    1822             <div>
    1823             <span aria-orientation="vertical" role="separator" class="mceSeparator"></span>
    1824             </div>
    1825            
    1826 <?php   if ( in_array( 'AtD', $extra, true ) ) { ?>
    1827             <div>
    1828             <a title="<?php _e('Proofread Writing'); ?>" onclick="fullscreen.atd();return false;" class="mceButton mceButtonEnabled" href="#" id="wp_fs_spellchecker" role="button" aria-pressed="false">
    1829             <span class="mceIcon mce_spellchecker"></span>
    1830             </a>
    1831             </div>
    1832 <?php   } ?>
    1833 
    1834             <div>
    1835             <a title="<?php _e('Help (Alt + Shift + H)'); ?>" onclick="fullscreen.help();return false;" class="mceButton mce_help mceButtonEnabled" href="#" id="wp_fs_help" role="button" aria-pressed="false">
    1836             <span class="mceIcon mce_help"></span>
    1837             </a>
    1838             </div>
     1757<?php
     1758
     1759    $buttons = array(
     1760        // format: title, onclick, show in both editors
     1761        'bold' => array( 'title' => __('Bold (Ctrl + B)'), 'onclick' => 'fullscreen.b();', 'both' => false ),
     1762        'italic' => array( 'title' => __('Italic (Ctrl + I)'), 'onclick' => 'fullscreen.i();', 'both' => false ),
     1763        '0' => 'separator',
     1764        'bullist' => array( 'title' => __('Unordered list (Alt + Shift + U)'), 'onclick' => 'fullscreen.ul();', 'both' => false ),
     1765        'numlist' => array( 'title' => __('Ordered list (Alt + Shift + O)'), 'onclick' => 'fullscreen.ol();', 'both' => false ),
     1766        '1' => 'separator',
     1767        'blockquote' => array( 'title' => __('Blockquote (Alt+Shift+Q)'), 'onclick' => 'fullscreen.blockquote();', 'both' => false ),
     1768        'image' => array( 'title' => __('Insert/edit image (Alt + Shift + M)'), 'onclick' => "jQuery('#add_image').click();", 'both' => true ),
     1769        '2' => 'separator',
     1770        'link' => array( 'title' => __('Insert/edit link (Alt + Shift + A)'), 'onclick' => 'fullscreen.link();', 'both' => true ),
     1771        'unlink' => array( 'title' => __('Unlink (Alt + Shift + S)'), 'onclick' => 'fullscreen.unlink();', 'both' => false ),
     1772        '3' => 'separator',
     1773        'help' => array( 'title' => __('Help (Alt + Shift + H)'), 'onclick' => 'fullscreen.help();', 'both' => false )
     1774    );
     1775
     1776    $buttons = apply_filters( 'wp_fullscreen_buttons', $buttons );
     1777
     1778    foreach ( $buttons as $button => $args ) {
     1779        if ( 'separator' == $args ) { ?>
     1780            <div><span aria-orientation="vertical" role="separator" class="mceSeparator"></span></div>
     1781<?php       continue;
     1782        } ?>
     1783
     1784        <div<?php if ( $args['both'] ) { ?> class="wp-fullscreen-both"<?php } ?>>
     1785        <a title="<?php echo $args['title']; ?>" onclick="<?php echo $args['onclick']; ?>return false;" class="mceButton mceButtonEnabled mce_<?php echo $button; ?>" href="#" id="wp_fs_<?php echo $button; ?>" role="button" aria-pressed="false">
     1786        <span class="mceIcon mce_<?php echo $button; ?>"></span>
     1787        </a>
     1788        </div>
     1789<?php
     1790    } ?>
     1791
    18391792        </div></div>
    18401793
  • trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css

    r16950 r17880  
    119119.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
    120120.clearlooks2 a:hover {font-weight:bold;}
    121 .clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#E4F2FD}
     121.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#F9F9F9}
    122122.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
    123123.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
  • trunk/wp-includes/js/tinymce/wp-mce-help.php

    r17625 r17880  
    169169<body>
    170170
    171 <div id="wphead"><h1><?php echo get_bloginfo('blogtitle'); ?></h1></div>
    172 
    173171<ul id="tabs">
    174172    <li><a id="tab1" href="javascript:flipTab(1)" title="<?php _e('Basics of Rich Editing') ?>" accesskey="1" tabindex="1" class="current"><?php _e('Basics') ?></a></li>
Note: See TracChangeset for help on using the changeset viewer.