Ticket #25962: 25962.diff
File 25962.diff, 2.7 KB (added by , 11 years ago) |
---|
-
wp-admin/js/theme.js
61 61 var view, 62 62 self = this; 63 63 64 // Don't render the search if the user cannot see all the themes 65 if ( ! themes.data.settings.switchThemes ) { 66 return; 67 } 68 64 69 view = new themes.view.Search({ collection: self.collection }); 65 70 66 71 // Render and append after screen title … … 163 168 collection = _( collection.first( 15 ) ); 164 169 165 170 return collection; 171 }, 172 173 singleThemeMode: function() { 174 var current = this.findWhere({ active: true }); 175 176 if ( current ) { 177 this.reset( current ); 178 } 166 179 } 167 180 }); 168 181 … … 408 421 // Clear the DOM, please 409 422 this.$el.html( '' ); 410 423 424 // If the user doesn't have switch capabilities 425 // render the detailed view of the active theme 426 if ( ! themes.data.settings.switchThemes ) { 427 // Sets up the collection changes 428 this.collection.singleThemeMode(); 429 430 // Constructs the view 431 this.singleTheme = new themes.view.Details({ 432 model: this.collection.models[0] 433 }); 434 435 // Render and apply a 'single-theme' class to our container 436 this.singleTheme.render(); 437 this.$el.addClass( 'single-theme' ); 438 this.$el.append( this.singleTheme.el ); 439 } 440 411 441 // Generate the themes 412 442 // Using page instance 413 443 this.renderThemes( this.parent.page ); -
wp-admin/css/wp-admin.css
7052 7052 .theme-overlay .parent-theme strong { 7053 7053 font-weight: 700; 7054 7054 } 7055 /** 7056 * Single Theme Mode 7057 * Displays detailed view inline when a user has no switch capabilities 7058 */ 7059 .single-theme .theme-overlay .theme-backdrop, 7060 .single-theme .theme-overlay .theme-header, 7061 .single-theme .theme { 7062 display: none; 7063 } 7064 .single-theme .theme-overlay .theme-wrap { 7065 clear: both; 7066 position: static; 7067 } 7068 .single-theme .theme-overlay .theme-about { 7069 padding: 30px; 7070 position: static; 7071 } 7072 .single-theme .theme-overlay .theme-actions { 7073 position: static; 7074 } 7055 7075 7056 7076 /** 7057 7077 * Basic Responsive structure... -
wp-admin/themes.php
100 100 'confirmDelete' => __( "Are you sure you want to delete this theme?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete." ), 101 101 'root' => admin_url( 'themes.php' ), 102 102 'extraRoutes' => '', 103 'switchThemes' => false, // needs proper logic here 103 104 ), 104 105 'l10n' => array( 105 106 'addNew' => __( 'Add New Theme' ),