HomeHelpTrac

Changeset 15840 for trunk


Ignore:
Timestamp:
01/05/12 23:36:42 (5 months ago)
Author:
Alexander Trofimov
Message:

Read more pointer is more precise and correct now

Location:
trunk
Files:
2 edited

Legend:

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

    r15762 r15840  
    2828        var defaults_pointer = { 
    2929            align: 'right', 
    30             offset: 0, 
    31             offset_pointer: 0 
     30            offset: '0 0', 
     31            offset_pointer: '0 0', 
    3232        } 
    3333 
     
    160160                    ePointAt = $('body'); 
    161161 
     162                var aOffset = ('' + o.pointer.offset).split(' ', 2); 
     163                var aOffsetPointer = ('' + o.pointer.offset_pointer).split(' ', 2); 
     164                if (undefined == aOffset[0] || undefined == aOffset[1]) 
     165                    aOffset = [0, 0]; 
     166                if (undefined == aOffsetPointer[0] || undefined == aOffsetPointer[1]) 
     167                    aOffsetPointer = [0, 0]; 
     168 
    162169                $el.position({ 
    163170                    of: ePointAt, 
     
    165172                    at: o.pointer.align + ' bottom', 
    166173                    collision: 'flip none', 
    167                     offset: '0 ' + o.pointer.offset 
     174                    offset: parseInt(aOffset[0]) + ' ' + parseInt(aOffset[1]) 
    168175                }); 
    169176 
     
    172179                    my: 'right top', 
    173180                    at: 'center bottom', 
    174                     offset: '0 ' + (o.pointer.offset + o.pointer.offset_pointer) 
     181                    offset: (parseInt(aOffsetPointer[0]) + parseInt(aOffsetPointer[0])) + ' ' + (parseInt(aOffsetPointer[1]) + parseInt(aOffset[1])) 
    175182                });  
    176183 
  • trunk/templates/base/scripts/BxBaseFunctions.php

    r15795 r15840  
    709709 
    710710                // add button width popup             
    711                 $sId = 'bx-str-limit-' . rand(1, PHP_INT_MAX ); 
    712                 $sResult .= '<img class="bx-str-limit" onclick="$(\'#' . $sId . '\').dolPopup({pointer:{el:$(this)}})" src="' . $this->getTemplateImage('str-limit.png') . '"/>'; 
     711                $sId = 'bx-str-limit-' . rand(1, PHP_INT_MAX); 
     712                $sResult .= '<img class="bx-str-limit" onclick="$(\'#' . $sId . '\').dolPopup({pointer:{el:$(this), offset:\'10 1\', offset_pointer:\'4 0\'}})" src="' . $this->getTemplateImage('str-limit.png') . '"/>'; 
    713713                $sResult .= '<div id="' . $sId . '" style="display:none;">' . BxTemplFunctions::getInstance()->transBox('<div class="bx-def-padding bx-def-color-bg-block">'.$sString.'</div>') . '</div>'; 
    714714            } 
Note: See TracChangeset for help on using the changeset viewer.