Changeset 7923

Show
Ignore:
Timestamp:
05/13/08 15:22:52 (6 months ago)
Author:
ryan
Message:

Quick post TMCE improvements: add new theme, languages, support for Safari, modal dialogs, changed some settings to be the same like the write page, small css fixes. Props azaozz. see #6813

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/css/quick-post.css

    r7919 r7923  
    320320 
    321321input.text { 
    322     width: 100%; 
     322    width: 99%; 
     323    padding: 3px; 
    323324} 
    324325 
     
    340341} 
    341342 
     343.editor-container { 
     344    border-width: 1px; 
     345    border-color: #ccc; 
     346    border-style: solid; 
     347} 
     348 
    342349/* end quickpost css */ 
  • trunk/wp-admin/quick-post.php

    r7919 r7923  
    7474    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 
    7575    <title><?php _e('Quick Post') ?></title> 
    76  
     76     
    7777    <script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce.js"></script> 
    7878         
     
    8181    <?php do_action('admin_print_scripts'); do_action('admin_head'); ?> 
    8282    <?php wp_admin_css('css/quick-post'); ?> 
     83    <?php wp_admin_css( 'css/colors' ); ?> 
    8384 
    8485    <script type="text/javascript"> 
    85     <? if ( user_can_richedit() ) { ?> 
     86    <?php if ( user_can_richedit() ) {  
     87        $language = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); 
     88        // Add TinyMCE languages 
     89        @include_once( dirname(__FILE__).'/../wp-includes/js/tinymce/langs/wp-langs.php' ); 
     90        if ( isset($strings) ) echo $strings; 
     91    ?> 
     92 
     93            (function() { 
     94                var base = tinymce.baseURL, sl = tinymce.ScriptLoader, ln = "<?php echo $language; ?>"; 
     95 
     96                sl.markDone(base + '/langs/' + ln + '.js'); 
     97                sl.markDone(base + '/themes/advanced/langs/' + ln + '.js'); 
     98                sl.markDone(base + '/themes/advanced/langs/' + ln + '_dlg.js'); 
     99            })(); 
     100             
    86101            tinyMCE.init({ 
    87102                mode: "textareas", 
    88103                editor_selector: "mceEditor", 
     104                language : "<?php echo $language; ?>", 
    89105                width: "100%", 
    90106                theme : "advanced", 
    91                 theme_advanced_buttons1 : "bold,italic,underline,indent,separator,strikethrough,bullist,numlist,undo,redo,link,unlink", 
     107                theme_advanced_buttons1 : "bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,undo,redo,link,unlink", 
    92108                theme_advanced_buttons2 : "", 
    93109                theme_advanced_buttons3 : "", 
    94110                theme_advanced_toolbar_location : "top", 
    95111                theme_advanced_toolbar_align : "left", 
    96                 theme_advanced_path_location : "bottom", 
    97                 extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]" 
     112                theme_advanced_statusbar_location : "bottom", 
     113                theme_advanced_resizing : true, 
     114                theme_advanced_resize_horizontal : false, 
     115                skin : "wp_theme", 
     116                dialog_type : "modal", 
     117                relative_urls : false, 
     118                remove_script_host : false, 
     119                convert_urls : false, 
     120                apply_source_formatting : false, 
     121                remove_linebreaks : true, 
     122                accessibility_focus : false, 
     123                tab_focus : ":next", 
     124                plugins : "safari,inlinepopups" 
    98125            }); 
    99     <? } ?> 
     126    <?php } ?> 
    100127 
    101128    jQuery(document).ready(function() { 
     
    148175 
    149176                    <h2><?php _e('Post') ?></h2> 
    150                     <div
     177                    <div class="editor-container"
    151178                        <textarea name="content" id="regular_post_two" style="height:170px;width:100%;" class="mceEditor"><?php echo stripslashes($_GET['s']);?><br>&lt;a href="<?php echo $_GET['u'];?>"&gt;<?php echo $title;?>&lt;/a&gt;</textarea> 
    152179                    </div>         
     
    180207 
    181208                    <h2><?php _e('Caption') ?></h2> 
    182                     <div
     209                    <div class="editor-container"
    183210                        <textarea name="content" id="photo_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo "" .stripslashes($_GET['s']);?> 
    184211                        <br>&lt;a href="<?php echo $_GET['u'];?>"&gt;<?php echo $title;?>&lt;/a&gt;</textarea> 
     
    283310 
    284311                    <h2><?php _e('Quote') ?></h2> 
    285                     <div
     312                    <div class="editor-container"
    286313                        <textarea name="content" id="quote_post_one" style="height:130px;width:100%;" class="mceEditor"><?php echo stripslashes($_GET['s']);?></textarea> 
    287314                    </div> 
    288315 
    289316                    <h2><?php _e('Source <span class="optional">(optional)</span>') ?></h2> 
    290                     <div
     317                    <div class="editor-container"
    291318                        <textarea name="content2" id="quote_post_two" style="height:130px;width:100%;" class="mceEditor"><br>&lt;a href="<?php echo clean_url($_GET['u']);?>"&gt;<?php echo $title;?>&lt;/a&gt;</textarea> 
    292319                    </div> 
     
    332359                    <h2><?php _e('Caption <span class="optional">(optional)</span>') ?></h2> 
    333360 
    334                     <div
     361                    <div class="editor-container"
    335362                        <textarea name="content2" id="video_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo stripslashes($_GET['s']);?><br>&lt;a href="<?php echo $_GET['u'];?>"&gt;<?php echo $title;?>&lt;/a&gt;</textarea> 
    336363                    </div>