WordPress.org

Make WordPress Core

Changeset 8248


Ignore:
Timestamp:
07/03/2008 03:55:45 PM (10 years ago)
Author:
ryan
Message:

Add med buttons to TinyMCE fullscreen. Props azaozz. fixes #7232

Location:
trunk
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/gears-manifest.php

    r8239 r8248  
    6565{
    6666"betaManifestVersion" : 1,
    67 "version" : "<?php echo $man_version; ?>_20080701",
     67"version" : "<?php echo $man_version; ?>_20080703",
    6868"entries" : [
    6969<?php echo $defaults; ?>
     
    192192{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/img/image.png" },
    193193{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png" },
    194 { "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/help.gif" }
     194{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/help.gif" },
     195{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/image.gif" },
     196{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/media.gif" },
     197{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/video.gif" },
     198{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/audio.gif" }
    195199]}
  • trunk/wp-admin/includes/media.php

    r8241 r8248  
    232232    $out = <<<EOF
    233233
    234     <a href="{$image_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$image_title'><img src='images/media-button-image.gif' alt='$image_title' /></a>
    235     <a href="{$video_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$video_title'><img src='images/media-button-video.gif' alt='$video_title' /></a>
    236     <a href="{$audio_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$audio_title'><img src='images/media-button-music.gif' alt='$audio_title' /></a>
    237     <a href="{$media_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$media_title'><img src='images/media-button-other.gif' alt='$media_title' /></a>
     234    <a href="{$image_upload_iframe_src}&amp;TB_iframe=true" id="add_image" class="thickbox" title='$image_title'><img src='images/media-button-image.gif' alt='$image_title' /></a>
     235    <a href="{$video_upload_iframe_src}&amp;TB_iframe=true" id="add_video" class="thickbox" title='$video_title'><img src='images/media-button-video.gif' alt='$video_title' /></a>
     236    <a href="{$audio_upload_iframe_src}&amp;TB_iframe=true" id="add_audio" class="thickbox" title='$audio_title'><img src='images/media-button-music.gif' alt='$audio_title' /></a>
     237    <a href="{$media_upload_iframe_src}&amp;TB_iframe=true" id="add_media" class="thickbox" title='$media_title'><img src='images/media-button-other.gif' alt='$media_title' /></a>
    238238
    239239EOF;
  • trunk/wp-admin/includes/post.php

    r8034 r8248  
    9494        $mn = $_POST['mn'];
    9595        $ss = $_POST['ss'];
     96        $aa = ($aa <= 0 ) ? date('Y') : $aa;
     97        $mm = ($mm <= 0 ) ? date('n') : $mm;
    9698        $jj = ($jj > 31 ) ? 31 : $jj;
     99        $jj = ($jj <= 0 ) ? date('j') : $jj;
    97100        $hh = ($hh > 23 ) ? $hh -24 : $hh;
    98101        $mn = ($mn > 59 ) ? $mn -60 : $mn;
  • trunk/wp-includes/js/tinymce/langs/wp-langs.php

    r8239 r8248  
    396396wp_help_desc:"' . mce_escape( __('Help') ) . ' (Alt+Shift+H)",
    397397wp_more_alt:"' . mce_escape( __('More...') ) . '",
    398 wp_page_alt:"' . mce_escape( __('Next page...') ) . '"
     398wp_page_alt:"' . mce_escape( __('Next page...') ) . '",
     399add_media:"' . mce_escape( __('Add Media') ) . '",
     400add_image:"' . mce_escape( __('Add an Image') ) . '",
     401add_video:"' . mce_escape( __('Add Video') ) . '",
     402add_audio:"' . mce_escape( __('Add Audio') ) . '"
    399403});
    400404
  • trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js

    r8167 r8248  
    8989                cmd : 'WP_Adv'
    9090            });
     91
     92            // Add Media buttons
     93            ed.addButton('add_media', {
     94                title : 'wordpress.add_media',
     95                image : url + '/img/media.gif',
     96                onclick : function() {
     97                    tb_show('', tinymce.DOM.get('add_media').href);
     98                    tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
     99                }
     100            });
     101
     102            ed.addButton('add_image', {
     103                title : 'wordpress.add_image',
     104                image : url + '/img/image.gif',
     105                onclick : function() {
     106                    tb_show('', tinymce.DOM.get('add_image').href);
     107                    tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
     108                }
     109            });
     110
     111            ed.addButton('add_video', {
     112                title : 'wordpress.add_video',
     113                image : url + '/img/video.gif',
     114                onclick : function() {
     115                    tb_show('', tinymce.DOM.get('add_video').href);
     116                    tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
     117                }
     118            });
     119
     120            ed.addButton('add_audio', {
     121                title : 'wordpress.add_audio',
     122                image : url + '/img/audio.gif',
     123                onclick : function() {
     124                    tb_show('', tinymce.DOM.get('add_audio').href);
     125                    tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
     126                }
     127            });
     128
     129            // Add Media buttons to fullscreen
     130            ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) {
     131                if ( 'mceFullScreen' != cmd ) return;
     132                if ( 'mce_fullscreen' != ed.id )
     133                    ed.settings.theme_advanced_buttons1 += ',|,add_image,add_video,add_audio,add_media';
     134            });
    91135
    92136            // Add class "alignleft", "alignright" and "aligncenter" when selecting align for images.
  • trunk/wp-includes/js/tinymce/tiny_mce_config.php

    r8245 r8248  
    223223if ( $disk_cache ) {
    224224
    225     $cacheKey = apply_filters('tiny_mce_version', '20080702');
     225    $cacheKey = apply_filters('tiny_mce_version', '20080703');
    226226
    227227    foreach ( $initArray as $v )
  • trunk/wp-includes/script-loader.php

    r8245 r8248  
    3838
    3939    // Modify this version when tinyMCE plugins are changed.
    40     $mce_version = apply_filters('tiny_mce_version', '20080701');
     40    $mce_version = apply_filters('tiny_mce_version', '20080703');
    4141    $scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
    4242
Note: See TracChangeset for help on using the changeset viewer.