Ticket #38663: 38663.diff
File 38663.diff, 1.7 KB (added by , 7 years ago) |
---|
-
src/wp-admin/js/customize-controls.js
1173 1173 1174 1174 // Expand section/panel. Only collapse when opening another section. 1175 1175 section.filterContainer.on( 'click', '.customize-themes-section-title', function() { 1176 // Open the section.1177 if ( ! section.expanded() ) {1178 section.expand();1179 }1180 1176 1181 1177 // Toggle filters. 1182 1178 if ( section.filterContainer.find( '.filter-details' ).length ) { … … 1187 1183 }); 1188 1184 section.filterContainer.find( '.filter-details' ).slideToggle( 180 ); 1189 1185 } 1186 1187 // Open the section. 1188 if ( ! section.expanded() ) { 1189 1190 // Don't expand if there's nothing to show. 1191 if ( -1 !== $.inArray( section.params.action, [ 'search', 'favorites', 'feature_filter' ] ) && '' === section.term ) { 1192 return; 1193 } else { 1194 section.expand(); 1195 } 1196 } 1190 1197 }); 1191 1198 1192 1199 // Preview installed themes. … … 1248 1255 } 1249 1256 }); 1250 1257 } else if ( 'favorites' === section.params.action ) { 1258 section.checkTerm( section ); // Expand the section if there's already a term. 1251 1259 section.container.on( 'click', '.favorites-form-submit', function() { 1252 1260 section.checkTerm( section ); 1253 1261 }); … … 1258 1266 section.checkTerm( section ); 1259 1267 }); 1260 1268 } else if ( 'feature_filter' === section.params.action ) { 1269 section.checkTerm( section ); // Expand the section if there's already a term. 1261 1270 section.container.on( 'click', '.filter-group input', function() { 1262 1271 section.filtersChecked(); 1263 1272 section.checkTerm( section );