HomeHelpTrac

Changeset 15932


Ignore:
Timestamp:
01/26/12 20:46:13 (4 months ago)
Author:
Alexander Trofimov
Message:

Popup - fix when popup is bigger than window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/js/jquery.dolPopup.js

    r15931 r15932  
    217217                    my: 'center center', 
    218218                    at: 'center center', 
    219                     collision: 'none none' 
    220                 }); 
    221  
    222                 // attach window resize event                 
     219                    collision: 'none none', 
     220                    offset: '0 ' + ($el.outerHeight() > $(window).height() ? parseInt(($el.outerHeight() - $(window).height()) / 2) : '0') 
     221                }); 
     222 
     223                // attach window resize event 
    223224                $(window).on('resize.popupWindow', function() { 
     225 
    224226                    $el.position({ 
    225227                        of: window, 
    226228                        my: 'center center', 
    227229                        at: 'center center', 
    228                         collision: 'none none' 
     230                        collision: 'none none', 
     231                        offset: '0 ' + ($el.outerHeight() > $(window).height() ? parseInt(($el.outerHeight() - $(window).height()) / 2) : '0') 
    229232                    }); 
    230233                }); 
Note: See TracChangeset for help on using the changeset viewer.