-
+ CC1C1FE7A6505478514AED8492956CCC7E5C6A5E8F2DE1923644BD21B2CC72DA6C211D2856BD4390DC728A4601AD13E0DAE358778E5DF8634409587DA855B838
mp-wp/wp-admin/js/theme-preview.js
(0 . 0)(1 . 44)
51529
51530 jQuery(function($) {
51531 if ( 'undefined' == typeof $.fn.pngFix )
51532 $.fn.pngFix = function() { return this; }
51533
51534 var thickDims = function() {
51535 var tbWindow = $('#TB_window');
51536 var H = $(window).height();
51537 var W = $(window).width();
51538
51539 if ( tbWindow.size() ) {
51540 tbWindow.width( W - 90 ).height( H - 60 );
51541 $('#TB_iframeContent').width( W - 90 ).height( H - 90 );
51542 tbWindow.css({'margin-left': '-' + parseInt((( W - 90 ) / 2),10) + 'px'});
51543 if ( typeof document.body.style.maxWidth != 'undefined' )
51544 tbWindow.css({'top':'30px','margin-top':'0'});
51545 };
51546
51547 return $('a.thickbox').each( function() {
51548 var href = $(this).parents('.available-theme').find('.previewlink').attr('href');
51549 if ( ! href ) return;
51550 href = href.replace(/&width=[0-9]+/g, '');
51551 href = href.replace(/&height=[0-9]+/g, '');
51552 $(this).attr( 'href', href + '&width=' + ( W - 110 ) + '&height=' + ( H - 100 ) );
51553 });
51554 };
51555
51556 thickDims()
51557 .click( function() {
51558 var alink = $(this).parents('.available-theme').find('.activatelink');
51559 var url = alink.attr('href');
51560 var text = alink.html();
51561
51562 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
51563 $('#TB_closeAjaxWindow').css({'float':'left'});
51564 $('#TB_ajaxWindowTitle').css({'float':'right'})
51565 .append(' <a href="' + url + '" target="_top" class="tb-theme-preview-link">' + text + '</a>');
51566
51567 $('#TB_iframeContent').width('100%');
51568 return false;
51569 } );
51570
51571 $(window).resize( function() { thickDims() } );
51572 });