Changeset 31954
- Timestamp:
- 04/01/2015 12:35:26 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/customize-controls.css
r31918 r31954 907 907 } 908 908 909 .wp-customizer .theme-browser .theme.active .theme-name {910 padding-right: 15px;911 }912 913 909 .wp-customizer #themes-filter { 914 910 font-size: 16px; … … 916 912 line-height: 1.5; 917 913 width: 100%; 914 } 915 916 917 .wp-customizer .theme-browser .theme.active:hover, 918 .wp-customizer .theme-browser .theme.active:focus { 919 cursor: default; 920 } 921 922 .wp-customizer .theme-browser .theme.active .more-details { 923 display: none; 924 } 925 926 .wp-customizer .theme-browser .theme.active .theme-name { 927 padding-right: 15px; 928 } 929 930 .wp-customizer .theme-browser.rendered .theme.active:hover .theme-screenshot img, 931 .wp-customizer .theme-browser.rendered .theme.active:focus .theme-screenshot img { 932 opacity: 1; 918 933 } 919 934 -
trunk/src/wp-admin/includes/theme.php
r31943 r31954 548 548 </div> 549 549 550 < div class="theme-actions">551 < # if ( ! data.active ) { #>550 <# if ( ! data.active ) { #> 551 <div class="theme-actions"> 552 552 <div class="inactive-theme"> 553 553 <a href="<?php echo add_query_arg( 'theme', '{{ data.id }}' ); ?>" target="_top" class="button button-primary"><?php _e( 'Live Preview' ); ?></a> 554 554 </div> 555 < # } #>556 < /div>555 </div> 556 <# } #> 557 557 </div> 558 558 </script> -
trunk/src/wp-admin/js/customize-controls.js
r31944 r31954 647 647 648 648 section.closeDetails(); 649 });650 651 section.container.on( 'click keydown', '.theme-actions .button', function( event ) {652 if ( api.utils.isKeydownButNotEnterEvent( event ) ) {653 return;654 }655 656 $( '.wp-full-overlay' ).addClass( 'customize-loading' );657 649 }); 658 650 … … 1908 1900 } 1909 1901 1910 api.section( control.section() ).showDetails( control.params.theme ); 1911 }); 1912 1913 control.container.on( 'click keydown', '.theme-actions .button', function( event ) { 1902 if ( $( this ).hasClass( 'active' ) ) { 1903 return; 1904 } 1905 1906 var previewUrl = $( this ).data( 'previewUrl' ); 1907 1908 $( '.wp-full-overlay' ).addClass( 'customize-loading' ); 1909 1910 window.parent.location = previewUrl; 1911 }); 1912 1913 control.container.on( 'click keydown', '.theme-actions .theme-details', function( event ) { 1914 1914 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 1915 1915 return; 1916 1916 } 1917 1917 1918 $( '.wp-full-overlay' ).addClass( 'customize-loading' ); 1918 event.preventDefault(); // Keep this AFTER the key filter above 1919 1920 api.section( control.section() ).showDetails( control.params.theme ); 1919 1921 }); 1920 1922 }, -
trunk/src/wp-includes/class-wp-customize-control.php
r31950 r31954 1201 1201 */ 1202 1202 public function content_template() { 1203 ?> 1204 <div class="theme<# if ( data.theme.active ) { #> active<# } #>" tabindex="0" aria-describedby="{{ data.theme.id }}-action {{ data.theme.id }}-name"> 1203 $preview_url = site_url( add_query_arg( 'theme', '{{ data.theme.id }}' ) ); 1204 ?> 1205 <div class="theme<# if ( data.theme.active ) { #> active<# } #>"<# if ( ! data.theme.active ) { #> tabindex="0"<# } #> data-preview-url="<?php echo esc_attr( $preview_url ); ?>" aria-describedby="{{ data.theme.id }}-action {{ data.theme.id }}-name"> 1205 1206 <# if ( data.theme.screenshot[0] ) { #> 1206 1207 <div class="theme-screenshot"> … … 1210 1211 <div class="theme-screenshot blank"></div> 1211 1212 <# } #> 1212 <span class="more-details" id="{{ data.theme.id }}-action"><?php _e( ' Theme Details' ); ?></span>1213 <span class="more-details" id="{{ data.theme.id }}-action"><?php _e( 'Live Preview' ); ?></span> 1213 1214 <div class="theme-author"><?php printf( __( 'By %s' ), '{{ data.theme.author }}' ); ?></div> 1214 1215 … … 1226 1227 <# if ( ! data.theme.active ) { #> 1227 1228 <div class="theme-actions"> 1228 < a class="button" href="<?php echo add_query_arg( 'theme', '{{ data.theme.id }}' ); ?>" target="_top"><?php _e( 'Live Preview' ); ?></a>1229 <button type="button" class="button theme-details"><?php _e( 'Theme Details' ); ?></button> 1229 1230 </div> 1230 1231 <# } #>
Note: See TracChangeset
for help on using the changeset viewer.