filter by current species

This commit is contained in:
Emi Matchu 2014-04-02 21:01:12 -05:00
parent 3c36cd6aef
commit afface7fa7
2 changed files with 5 additions and 1 deletions

View file

@ -1144,7 +1144,8 @@ View.Search = function (wardrobe) {
nc: $('#advanced-search-nc').val(),
occupies: $('#advanced-search-occupies').val(),
restricts: $('#advanced-search-restricts').val(),
species: $('#advanced-search-species').val(),
species: $('#advanced-search-species').is(":checked") ?
wardrobe.outfits.getPetType().species_id : null,
owns: $('#advanced-search-owns').val(),
wants: $('#advanced-search-wants').val()
};

View file

@ -1330,6 +1330,9 @@ function Wardrobe() {
if (query.restricts)
filters.push({key: "restricted_zone_set_name", value: query.restricts,
is_positive: true});
if (query.species)
filters.push({key: "species_support_id", value: query.species,
is_positive: true});
return filters;
}