WordPress.org

Make WordPress Core

Changeset 20433


Ignore:
Timestamp:
04/11/2012 02:20:51 AM (6 years ago)
Author:
azaozz
Message:

Add the jQuery UI Touch Punch plugin to handle dragging on mobile devices, props georgestephanis, see #20014

Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r20272 r20433  
    1212
    1313wp_enqueue_script('post');
     14
     15if ( wp_is_mobile() )
     16    wp_enqueue_script( 'jquery-touch-punch' );
    1417
    1518if ( post_type_supports($post_type, 'editor') || post_type_supports($post_type, 'thumbnail') ) {
  • trunk/wp-admin/index.php

    r20279 r20433  
    1919wp_enqueue_script( 'media-upload' );
    2020add_thickbox();
     21
     22if ( wp_is_mobile() )
     23    wp_enqueue_script( 'jquery-touch-punch' );
    2124
    2225$title = __('Dashboard');
  • trunk/wp-admin/link-add.php

    r19712 r20433  
    2424wp_enqueue_script('xfn');
    2525
     26if ( wp_is_mobile() )
     27    wp_enqueue_script( 'jquery-touch-punch' );
     28
    2629$link = get_default_link_to_edit();
    2730include('./edit-link-form.php');
  • trunk/wp-admin/link.php

    r19712 r20433  
    100100        wp_enqueue_script('xfn');
    101101
     102        if ( wp_is_mobile() )
     103            wp_enqueue_script( 'jquery-touch-punch' );
     104
    102105        $parent_file = 'link-manager.php';
    103106        $submenu_file = 'link-manager.php';
  • trunk/wp-admin/nav-menus.php

    r19684 r20433  
    3535wp_enqueue_script( 'wp-lists' );
    3636wp_enqueue_script( 'postbox' );
     37
     38if ( wp_is_mobile() )
     39    wp_enqueue_script( 'jquery-touch-punch' );
    3740
    3841// Container for any messages displayed to the user
  • trunk/wp-admin/widgets.php

    r19572 r20433  
    2626}
    2727
    28 if ( 'on' == $widgets_access )
     28if ( 'on' == $widgets_access ) {
    2929    add_filter( 'admin_body_class', 'wp_widgets_access_body_class' );
    30 else
     30} else {
    3131    wp_enqueue_script('admin-widgets');
     32
     33    if ( wp_is_mobile() )
     34        wp_enqueue_script( 'jquery-touch-punch' );
     35}
    3236
    3337do_action( 'sidebar_admin_setup' );
  • trunk/wp-includes/script-loader.php

    r20419 r20433  
    158158    $scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '2.73', 1 );
    159159
     160    // jQuery plugins
    160161    $scripts->add( 'jquery-color', "/wp-includes/js/jquery/jquery.color$suffix.js", array('jquery'), '2.0-4561m', 1 );
    161162    $scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array('jquery'), '1.1-20110113', 1 );
     
    166167    $scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), false, 1 );
    167168    $scripts->add( 'jquery-postmessage', "/wp-includes/js/jquery/jquery.postmessage$suffix.js", array('jquery'), '0.5', 1 );
     169    $scripts->add( 'jquery-touch-punch', "/wp-includes/js/jquery/jquery.ui.touch-punch$suffix.js", array('jquery-ui-widget', 'jquery-ui-mouse'), '0.2.2', 1 );
    168170
    169171    $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20111117', 1 );
Note: See TracChangeset for help on using the changeset viewer.