Make WordPress Core


Ignore:
Timestamp:
02/18/2014 06:31:30 AM (13 years ago)
Author:
azaozz
Message:

TinyMCE: style the modals to match WordPress admin (first-run). Fix couple of IE problems in tiny_mce_popup.js. Props avryl, see #26952, see #24067

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/wp-mce-help.php

    r26876 r27190  
    1616<title><?php _e('Rich Editor Help'); ?></title>
    1717<script type="text/javascript" src="tiny_mce_popup.js?ver=358-20121205"></script>
    18 <?php
    19 wp_admin_css( 'wp-admin', true );
    20 ?>
     18<?php wp_admin_css( 'wp-admin', true ); ?>
    2119<style type="text/css">
     20
     21        html {
     22                background: #fcfcfc;
     23                overflow: hidden;
     24        }
     25
    2226        body {
    2327                min-width: 0;
    2428        }
    25         #wphead {
    26                 font-size: 80%;
    27                 border-top: 0;
    28                 color: #555;
    29                 background-color: #f1f1f1;
    30         }
    31         #wphead h1 {
    32                 font-size: 24px;
    33                 color: #555;
     29
     30        #tabs-wrap {
     31                position: absolute;
     32                top: 0;
     33        }
     34
     35        #tabs {
     36                box-shadow: 0 3px 5px rgba( 255, 255, 255, 0.2 );
    3437                margin: 0;
    35                 padding: 10px;
    36         }
    37         #tabs {
    38                 padding: 15px 15px 3px;
    39                 background-color: #f1f1f1;
    40                 border-bottom: 1px solid #dfdfdf;
     38                padding: 0;
     39                position: relative;
     40                -webkit-user-select: none;
     41                -moz-user-select: none;
     42                -ms-user-select: none;
     43                user-select: none;
     44        }
     45
     46        #tabs a {
     47                -webkit-transition: none;
     48                transition: none;
     49        }
     50       
     51        #tabs-wrap #tabs > a {
     52                float: left;
     53                font-size: 14px;
     54                height: 18px;
     55                line-height: 18px;
    4156                margin: 0;
    42         }
    43         #tabs li {
    44                 display: inline;
    45         }
    46         #tabs a.current {
     57                padding: 7px 10px;
     58                position: relative;
     59                text-decoration: none;
     60                border-right: 1px solid #ddd;
     61                background-color: #eee;
     62                color: inherit;
     63        }
     64
     65        #tabs > a:active,
     66        #tabs > a:focus {
     67                outline: none;
     68        }
     69
     70        #tabs-wrap #tabs .active,
     71        #tabs-wrap #tabs .active:hover {
     72                color: #333;
     73                background: #fff;
     74                border-bottom: 1px solid #fff;
     75        }
     76
     77        #tabs .active:after {
     78                display: none;
     79        }
     80
     81        #flipper {
    4782                background-color: #fff;
    48                 border-color: #dfdfdf;
    49                 border-bottom-color: #fff;
    50                 color: #d54e21;
    51         }
    52         #tabs a {
    53                 color: #2583AD;
    54                 padding: 6px;
    55                 border-width: 1px 1px 0;
    56                 border-style: solid solid none;
    57                 border-color: #f1f1f1;
    58                 text-decoration: none;
    59         }
    60         #tabs a:hover {
    61                 color: #d54e21;
    62         }
    63         .wrap h2 {
    64                 border-bottom-color: #dfdfdf;
    65                 color: #555;
    66                 margin: 5px 0;
    67                 padding: 0;
    68                 font-size: 18px;
    69         }
    70         #user_info {
    71                 right: 5%;
    72                 top: 5px;
    73         }
    74         h3 {
    75                 font-size: 1.1em;
    76                 margin-top: 10px;
    77                 margin-bottom: 0px;
    78         }
    79         #flipper {
     83                border-top: 1px solid #ddd;
     84                height: 360px;
    8085                margin: 0;
    81                 padding: 5px 20px 10px;
    82                 background-color: #fff;
    83                 border-left: 1px solid #dfdfdf;
    84                 border-bottom: 1px solid #dfdfdf;
    85         }
    86         * html {
    87         overflow-x: hidden;
    88         overflow-y: scroll;
    89     }
    90         #flipper div p {
    91                 margin-top: 0.4em;
    92                 margin-bottom: 0.8em;
    93                 text-align: justify;
    94         }
     86                margin-top: 32px;
     87                overflow-y: scroll;
     88                padding: 10px 16px;
     89        }
     90
    9591        th {
    9692                text-align: center;
    9793        }
     94
    9895        .top th {
    9996                text-decoration: underline;
    10097        }
     98
    10199        .top .key {
    102100                text-align: center;
    103101                width: 5em;
    104102        }
    105         .top .action {
    106                 text-align: left;
    107         }
    108         .align {
    109                 border-left: 3px double #333;
    110                 border-right: 3px double #333;
    111         }
     103
    112104        .keys {
     105                border: 0 none;
    113106                margin-bottom: 15px;
    114107                width: 100%;
    115                 border: 0 none;
    116         }
     108        }
     109
    117110        .keys p {
    118111                display: inline-block;
    … …  
    120113                padding: 0px;
    121114        }
    122         .keys .left { text-align: left; }
    123         .keys .center { text-align: center; }
    124         .keys .right { text-align: right; }
    125         td b {
    126                 font-family: "Times New Roman" Times serif;
    127         }
    128         #buttoncontainer {
     115
     116        .keys .left {
     117                text-align: left;
     118        }
     119
     120        .keys .center {
    129121                text-align: center;
    130                 margin-bottom: 20px;
    131         }
    132         #buttoncontainer a, #buttoncontainer a:hover {
    133                 border-bottom: 0px;
    134         }
     122        }
     123
     124        .keys .right {
     125                text-align: right;
     126        }
     127
    135128        .macos .win,
    136129        .windows .mac {
    137130                display: none;
    138131        }
     132
    139133</style>
    140134<?php if ( is_rtl() ) : ?>
    141135<style type="text/css">
    142         #wphead, #tabs {
    143                 padding-left: auto;
    144                 padding-right: 15px;
    145         }
    146         #flipper {
    147                 margin: 5px 0 3px 10px;
    148         }
    149         .keys .left, .top, .action { text-align: right; }
    150         .keys .right { text-align: left; }
    151         td b { font-family: Tahoma, "Times New Roman", Times, serif }
     136
     137        .keys .left {
     138                text-align: right;
     139        }
     140
     141        .keys .right {
     142                text-align: left;
     143        }
     144
    152145</style>
    153146<?php endif; ?>
    … …  
    159152</script>
    160153
    161 <ul id="tabs">
    162         <li><a id="tab1" href="javascript:flipTab(1)" title="<?php esc_attr_e('Basics of Rich Editing'); ?>" accesskey="1" class="current"><?php _e('Basics'); ?></a></li>
    163         <li><a id="tab2" href="javascript:flipTab(2)" title="<?php esc_attr_e('Advanced use of the Rich Editor'); ?>" accesskey="2"><?php _e('Advanced'); ?></a></li>
    164         <li><a id="tab3" href="javascript:flipTab(3)" title="<?php esc_attr_e('Hotkeys'); ?>" accesskey="3"><?php _e('Hotkeys'); ?></a></li>
    165         <li><a id="tab4" href="javascript:flipTab(4)" title="<?php esc_attr_e('About the software'); ?>" accesskey="4"><?php _e('About'); ?></a></li>
    166 </ul>
     154<div id="tabs-wrap">
     155        <div id="tabs">
     156                <a id="tab1" href="javascript:flipTab(1)" title="<?php esc_attr_e('Basics of Rich Editing'); ?>" accesskey="1" class="active"><?php _e('Basics'); ?></a>
     157                <a id="tab2" href="javascript:flipTab(2)" title="<?php esc_attr_e('Advanced use of the Rich Editor'); ?>" accesskey="2"><?php _e('Advanced'); ?></a>
     158                <a id="tab3" href="javascript:flipTab(3)" title="<?php esc_attr_e('Hotkeys'); ?>" accesskey="3"><?php _e('Hotkeys'); ?></a>
     159                <a id="tab4" href="javascript:flipTab(4)" title="<?php esc_attr_e('About the software'); ?>" accesskey="4"><?php _e('About'); ?></a>
     160        </div>
     161</div>
    167162
    168163<div id="flipper" class="wrap">
    … …  
    173168        <p><?php _e('WordPress includes a rich HTML editor that works well in all major web browsers used today. However editing HTML is not the same as typing text. Each web page has two major components: the structure, which is the actual HTML code and is produced by the editor as you type, and the display, that is applied to it by the currently selected WordPress theme and is defined in style.css. WordPress is producing valid XHTML 1.0 which means that inserting multiple line breaks (BR tags) after a paragraph would not produce white space on the web page. The BR tags will be removed as invalid by the internal HTML correcting functions.'); ?></p>
    174169        <p><?php _e('While using the editor, most basic keyboard shortcuts work like in any other text editor. For example: Shift+Enter inserts line break, Ctrl+C = copy, Ctrl+X = cut, Ctrl+Z = undo, Ctrl+Y = redo, Ctrl+A = select all, etc. (on Mac use the Command key instead of Ctrl). See the Hotkeys tab for all available keyboard shortcuts.'); ?></p>
    175     <p><?php _e('If you do not like the way the rich editor works, you may turn it off from Your Profile submenu, under Users in the admin menu.'); ?></p>
     170        <p><?php _e('If you do not like the way the rich editor works, you may turn it off from Your Profile submenu, under Users in the admin menu.'); ?></p>
    176171</div>
    177172
    … …  
    190185<div id="content3" class="hidden">
    191186        <h2><?php _e('Writing at Full Speed'); ?></h2>
    192     <p><?php _e('Rather than reaching for your mouse to click on the toolbar, use these access keys. Windows and Linux use Ctrl + letter. Macintosh uses Command + letter.'); ?></p>
     187        <p><?php _e('Rather than reaching for your mouse to click on the toolbar, use these access keys. Windows and Linux use Ctrl + letter. Macintosh uses Command + letter.'); ?></p>
    193188
    194189        <table class="keys">
    … …  
    229224        <h2><?php _e('About TinyMCE'); ?></h2>
    230225
    231     <p><?php _e('Version:'); ?> <span id="version"></span> (<span id="date"></span>)</p>
     226        <p><?php _e('Version:'); ?> <span id="version"></span> (<span id="date"></span>)</p>
    232227        <p><?php printf(__('TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor released as Open Source under %sLGPL</a> by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.'), '<a href="'.home_url('/wp-includes/js/tinymce/license.txt').'" target="_blank" title="'.esc_attr__('GNU Library General Public License').'">'); ?></p>
    233228        <p><?php _e('Copyright &copy; 2003-2014, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.'); ?></p>
    … …  
    235230</div>
    236231
    237 </div>
    238 
    239 <div class="mceActionPanel">
    240         <div style="margin: 8px auto; text-align: center;padding-bottom: 10px;">
    241                 <input type="button" id="cancel" name="cancel" value="<?php esc_attr_e('Close'); ?>" title="<?php esc_attr_e('Close'); ?>" onclick="tinyMCEPopup.close();" />
    242         </div>
    243232</div>
    244233<script type="text/javascript">
    … …  
    253242                        if ( n == i ) {
    254243                                c.className = '';
    255                                 t.className = 'current';
     244                                t.className = 'active';
    256245                        } else {
    257246                                c.className = 'hidden';
    … …  
    261250        }
    262251
    263     tinyMCEPopup.onInit.add(function() {
    264         var win = tinyMCEPopup.getWin();
     252        tinyMCEPopup.onInit.add(function() {
     253                var win = tinyMCEPopup.getWin();
    265254
    266255                d('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
    267         d('date').innerHTML = tinymce.releaseDate;
     256                d('date').innerHTML = tinymce.releaseDate;
    268257
    269258                if ( win.fullscreen && win.fullscreen.settings.visible ) {
    … …  
    272261                        d('content3').className = 'dfw';
    273262                }
    274     });
     263        });
    275264</script>
    276265</body>
Note: See TracChangeset for help on using the changeset viewer.