356. File Comparison Report

Produced on Mon May 12 13:05:52 2008 UTC. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

356.1 Files compared

# Location File Last Modified
1 Mon May 12 13:05:52 2008 UTC
2 Dolphin-v.6.1.0\plugins\jquery jquery.dimensions.js Wed Apr 9 17:44:50 2008 UTC

356.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 0 0
Changed 0 0
Inserted 1 119
Removed 0 0

356.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

356.4 Active regular expressions

No regular expressions were active.

356.5 Comparison detail

    1   /* Copyrig ht (c) 200 7 Paul Bak aus (paul. bakaus@goo glemail.co m) and Bra ndon Aaron  (brandon. aaron@gmai l.com || h ttp://bran donaaron.n et)
    2    * Dual li censed und er the MIT  (http://w ww.opensou rce.org/li censes/mit -license.p hp)
    3    * and GPL  (http://w ww.opensou rce.org/li censes/gpl -license.p hp) licens es.
    4    *
    5    * $LastCh angedDate:  2007-12-2 0 15:43:48  +0100 (Do , 20 Dez 2 007) $
    6    * $Rev: 4 257 $
    7    *
    8    * Version : @VERSION
    9    *
    10    * Require s: jQuery  1.2+
    11    */
    12  
    13   (function( $){
    14       
    15   $.dimensio ns = {
    16       versio n: '@VERSI ON'
    17   };
    18  
    19   // Create  innerHeigh t, innerWi dth, outer Height and  outerWidt h methods
    20   $.each( [  'Height',  'Width' ],  function( i, name){
    21       
    22       // inn erHeight a nd innerWi dth
    23       $.fn[  'inner' +  name ] = f unction()  {
    24           if  (!this[0] ) return;
    25           
    26           va r torl = n ame == 'He ight' ? 'T op'    : ' Left',  //  top or le ft
    27                borr = n ame == 'He ight' ? 'B ottom' : ' Right'; //  bottom or  right
    28           
    29           re turn this. is(':visib le') ? thi s[0]['clie nt' + name ] : num( t his, name. toLowerCas e() ) + nu m(this, 'p adding' +  torl) + nu m(this, 'p adding' +  borr);
    30       };
    31       
    32       // out erHeight a nd outerWi dth
    33       $.fn[  'outer' +  name ] = f unction(op tions) {
    34           if  (!this[0] ) return;
    35           
    36           va r torl = n ame == 'He ight' ? 'T op'    : ' Left',  //  top or le ft
    37                borr = n ame == 'He ight' ? 'B ottom' : ' Right'; //  bottom or  right
    38           
    39           op tions = $. extend({ m argin: fal se }, opti ons || {}) ;
    40           
    41           va r val = th is.is(':vi sible') ? 
    42                    this [0]['offse t' + name]  : 
    43                    num(  this, nam e.toLowerC ase() )
    44                         + num(this , 'border'  + torl +  'Width') +  num(this,  'border'  + borr + ' Width')
    45                         + num(this , 'padding ' + torl)  + num(this , 'padding ' + borr);
    46           
    47           re turn val +  (options. margin ? ( num(this,  'margin' +  torl) + n um(this, ' margin' +  borr)) : 0 );
    48       };
    49   });
    50  
    51   // Create  scrollLeft  and scrol lTop metho ds
    52   $.each( [' Left', 'To p'], funct ion(i, nam e) {
    53       $.fn[  'scroll' +  name ] =  function(v al) {
    54           if  (!this[0] ) return;
    55           
    56           re turn val ! = undefine d ?
    57           
    58                // Set t he scroll  offset
    59                this.eac h(function () {
    60                    this  == window  || this = = document  ?
    61                         window.scr ollTo( 
    62                             name = = 'Left' ?  val : $(w indow)[ 's crollLeft'  ](),
    63                             name = = 'Top'  ?  val : $(w indow)[ 's crollTop'   ]()
    64                         ) :
    65                         this[ 'scr oll' + nam e ] = val;
    66                }) :
    67                
    68                // Retur n the scro ll offset
    69                this[0]  == window  || this[0]  == docume nt ?
    70                    self [ (name ==  'Left' ?  'pageXOffs et' : 'pag eYOffset')  ] ||
    71                         $.boxModel  && docume nt.documen tElement[  'scroll' +  name ] ||
    72                         document.b ody[ 'scro ll' + name  ] :
    73                    this [0][ 'scro ll' + name  ];
    74       };
    75   });
    76  
    77   $.fn.exten d({
    78       positi on: functi on() {
    79           va r left = 0 , top = 0,  elem = th is[0], off set, paren tOffset, o ffsetParen t, results ;
    80           
    81           if  (elem) {
    82                // Get * real* offs etParent
    83                offsetPa rent = thi s.offsetPa rent();
    84                
    85                // Get c orrect off sets
    86                offset        = thi s.offset() ;
    87                parentOf fset = off setParent. offset();
    88                
    89                // Subtr act elemen t margins
    90                offset.t op  -= num (elem, 'ma rginTop');
    91                offset.l eft -= num (elem, 'ma rginLeft') ;
    92                
    93                // Add o ffsetParen t borders
    94                parentOf fset.top   += num(off setParent,  'borderTo pWidth');
    95                parentOf fset.left  += num(off setParent,  'borderLe ftWidth');
    96                
    97                // Subtr act the tw o offsets
    98                results  = {
    99                    top:   offset.t op  - pare ntOffset.t op,
    100                    left : offset.l eft - pare ntOffset.l eft
    101                };
    102           }
    103           
    104           re turn resul ts;
    105       },
    106       
    107       offset Parent: fu nction() {
    108           va r offsetPa rent = thi s[0].offse tParent;
    109           wh ile ( offs etParent & & (!/^body |html$/i.t est(offset Parent.tag Name) && $ .css(offse tParent, ' position')  == 'stati c') )
    110                offsetPa rent = off setParent. offsetPare nt;
    111           re turn $(off setParent) ;
    112       }
    113   });
    114  
    115   function n um(el, pro p) {
    116       return  parseInt( $.curCSS(e l.jquery?e l[0]:el,pr op,true))| |0;
    117   };
    118  
    119   })(jQuery) ;