[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/js/ -> mp_thickbox.js (source)

   1  
   2  var thickDims, tbWidth, tbHeight;
   3  jQuery(document).ready(function($) {
   4  
   5      thickDims = function() {
   6          var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
   7  
   8          w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 90;
   9          h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 60;
  10  
  11          if ( tbWindow.size() ) {
  12              tbWindow.width(w).height(h);
  13              $('#TB_iframeContent').width(w).height(h - 27);
  14              tbWindow.css({'margin-left': '-' + parseInt((w / 2),10) + 'px'});
  15              if ( typeof document.body.style.maxWidth != 'undefined' )
  16                  tbWindow.css({'top':'30px','margin-top':'0'});
  17          }
  18      };
  19  
  20      thickDims();
  21      $(window).resize( function() { thickDims() } );
  22  
  23      $('a.thickbox-preview').click( function() {
  24          tb_click.call(this);
  25  
  26          var alink = $(this).parents('.available-theme').find('.activatelink'), link = '', href = $(this).attr('href'), url, text;
  27  
  28          if ( tbWidth = href.match(/&tbWidth=[0-9]+/) )
  29              tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
  30          else
  31              tbWidth = $(window).width() - 90;
  32  
  33          if ( tbHeight = href.match(/&tbHeight=[0-9]+/) )
  34              tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
  35          else
  36              tbHeight = $(window).height() - 60;
  37  
  38          text = $(this).attr('title') || '';
  39          link = '&#160; <span class="tb-theme-preview-link">' + text + '</span>';
  40  
  41          $('#TB_title').css({'background-color':'#222','color':'#dfdfdf'});
  42          $('#TB_closeAjaxWindow').css({'float':'left'});
  43          $('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
  44  
  45          $('#TB_iframeContent').width('100%');
  46          thickDims();
  47  
  48          return false;
  49      } );
  50  });


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1