HomeHelpTrac

Changeset 15752 for trunk/inc


Ignore:
Timestamp:
12/12/11 23:09:18 (6 months ago)
Author:
Alexander Trofimov
Message:

Popup

File:
1 edited

Legend:

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

    r15750 r15752  
    2727            align: 'right', 
    2828            offset: 0, 
    29             offset_pointer: 1 
     29            offset_pointer: 0 
    3030        } 
    3131 
    3232        if (false != o.pointer) { 
    3333            o.fog = false; 
    34             o.pointer = $.extend({}, defaults_pointer, o.pointer); 
     34            o.pointer = $.extend({}, defaults_pointer, $(document).data('bx-popup-options') ? $(document).data('bx-popup-options') : {}, o.pointer); 
    3535        } 
    3636 
    37         if (o.fog && !$('#dolPopupFog').length) { 
    38             $('<div id="dolPopupFog" style="display: none;">&nbsp;</div>') 
     37        if (o.fog && !$('#bx-popup-fog').length) { 
     38            $('<div id="bx-popup-fog" style="display: none;">&nbsp;</div>') 
    3939                .prependTo('body') 
    4040                .css({ 
     
    7979                } 
    8080 
    81                 if (!$el.hasClass('dolPopup')) { // do this only once 
    82                     $el.addClass('dolPopup'); 
     81                if (!$el.hasClass('bx-popup-applied')) { // do this only once 
     82                    $el.addClass('bx-popup-applied'); 
    8383 
    8484                    // save options for element 
    85                     $el.data('dolPopupOptions', o); 
     85                    $el.data('bx-popup-options', o); 
    8686 
    8787                    // attach event for outer click checking 
    8888                    if (o.closeOnOuterClick) { 
    8989                        $(document).click(function(e) { 
    90                             if ($el.hasClass('dolPopup') && $el.is(':visible')) { 
     90                            if ($el.hasClass('bx-popup-applied') && $el.is(':visible')) { 
    9191                                if ($(e.target).parents('#' + $el.attr('id')).length == 0) { 
    9292                                    $el.dolPopupHide(); 
     
    104104                    $el.css({display: 'none', visibility: 'visible'}).fadeIn(o.speed, o.onShow); 
    105105                    if (o.fog) 
    106                         $('#dolPopupFog').fadeIn(o.speed); 
     106                        $('#bx-popup-fog').fadeIn(o.speed); 
    107107                } else { 
    108108                    $el.css({display: 'block', visibility: 'visible'}); 
    109109                    if (o.fog) 
    110                         $('#dolPopupFog').show(o.onShow); 
     110                        $('#bx-popup-fog').show(o.onShow); 
    111111                } 
    112112 
     
    126126            var $el = $(this); 
    127127 
    128             if (!$el.hasClass('dolPopup')) 
    129                 return false; 
    130  
    131             var o = $el.data('dolPopupOptions'); 
     128            if (!$el.hasClass('bx-popup-applied')) 
     129                return false; 
     130 
     131            var o = $el.data('bx-popup-options'); 
    132132 
    133133            if (!o) 
     
    139139            if (o.speed > 0) {                 
    140140                if (o.fog) 
    141                     $('#dolPopupFog').fadeOut(o.speed); 
     141                    $('#bx-popup-fog').fadeOut(o.speed); 
    142142                $el.fadeOut(o.speed, oHide.onHide); 
    143143            } else {                 
    144144                if (o.fog) 
    145                     $('#dolPopupFog').hide(); 
     145                    $('#bx-popup-fog').hide(); 
    146146                $el.hide(oHide.onHide); 
    147147            } 
Note: See TracChangeset for help on using the changeset viewer.