Changeset 28033
- Timestamp:
- 04/08/2014 03:57:01 AM (11 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/themes.css
r28025 r28033 1771 1771 1772 1772 #customize-container iframe, 1773 #theme-installeriframe {1773 .theme-install-overlay iframe { 1774 1774 height: 100%; 1775 1775 width: 100%; … … 1787 1787 } 1788 1788 1789 #theme-installer{1789 .theme-install-overlay { 1790 1790 display: none; 1791 1791 } 1792 1792 1793 #theme-installer.single-theme {1793 .theme-install-overlay.single-theme { 1794 1794 display: block; 1795 1795 } … … 1804 1804 } 1805 1805 1806 #theme-installer.install-theme-info {1806 .theme-install-overlay .install-theme-info { 1807 1807 display: block; 1808 1808 } … … 1847 1847 } 1848 1848 1849 #theme-installer.wp-full-overlay-header {1849 .theme-install-overlay .wp-full-overlay-header { 1850 1850 margin-top: 9px; 1851 1851 } 1852 1852 1853 #theme-installer.wp-full-overlay-header .theme-install {1853 .theme-install-overlay .wp-full-overlay-header .theme-install { 1854 1854 float: right; 1855 1855 /* For when .theme-install is a span rather than a.button-primary (already installed theme) */ … … 1857 1857 } 1858 1858 1859 #theme-installer.wp-full-overlay-sidebar {1859 .theme-install-overlay .wp-full-overlay-sidebar { 1860 1860 background: #EEE; 1861 1861 border-right: 1px solid #DDD; 1862 1862 } 1863 1863 1864 #theme-installer.wp-full-overlay-main {1864 .theme-install-overlay .wp-full-overlay-main { 1865 1865 background: #fff url(../images/spinner.gif) no-repeat center center; 1866 1866 -webkit-background-size: 20px 20px; … … 1885 1885 1886 1886 .customize-loading #customize-container, 1887 #theme-installer.wp-full-overlay-main {1887 .theme-install-overlay .wp-full-overlay-main { 1888 1888 background-image: url(../images/spinner-2x.gif); 1889 1889 } -
trunk/src/wp-admin/js/theme.js
r28025 r28033 444 444 }, 445 445 446 // Handles .disabled classes for previous/next buttons in theme installer preview 447 setNavButtonsState: function() { 448 var $themeInstaller = $( '.theme-install-overlay' ), 449 current = _.isUndefined( this.current ) ? this.model : this.current; 450 451 // Disable previous at the zero position 452 if ( 0 === this.model.collection.indexOf( current ) ) { 453 $themeInstaller.find( '.previous-theme' ).addClass( 'disabled' ); 454 } 455 456 // Disable next if the next model is undefined 457 if ( _.isUndefined( this.model.collection.at( this.model.collection.indexOf( current ) + 1 ) ) ) { 458 $themeInstaller.find( '.next-theme' ).addClass( 'disabled' ); 459 } 460 }, 461 446 462 preview: function( event ) { 447 463 var self = this, … … 512 528 // Render and append. 513 529 preview.render(); 530 this.setNavButtonsState(); 514 531 $( 'div.wrap' ).append( preview.el ); 515 532 $( '.next-theme' ).focus(); … … 540 557 // Render and append. 541 558 preview.render(); 559 this.setNavButtonsState(); 542 560 $( 'div.wrap' ).append( preview.el ); 543 561 $( '.previous-theme' ).focus(); 544 562 }); 563 self.setNavButtonsState(); 545 564 } 546 565 }); … … 677 696 }, 678 697 679 // Confirmation dialog efor deleting a theme698 // Confirmation dialog for deleting a theme 680 699 deleteTheme: function() { 681 700 return confirm( themes.data.settings.confirmDelete ); … … 685 704 var self = this; 686 705 self.trigger( 'theme:next', self.model.cid ); 706 return false; 687 707 }, 688 708 … … 690 710 var self = this; 691 711 self.trigger( 'theme:previous', self.model.cid ); 712 return false; 692 713 }, 693 714 … … 713 734 714 735 className: 'wp-full-overlay expanded', 715 el: ' #theme-installer',736 el: '.theme-install-overlay', 716 737 717 738 events: { … … 726 747 727 748 render: function() { 728 var data = this.model.toJSON(); 749 var data = this.model.toJSON(), 750 self = this; 729 751 this.$el.html( this.html( data ) ); 730 752 … … 732 754 733 755 this.$el.fadeIn( 200, function() { 734 $( 'body' ).addClass( 'theme-installer-active full-overlay-active' ); 756 $( 'body' ) 757 .addClass( 'theme-installer-active full-overlay-active' ) 758 .on( 'keyup.overlay', function( event ) { 759 // Pressing the escape key closes the preview 760 if ( event.keyCode === 27 ) { 761 self.close(); 762 } 763 }); 735 764 $( '.close-full-overlay' ).focus(); 736 765 }); … … 739 768 close: function() { 740 769 this.$el.fadeOut( 200, function() { 741 $( 'body' ).removeClass( 'theme-installer-active full-overlay-active' ) ;770 $( 'body' ).removeClass( 'theme-installer-active full-overlay-active' ).off( 'keyup.overlay' ); 742 771 743 772 // Return focus to the theme div -
trunk/src/wp-admin/theme-install.php
r28025 r28033 159 159 </div> 160 160 <div class="theme-browser"></div> 161 <div id="theme-installer" class="wp-full-overlay expanded"></div>161 <div class="theme-install-overlay wp-full-overlay expanded"></div> 162 162 163 163 <p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>
Note: See TracChangeset
for help on using the changeset viewer.