Theme Installer: Separate API from an event handler to avoid issues where a false return value stops the event.
see #27055. git-svn-id: https://develop.svn.wordpress.org/trunk@27963 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e40de50197
commit
12f66b9859
@ -1236,8 +1236,8 @@ themes.view.Installer = themes.view.Appearance.extend({
|
|||||||
'click .theme-section': 'onSort',
|
'click .theme-section': 'onSort',
|
||||||
'click .theme-filter': 'onFilter',
|
'click .theme-filter': 'onFilter',
|
||||||
'click .more-filters': 'moreFilters',
|
'click .more-filters': 'moreFilters',
|
||||||
'click .apply-filters': 'addFilter',
|
'click .apply-filters': 'applyFilters',
|
||||||
'click [type="checkbox"]': 'filtersChecked',
|
'click [type="checkbox"]': 'addFilter',
|
||||||
'click .clear-filters': 'clearFilters',
|
'click .clear-filters': 'clearFilters',
|
||||||
'click .feature-name': 'filterSection',
|
'click .feature-name': 'filterSection',
|
||||||
'click .filtering-by a': 'backToFilters'
|
'click .filtering-by a': 'backToFilters'
|
||||||
@ -1365,8 +1365,13 @@ themes.view.Installer = themes.view.Appearance.extend({
|
|||||||
this.collection.query( request );
|
this.collection.query( request );
|
||||||
},
|
},
|
||||||
|
|
||||||
// Clicking on a checkbox triggers a tag request
|
// Clicking on a checkbox to add another filter to the request
|
||||||
addFilter: function( event ) {
|
addFilter: function() {
|
||||||
|
this.filtersChecked();
|
||||||
|
},
|
||||||
|
|
||||||
|
// Applying filters triggers a tag request
|
||||||
|
applyFilters: function( event ) {
|
||||||
var name,
|
var name,
|
||||||
tags = this.filtersChecked(),
|
tags = this.filtersChecked(),
|
||||||
request = { tag: tags },
|
request = { tag: tags },
|
||||||
|
Loading…
Reference in New Issue
Block a user