Ignore:
Timestamp:
Apr 9, 2010, 2:47:28 PM (14 years ago)
Author:
patdenice
Message:

Update jQuery to 1.4.2 and colorbox to 1.3.6.
Increase column hit in images table when viewing picture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/lightbox/jquery.colorbox.js

    r4621 r5734  
    1 // ColorBox v1.3.5 - a full featured, light-weight, customizable lightbox based on jQuery 1.3
     1// ColorBox v1.3.6 - a full featured, light-weight, customizable lightbox based on jQuery 1.3
    22// c) 2009 Jack Moore - www.colorpowered.com - jack@colorpowered.com
    33// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
     
    1010        FALSE = false,
    1111        cboxPublic,
    12         isIE = !$.support.opacity,
    13         isIE6 = isIE && !window.XMLHttpRequest,
     12        isIE = $.browser.msie && !$.support.opacity, // feature detection alone gave false positives in some browsers
     13        isIE6 = isIE && $.browser.version < 7,
    1414
    1515        // Event Strings (to increase compression)
     
    123123                        }
    124124                }
     125                settings.rel = settings.rel || element.rel;
     126                settings.href = settings.href || element.href;
     127                settings.title = settings.title || element.title;
    125128        }
    126129
     
    133136                process(); // Convert functions to their returned values.
    134137               
    135                 var rel = settings.rel || element.rel;
    136                
    137                 if (rel && rel !== 'nofollow') {
     138                if (settings.rel && settings.rel !== 'nofollow') {
    138139                        $related = $('.cboxElement').filter(function () {
    139140                                var relRelated = $(this).data(colorbox).rel || this.rel;
    140                                 return (relRelated === rel);
     141                                return (relRelated === settings.rel);
    141142                        });
    142143                        index = $related.index(element);
     
    162163                       
    163164                        // Set Navigation Key Bindings
    164                         $().bind("keydown.cbox_close", function (e) {
     165                        $(document).bind("keydown.cbox_close", function (e) {
    165166                                if (e.keyCode === 27) {
    166167                                        e.preventDefault();
     
    222223                if (!$this.length) {
    223224                        if ($this.selector === '') { // empty selector means a direct call, ie: $.fn.colorbox();
    224                                 $this = $($this);
     225                                $this = $('<a/>');
    225226                                options.open = TRUE;
    226227                        } else { // else the selector didn't match anything, and colorbox should go ahead and return.
     
    303304                // Add rollover event to navigation elements
    304305                $content.children()
    305                 .addClass(hover)
    306                 .mouseover(function () { $(this).addClass(hover); })
    307                 .mouseout(function () { $(this).removeClass(hover); });
     306                .bind('mouseover mouseout', function(){
     307                        $(this).toggleClass(hover);
     308                }).addClass(hover);
    308309               
    309310                // Cache values needed for size calculations
     
    445446                                //This increases compatability with pages using DOM dependent JavaScript.
    446447                                if(settings.iframe){
    447                                         $loaded.append("<iframe id='cboxIframe'" + (settings.scrolling ? " " : "scrolling='no'") + " name='iframe_"+new Date().getTime()+"' frameborder=0 src='"+(settings.href || element.href)+"' " + (isIE ? "allowtransparency='true'" : '') + " />");
     448                                        $loaded.append("<iframe id='cboxIframe'" + (settings.scrolling ? " " : "scrolling='no'") + " name='iframe_"+new Date().getTime()+"' frameborder=0 src='"+settings.href+"' " + (isIE ? "allowtransparency='true'" : '') + " />");
    448449                                }
    449450                               
    450451                                $loaded.show();
    451452                               
    452                                 $title.html(settings.title || element.title);
    453                                
    454                                 $title.show();
     453                                $title.show().html(settings.title);
    455454                               
    456455                                if ($related.length>1) {
     
    578577                }
    579578               
    580                 href = settings.href || $(element).attr("href");
     579                href = settings.href;
    581580               
    582581                $loadingOverlay.show();
     
    718717               
    719718                open = FALSE;
    720                 $().unbind("keydown.cbox_close keydown.cbox_arrows");
     719                $(document).unbind("keydown.cbox_close keydown.cbox_arrows");
    721720                $window.unbind(cbox_resize+' resize.cboxie6 scroll.cboxie6');
    722721                $overlay.css({cursor: 'auto'}).fadeOut('fast');
     
    725724                .stop(TRUE, FALSE)
    726725                .fadeOut('fast', function () {
     726                        $('#colorbox iframe').attr('src', 'about:blank');
    727727                        $loaded.remove();
    728728                        $cbox.css({'opacity': 1});
Note: See TracChangeset for help on using the changeset viewer.