Ticket #28581: 28581.patch
File 28581.patch, 1.6 KB (added by , 9 years ago) |
---|
-
src/wp-admin/js/theme.js
362 362 363 363 events: { 364 364 'click': themes.isInstall ? 'preview': 'expand', 365 'click .preview': 'preview',366 365 'keydown': themes.isInstall ? 'preview': 'expand', 367 366 'touchend': themes.isInstall ? 'preview': 'expand', 368 367 'keyup': 'addFocus', … … 487 486 preview.$el.removeClass( 'no-navigation' ); 488 487 } 489 488 490 // Ap end preview489 // Append preview 491 490 $( 'div.wrap' ).append( preview.el ); 492 491 493 492 // Listen to our preview object … … 511 510 return self.current = current; 512 511 } 513 512 514 // Construct a new Preview view. 515 preview = new themes.view.Preview({ 516 model: self.current 517 }); 513 preview.model = self.current; 518 514 519 515 // Render and append. 520 516 preview.render(); 521 517 this.setNavButtonsState(); 522 $( 'div.wrap' ).append( preview.el );523 518 $( '.next-theme' ).focus(); 524 519 }) 525 520 .listenTo( preview, 'theme:previous', function() { … … 545 540 return; 546 541 } 547 542 548 // Construct a new Preview view. 549 preview = new themes.view.Preview({ 550 model: self.current 551 }); 543 preview.model = self.current; 552 544 553 545 // Render and append. 554 546 preview.render(); 555 547 this.setNavButtonsState(); 556 $( 'div.wrap' ).append( preview.el );557 548 $( '.previous-theme' ).focus(); 558 549 }); 559 550 … … 786 777 787 778 themes.router.navigate( themes.router.baseUrl( '' ) ); 788 779 this.trigger( 'preview:close' ); 780 this.undelegateEvents(); 789 781 this.unbind(); 790 782 return false; 791 783 },