Themes: Open preview when requesting a single theme in the installer.

Props kraftner, obenland.
Fixes #28735.



git-svn-id: https://develop.svn.wordpress.org/trunk@33650 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Konstantin Obenland 2015-08-19 18:53:36 +00:00
parent f0ec4d5a7b
commit 2ec26f617f

View File

@ -454,6 +454,8 @@ themes.view.Theme = wp.Backbone.View.extend({
var self = this,
current, preview;
event = event || window.event;
// Bail if the user scrolled on a touch device
if ( this.touchDrag === true ) {
return this.touchDrag = false;
@ -1658,6 +1660,9 @@ themes.RunInstaller = {
themes.router.on( 'route:preview', function( slug ) {
request.theme = slug;
self.view.collection.query( request );
self.view.collection.once( 'update', function() {
self.view.view.theme.preview();
});
});
// Handles sorting / browsing routes