[#1817] Search Criteria displaying incorrectly

13 years 10 months ago #136557 by krileon
Replied by krileon on topic Re:Search Criteria displaying incorrectly
Have created a bug ticket for your issue to be further addressed, but believe is resolved in next release (CB 1.2.3) already as could not duplicate locally.

#1817


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 9 months ago #136644 by enet
Hi,

what about hiding search criteria in the result page?
In the default user list I put a lot of search criteria, so when someone makes a search he may not see the results at the end of the page.
Is there a way to have search criteria only in search page but hide them in the result page?

Thanks.

E-net

Please Log in to join the conversation.

13 years 9 months ago #136669 by Muuurgh
Hi

First, you should put this as a new post, so you're not hijacking my thread ;) and also so it doesn't get lost amongst all the other threads.

But as for your question, I don't think hiding the criteria is a great idea. How will the users know what they've searched for if it's not right in front of them? I see that you're trying to make the page more usable (show the results asap) but to do that by taking away some of the usability of the page isn't a great idea.

All that being said though, you could certainly change the javascript to handle that as it's all around the same section of the file. If you're going to hide that div, make sure you add a button to show it again, as the list all users link takes you to a new page. Or, even better, simply slide the view of the user down to the results. Currently there's no anchor, but the "Search Results" seems to be the only div with the class component heading. It's also at the bottom of the cbUserListsSearcher div, so scrolling down to the bottom of that would also do the trick.

--- Ben

Please Log in to join the conversation.

13 years 9 months ago #137147 by Muuurgh
Hi Kyle

The next thing I had needed to do is display the name field pre-selected to be "contains any of". I didn't see an option in the administration? So I re-wrote my code.
[code:1]// Hide the Search Criteria part and Results title:
. "\n $('#cbUserListsSearcher').hide();"
// Set the value for the name search field
. "\n $('#cbfr_41 select').val('any');"
// Hide all the fields that do not have a value selected
. "\n $('.cbUserListSearchFields select').each(function () {"
. "\n $(this).click();"
. "\n });"[/code:1]

Basically, I set the value for the chosen field, and then called the cbsearchkrit function via the click method.

But to do that I had to move the php variable (which holds that JS function) $searchTabJs up above the $jsSearch variable. Otherwise cbsearchkrit wasn't yet assigned to the click event.

You said that the original issue was fixed in the next version of CB, so hopefully this code isn't needed, but by moving the code around it should allow a bit more future-proofing, for when you do allow search criteria pre-selection in user lists :)

I'm off to submit another bug, hopefully the forum is the right way as I couldn't find any other way of submitting them.

--- Ben

Please Log in to join the conversation.

13 years 8 months ago #139740 by beat
Can you confirm that this Is now fixed in CB 1.2.3 ? :)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

13 years 8 months ago #139762 by Muuurgh
Hi Beat

Just uploaded the new version to my test install (still on J1.5.18), and the default behaviour works as expected (i.e. It is fixed).

I also like the way you've taken the JS out of that long HTML file :)

Cheers

Ben

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.682 seconds

Facebook Twitter LinkedIn