WordPress.org

Make WordPress Core

Ticket #12878: 12878.diff

File 12878.diff, 3.6 KB (added by scribu, 8 years ago)

open the thickbox first, then make modifications

  • wp-includes/js/thickbox/thickbox.js

     
    2323
    2424//add thickbox to href & area elements that have a class of .thickbox
    2525function tb_init(domChunk){
    26         jQuery(domChunk).live('click', function(){
     26        jQuery(domChunk).live('click', tb_click);
     27}
     28
     29function tb_click(){
    2730        var t = this.title || this.name || null;
    2831        var a = this.href || this.alt;
    2932        var g = this.rel || false;
    3033        tb_show(t,a,g);
    3134        this.blur();
    3235        return false;
    33         });
    3436}
    3537
    3638function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
  • wp-includes/script-loader.php

     
    167167        $scripts->add( 'jquery-autocomplete', "/wp-includes/js/jquery/autocomplete$suffix.js", array('jquery'), '1.1' );
    168168        $scripts->add_data( 'jquery-autocomplete', 'group', 1 );
    169169
    170         $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20104104');
     170        $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20100407');
    171171        $scripts->add_data( 'thickbox', 'group', 1 );
    172172        $scripts->localize( 'thickbox', 'thickboxL10n', array(
    173173                        'next' => __('Next >'),
     
    337337                        'l10n_print_after' => 'try{convertEntities(wordCountL10n);}catch(e){};'
    338338                ));
    339339
    340                 $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090319' );
     340                $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20100407' );
    341341                $scripts->add_data( 'theme-preview', 'group', 1 );
    342342
    343343                $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), '20091202' );
     
    356356                        'l10n_print_after' => 'try{convertEntities(inlineEditL10n);}catch(e){};'
    357357                ) );
    358358
    359                 $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery' ), '20100402' );
     359                $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'thickbox' ), '20100407' );
    360360                $scripts->add_data( 'plugin-install', 'group', 1 );
    361361                $scripts->localize( 'plugin-install', 'plugininstallL10n', array(
    362362                        'plugin_information' => __('Plugin Information:'),
  • wp-admin/js/theme-preview.dev.js

     
    2121        $(window).resize( function() { thickDims() } );
    2222
    2323        $('a.thickbox-preview').click( function() {
     24                tb_click.call(this);
     25
    2426                var alink = $(this).parents('.available-theme').find('.activatelink'), link = '', href = $(this).attr('href'), url, text;
    2527
    2628                if ( tbWidth = href.match(/&tbWidth=[0-9]+/) )
     
    4850
    4951                $('#TB_iframeContent').width('100%');
    5052                thickDims();
     53               
    5154                return false;
    5255        } );
    5356
  • wp-admin/js/plugin-install.dev.js

     
    2222        };
    2323
    2424        thickDims().click( function() {
     25                tb_click.call(this);
     26
    2527                $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
    2628                $('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong>&nbsp;' + $(this).attr('title') );
    2729                return false;