Ticket #5583: interface-fix2.diff

File interface-fix2.diff, 4.6 kB (added by filosofo, 6 months ago)

Fix interface bug in IE7 and jQuery 1.2+

  • wp-includes/js/jquery/interface-fix.js

    old new  
  • wp-includes/script-loader.php

    old new  
    8080 
    8181                $this->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.2.2b2'); 
    8282                $this->add( 'jquery-form', '/wp-includes/js/jquery/jquery.form.js', array('jquery'), '2.02'); 
    83                 $this->add( 'interface', '/wp-includes/js/jquery/interface.js', array('jquery'), '1.2' ); 
     83                $this->add( 'interface-orig', '/wp-includes/js/jquery/interface.js', array('jquery'), '1.2' ); 
     84                $this->add( 'interface', '/wp-includes/js/jquery/interface-fix.js', array('interface-orig'), '1.2' ); 
    8485                $this->add( 'dimensions', '/wp-includes/js/jquery/jquery.dimensions.min.js', array('jquery'), '1.1.2'); 
    8586                $this->add( 'suggest', '/wp-includes/js/jquery/suggest.js', array('dimensions'), '1.1'); 
    8687                $this->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20'); 
  • wp-admin/js/widgets.js

    old new  
    102102 
    103103        $('a.widget-control-add').click( addClick ); 
    104104 
    105         var widgetSortable; 
    106         var widgetSortableInit = function() { 
    107                 try { // a hack to make sortables work in jQuery 1.2+ and IE7 
    108                         $('#current-sidebar .widget-control-list').SortableDestroy(); 
    109                 } catch(e) {} 
    110                 widgetSortable = $('#current-sidebar .widget-control-list').Sortable( { 
    111                         accept: 'widget-sortable', 
    112                         helperclass: 'sorthelper', 
    113                         handle: 'h4.widget-title', 
    114                         onStop: widgetSortableInit 
    115                 } ); 
    116         } 
    117  
    118105        // initialize sortable 
    119         widgetSortableInit(); 
    120  
     106        var widgetSortable = $('#current-sidebar .widget-control-list').Sortable( { 
     107                accept: 'widget-sortable', 
     108                helperclass: 'sorthelper', 
     109                handle: 'h4.widget-title' 
     110        } ); 
    121111});