Theme Installer: Separate API from an event handler to avoid issues where a false return value stops the event.

see #27055.

Built from https://develop.svn.wordpress.org/trunk@27963


git-svn-id: http://core.svn.wordpress.org/trunk@27793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-04-05 20:46:15 +00:00
parent f532f117e1
commit 7cd04f4829
2 changed files with 10 additions and 5 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 },

File diff suppressed because one or more lines are too long