Clean-up Matrix search template JS.
Add link back to main matrix screen. Make initial search results match search form defaults. fixes #10766, 10786
This commit is contained in:
parent
808a558ec8
commit
f942489787
3 changed files with 19 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
|||
7.7.18
|
||||
- fixed #10766: Matrix search: search dropdowns do not match what is displayed when search form opens.
|
||||
- fixed #10783: Inbox Copy Sender broken
|
||||
- fixed #10782: Send Message friend_wholeName template var
|
||||
- fixed #10778: Matrix navigation: list attributes
|
||||
|
|
|
|||
BIN
docs/upgrades/packages-7.7.18/matrix-search-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.18/matrix-search-template.wgpkg
Normal file
Binary file not shown.
|
|
@ -1160,6 +1160,7 @@ sub www_getCompareFormData {
|
|||
my @listingIds = $session->form->checkList("listingId");
|
||||
|
||||
$session->http->setMimeType("application/json");
|
||||
my $db = $session->db;
|
||||
|
||||
my (@searchParams,@searchParams_sorted,@searchParamList,$searchParamList);
|
||||
if($form->process("search")){
|
||||
|
|
@ -1172,8 +1173,23 @@ sub www_getCompareFormData {
|
|||
$attributeId =~ s/^search_//;
|
||||
$attributeId =~ s/_____/-/g;
|
||||
$parameter->{attributeId} = $attributeId;
|
||||
push(@searchParamList,'"'.$parameter->{attributeId}.'"');
|
||||
push(@searchParams,$parameter);
|
||||
push(@searchParamList, $db->quote($parameter->{attributeId}) );
|
||||
push(@searchParams, $parameter);
|
||||
}
|
||||
}
|
||||
if (! scalar @searchParamList) {
|
||||
##Use defaults for all form values
|
||||
foreach my $category (keys %{$self->getCategories}) {
|
||||
my $attributes = $db->read("select * from Matrix_attribute where category =? and assetId = ?",
|
||||
[$category,$self->getId]);
|
||||
while (my $attribute = $attributes->hashRef) {
|
||||
push @searchParamList, $db->quote($attribute->{attributeId});
|
||||
push @searchParams, {
|
||||
name => $attribute->{name},
|
||||
value => $attribute->{defaultValue},
|
||||
attributeId => $attribute->{attributeId},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
$searchParamList = join(',',@searchParamList);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue