Changeset 10592
- Timestamp:
- 02/18/2009 10:32:42 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/theme-install.php
r10590 r10592 314 314 $action_links = array(); 315 315 $action_links[] = '<a href="' . admin_url('theme-install.php?tab=theme-information&theme=' . $theme->slug . 316 '&TB_iframe=true&width=600&height=800') . '" class="button thickbox onclick" >' . __('Install') . '</a>';317 $action_links[] = '<a href="' . $preview_link . '" class="button thickbox onclick previewlink">' . __('Preview') . '</a>';316 '&TB_iframe=true&width=600&height=800') . '" class="button thickbox onclick" title="' . attribute_escape(sprintf(__('Install "%s"'), $name)) . '">' . __('Install') . '</a>'; 317 $action_links[] = '<a href="' . $preview_link . '" class="button thickbox thickbox-preview onclick previewlink" title="' . attribute_escape(sprintf(__('Preview "%s"'), $name)) . '">' . __('Preview') . '</a>'; 318 318 319 319 $action_links = apply_filters('theme_install_action_links', $action_links, $theme); … … 321 321 echo " 322 322 <div class='theme-item available-theme'> 323 <a class='thickbox screenshot' href='$preview_link'>323 <a class='thickbox thickbox-preview screenshot' href='$preview_link' title='" . attribute_escape(sprintf(__('Preview "%s"'), $name)) . "'> 324 324 <img src='{$theme->screenshot_url}' width='150' /> 325 325 </a> -
trunk/wp-admin/js/theme-preview.dev.js
r10590 r10592 14 14 }; 15 15 16 return $('a.thickbox ').each( function() {17 var href = $(this). attr('href');16 return $('a.thickbox-preview').each( function() { 17 var href = $(this).parents('.available-theme').find('.previewlink').attr('href'); 18 18 if ( ! href ) return; 19 19 href = href.replace(/&width=[0-9]+/g, ''); -
trunk/wp-admin/js/theme-preview.js
r10590 r10592 1 var thickDims;jQuery(document).ready(function(a){thickDims=function(){var d=a("#TB_window"),c=a(window).height(),b=a(window).width();if(d.size()){d.width(b-90).height(c-60);a("#TB_iframeContent").width(b-90).height(c-90);d.css({"margin-left":"-"+parseInt(((b-90)/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){d.css({top:"30px","margin-top":"0"})}}return a("a.thickbox ").each(function(){var e=a(this).attr("href");if(!e){return}e=e.replace(/&width=[0-9]+/g,"");e=e.replace(/&height=[0-9]+/g,"");a(this).attr("href",e+"&width="+(b-110)+"&height="+(c-100))})};thickDims().click(function(){var c=a(this).parents(".available-theme").find(".activatelink"),b=c.attr("href"),d=c.html();if(null==d){d=""}a("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});a("#TB_closeAjaxWindow").css({"float":"left"});a("#TB_ajaxWindowTitle").css({"float":"right"}).append(' <a href="'+b+'" target="_top" class="tb-theme-preview-link">'+d+"</a>");a("#TB_iframeContent").width("100%");return false});a(window).resize(function(){thickDims()})});function tb_position(){thickDims()};1 var thickDims;jQuery(document).ready(function(a){thickDims=function(){var d=a("#TB_window"),c=a(window).height(),b=a(window).width();if(d.size()){d.width(b-90).height(c-60);a("#TB_iframeContent").width(b-90).height(c-90);d.css({"margin-left":"-"+parseInt(((b-90)/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){d.css({top:"30px","margin-top":"0"})}}return a("a.thickbox-preview").each(function(){var e=a(this).parents(".available-theme").find(".previewlink").attr("href");if(!e){return}e=e.replace(/&width=[0-9]+/g,"");e=e.replace(/&height=[0-9]+/g,"");a(this).attr("href",e+"&width="+(b-110)+"&height="+(c-100))})};thickDims().click(function(){var c=a(this).parents(".available-theme").find(".activatelink"),b=c.attr("href"),d=c.html();if(null==d){d=""}a("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});a("#TB_closeAjaxWindow").css({"float":"left"});a("#TB_ajaxWindowTitle").css({"float":"right"}).append(' <a href="'+b+'" target="_top" class="tb-theme-preview-link">'+d+"</a>");a("#TB_iframeContent").width("100%");return false});a(window).resize(function(){thickDims()})});function tb_position(){thickDims()}; -
trunk/wp-admin/themes.php
r10591 r10592 175 175 $preview_text = attribute_escape( sprintf( __('Preview of "%s"'), $title ) ); 176 176 $tags = $themes[$theme_name]['Tags']; 177 $thickbox_class = 'thickbox ';177 $thickbox_class = 'thickbox thickbox-preview'; 178 178 $activate_link = wp_nonce_url("themes.php?action=activate&template=".urlencode($template)."&stylesheet=".urlencode($stylesheet), 'switch-theme_' . $template); 179 179 $activate_text = attribute_escape( sprintf( __('Activate "%s"'), $title ) ); 180 180 ?> 181 <a href="<?php echo $ preview_link; ?>" class="<?php echo $thickbox_class; ?> screenshot">181 <a href="<?php echo $activate_link; ?>" class="<?php echo $thickbox_class; ?> screenshot"> 182 182 <?php if ( $screenshot ) : ?> 183 183 <img src="<?php echo WP_CONTENT_URL . $stylesheet_dir . '/' . $screenshot; ?>" alt="" /> 184 184 <?php endif; ?> 185 185 </a> 186 <h3><a class="<?php echo $thickbox_class; ?>" href="<?php echo $ preview_link; ?>"><?php echo $title; ?></a></h3>186 <h3><a class="<?php echo $thickbox_class; ?>" href="<?php echo $activate_link; ?>"><?php echo $title; ?></a></h3> 187 187 <p><?php echo $description; ?></p> 188 188 <?php if ( $tags ) : ?> -
trunk/wp-includes/script-loader.php
r10590 r10592 342 342 )); 343 343 344 $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '2009021 8' );344 $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090219' ); 345 345 $scripts->add_data( 'theme-preview', 'group', 1 ); 346 346
Note: See TracChangeset
for help on using the changeset viewer.