Bug Tracker

Changeset 4039

Show
Ignore:
Timestamp:
12/06/07 04:15:53 (1 year ago)
Author:
kswedberg
Message:

cluetip: added clickThrough option to allow click to go to page, even if href and tipAttribute are equal. fixed a bug where a variable was improperly nested in an if statement

Location:
trunk/plugins/cluetip
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/cluetip/jquery.cluetip.js

    r4030 r4039  
    11/* 
    22 * jQuery clueTip plugin 
    3  * Version 0.9.3.2  (12/06/2007) 
     3 * Version 0.9.3.2  (12/05/2007) 
    44 * @requires jQuery v1.1.1+ 
    55 * @requires Dimensions plugin  
     
    175175            posX = mouseX + lOffset; 
    176176          } 
    177           var pY = posX < 0 ? event.pageY + tOffset : event.pageY; 
    178177        } 
     178        var pY = posX < 0 ? event.pageY + tOffset : event.pageY; 
    179179        $cluetip.css({left: (posX > 0 && opts.positionBy != 'bottomTop') ? posX : (mouseX + (tipWidth/2) > winWidth) ? winWidth/2 - tipWidth/2 : Math.max(mouseX - (tipWidth/2),0)}); 
    180180      } 
     
    350350-------------------------------------- */ 
    351351  // activate by click 
    352       if (opts.activation == 'click'||opts.activation == 'toggle') { 
    353  
     352      if ( (/click|toggle/).test(opts.activation) ) { 
    354353        $this.click(function(event) { 
    355354          if ($cluetip.is(':hidden') || !$(this).is('.cluetip-clicked')) { 
     
    376375      } else { 
    377376        $this.click(function() { 
    378           if ($this.attr('href') && $this.attr('href') == tipAttribute) { 
     377          if ($this.attr('href') && $this.attr('href') == tipAttribute && !opts.clickThrough) { 
    379378            return false; 
    380379          } 
     
    453452    activation:       'hover',  // set to 'click' to force user to click to show clueTip 
    454453                                // set to 'focus' to show on focus of a form element and hide on blur 
     454    clickThrough:     false,    // if true, and activation is not 'click', then clicking on link will take user to the link's href, 
     455                                // even if href and tipAttribute are equal 
    455456    tracking:         false,    // if true, clueTip will track mouse movement 
    456457    closePosition:    'top',    // location of close text for sticky cluetips; can be 'top' or 'bottom' or 'title' 
  • trunk/plugins/cluetip/jquery.dimensions.js

    r2802 r4039  
    4141            if ( $.browser.opera || ($.browser.safari && parseInt($.browser.version) > 520) ) 
    4242                return self.innerHeight - (($(document).height() > self.innerHeight) ? getScrollbarWidth() : 0); 
     43 
    4344            else if ( $.browser.safari ) 
    4445                return self.innerHeight; 
    4546            else 
    46                 return $.boxModel && document.documentElement.clientHeight || document.body.clientHeight; 
    47          
     47          //return $.boxModel && Math.min(document.documentElement.clientHeight,document.body.clientHeight); 
     48            return $.boxModel && document.documentElement.clientHeight || document.body.clientHeight; 
    4849        if ( this[0] == document )  
    4950            return Math.max( ($.boxModel && document.documentElement.scrollHeight || document.body.scrollHeight), document.body.offsetHeight );