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:
Andrew Nacin 2014-04-05 20:45:37 +00:00
parent e40de50197
commit 12f66b9859
1 changed files with 9 additions and 4 deletions

View File

@ -1236,8 +1236,8 @@ themes.view.Installer = themes.view.Appearance.extend({
'click .theme-section': 'onSort',
'click .theme-filter': 'onFilter',
'click .more-filters': 'moreFilters',
'click .apply-filters': 'addFilter',
'click [type="checkbox"]': 'filtersChecked',
'click .apply-filters': 'applyFilters',
'click [type="checkbox"]': 'addFilter',
'click .clear-filters': 'clearFilters',
'click .feature-name': 'filterSection',
'click .filtering-by a': 'backToFilters'
@ -1365,8 +1365,13 @@ themes.view.Installer = themes.view.Appearance.extend({
this.collection.query( request );
},
// Clicking on a checkbox triggers a tag request
addFilter: function( event ) {
// Clicking on a checkbox to add another filter to the request
addFilter: function() {
this.filtersChecked();
},
// Applying filters triggers a tag request
applyFilters: function( event ) {
var name,
tags = this.filtersChecked(),
request = { tag: tags },