Make WordPress Core

Ticket #5583: interface-fix2.diff

File interface-fix2.diff, 4.6 KB (added by filosofo, 17 years ago)

Fix interface bug in IE7 and jQuery 1.2+

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

     
     1eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('15.4.1H=1z(e){h j=15;h a=j.4.W;a.1.1j=A;h b=a.g;a.1.1G=j.9(a,\'q\');a.1.v=j.9(a,\'Z\');3(!a.1.T)a.1.T=a.1.v;a.1.6={x:Q(j.9(a,\'m\'))||0,y:Q(j.9(a,\'k\'))||0};a.1.C=0;a.1.B=0;3(j.u.K){h c=j.s.13(a,A);a.1.C=c.l||0;a.1.B=c.t||0}a.1.2=j.Y(j.s.1x(a),j.s.V(a));3(a.1.v!=\'U\'&&a.1.v!=\'1q\'){b.Z=\'U\'}j.4.7.1m();h d=j(a).1i(A).w(0);j(d).9({q:\'S\',m:\'i\',k:\'i\'});d.g.P=\'0\';d.g.16=\'0\';d.g.O=\'0\';d.g.R=\'0\';j.4.7.N(d);h f=j.4.7.w(0).g;3(a.1.19){f.D=\'M\';f.G=\'M\'}18{f.G=a.1.2.r+\'n\';f.D=a.1.2.L+\'n\'}f.q=\'S\';f.P=\'i\';f.16=\'i\';f.O=\'i\';f.R=\'i\';j.Y(a.1.2,j.s.V(d));3(a.1.5){3(a.1.5.m){a.1.6.x+=a.1.8.x-a.1.2.x-a.1.5.m;a.1.2.x=a.1.8.x-a.1.5.m}3(a.1.5.k){a.1.6.y+=a.1.8.y-a.1.2.y-a.1.5.k;a.1.2.y=a.1.8.y-a.1.5.k}3(a.1.5.J){a.1.6.x+=a.1.8.x-a.1.2.x-a.1.2.r+a.1.5.J;a.1.2.x=a.1.8.x-a.1.2.L+a.1.5.J}3(a.1.5.I){a.1.6.y+=a.1.8.y-a.1.2.y-a.1.2.r+a.1.5.I;a.1.2.y=a.1.8.y-a.1.2.r+a.1.5.I}}a.1.1F=a.1.6.x;a.1.1E=a.1.6.y;3(a.1.1D||a.1.H==\'1C\'){o=j.s.13(a.12,A);a.1.2.x=a.1B+(j.u.K?0:j.u.11?-o.l:o.l);a.1.2.y=a.1A+(j.u.K?0:j.u.11?-o.t:o.t);j(a.12).N(j.4.7.w(0))}3(a.1.H){j.4.1y(a);a.1.X.H=j.4.1w}3(a.1.1v){j.1t.1s(a)}f.m=a.1.2.x-a.1.C+\'n\';f.k=a.1.2.y-a.1.B+\'n\';f.D=a.1.2.L+\'n\';f.G=a.1.2.r+\'n\';j.4.W.1.1r=z;3(a.1.1p){a.1.X.1o=j.4.1n}3(a.1.F!=z){j.4.7.9(\'F\',a.1.F)}3(a.1.p){j.4.7.9(\'p\',a.1.p);3(1l.1k){j.4.7.9(\'1u\',\'1h(p=\'+a.1.p*1g+\')\')}}3(a.1.10){j.4.7.1f(a.1.10);j.4.7.w(0).1e.g.q=\'17\'}3(a.1.14)a.1.14.1d(a,[d,a.1.6.x,a.1.6.y]);3(j.E&&j.E.1c>0){j.E.1b(a)}3(a.1.1a==z){b.q=\'17\'}1I z};',62,107,'|dragCfg|oC|if|iDrag|cursorAt|oR|helper|pointer|css|||||||style|var|0px||top||left|px|parentBorders|opacity|display|hb|iUtil||browser|oP|get|||false|true|diffY|diffX|width|iDrop|zIndex|height|containment|bottom|right|msie|wb|auto|append|marginBottom|marginTop|parseInt|marginLeft|block|initialPosition|relative|getSize|dragged|onDragModifier|extend|position|frameClass|opera|parentNode|getBorder|onStart|jQuery|marginRight|none|else|autoSize|ghosting|highlight|count|apply|firstChild|addClass|100|alpha|clone|init|ActiveXObject|window|empty|snapToGrid|grid|gx|absolute|prot|modifyContainer|iSlider|filter|si|fitToContainer|getPosition|getContainment|function|offsetTop|offsetLeft|parent|insideParent|ny|nx|oD|dragstart|return'.split('|'),0,{}))
  • wp-includes/script-loader.php

     
    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

     
    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});