diff --git src/wp-admin/js/theme.js src/wp-admin/js/theme.js
index 39ed26a..405784b 100644
|
|
themes.view.Theme = wp.Backbone.View.extend({ |
492 | 492 | themes.focusedTheme = this.$el; |
493 | 493 | |
494 | 494 | // Construct a new Preview view. |
495 | | themes.currentPreview = preview = new themes.view.Preview({ |
| 495 | preview = new themes.view.Preview({ |
496 | 496 | model: this.model |
497 | 497 | }); |
498 | 498 | |
… |
… |
themes.view.Theme = wp.Backbone.View.extend({ |
573 | 573 | self.current = self.model; |
574 | 574 | }); |
575 | 575 | |
576 | | // Listen for closepreview events, closing the preview. |
577 | | this.listenTo( preview, 'closepreview', function() { |
578 | | preview.close(); |
579 | | }); |
580 | 576 | }, |
581 | 577 | |
582 | 578 | // Handles .disabled classes for previous/next buttons in theme installer preview |
… |
… |
themes.RunInstaller = { |
1943 | 1939 | self.view.sort( sort ); |
1944 | 1940 | |
1945 | 1941 | // Close the preview if open. |
1946 | | if ( themes.currentPreview ) { |
1947 | | themes.currentPreview.trigger( 'closepreview' ); |
| 1942 | if ( themes.focusedTheme ) { |
| 1943 | $( '.close-full-overlay' ).click(); |
1948 | 1944 | } |
1949 | 1945 | }); |
1950 | 1946 | |