[#1817] Search Criteria displaying incorrectly

13 years 10 months ago #136443 by Muuurgh
Hi all

Joomla 1.5.18
CB 1.2.2

I've got an issue with jquery, user lists and search users.

When the default user list is displayed, the option to "Search Users" is also shown. On clicking that, I believe jquery is called to display the hidden field which contains all the search parameters. However, the text fields are not hidden when this happen.

When you go straight to a list page, where the search options are displayed by default, those text fields slide out of view and display as would be expected.

I was hoping someone would be able to save me time by providing the fix forthis as my jquery skills aren't great. Or at the very least telling me which files I need to edit?

Post edited by: krileon, at: 2010/06/25 19:36

Please Log in to join the conversation.

13 years 10 months ago #136491 by krileon
Replied by krileon on topic Re:Search Criteria displaying incorrectly
Please provide a link to your issue if possible as am not completely understanding your problem. Sounds like you have a JS conflict, please review your browsers Error Console for any fatal errors.


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 10 months ago #136530 by Muuurgh
Replied by Muuurgh on topic Re:Search Criteria displaying incorrectly
I'd love to provide a link, but it's an intranet so I can't.

Here's how to repeat the issue.

1. Create a userlist, and set it to be default. I created a list of all registered users and above. Make this the default. Make sure it's publicly accessible. Set the multi criteria search options to all searchable fields and advanced, respectively.
2. Create a second userlist. Doesn't really matter what they are. Make sure it's publicly accessible. Set the multi criteria search options to all searchable fields and advanced, respectively.
3. Create a menu item of type Community Builder - User List. Leave the list ID blank. Leave searchmode as show list.
4. Navigate to your site.
5. Click the menu item you've created to take you to view the list of users.
6. In the top right of the page, you should see a drop down box listing both lists you have created. Below that is a link, "Search Users".

If you have that, you have the same setup as I do. Here's how to repeat the bug.

Good Behaviour: Select your second list from the drop down box. When the list loads, the search criteria also load automatically, but the default value is "No Preference" and the text field where you can enter text is hidden until you select an option from the search criteria drop down box.

Bad Behaviour: Instead of selecting a user list, click the "Search Users" link. The search criteria are then displayed, but the text fields are not hidden. If you then click the search criteria drop down (any of them), you can see the jquery kick in and realise it should hide the field.

Turning on break on all errors on the Firebug console shows that there are no errors, and this bug is repeatable in FF 3.6, Chrome 5 and IE8. It's not a javascript fatal error, as the desired behaviour can work if you then fire other JS events.

This is not a deal breaker, and the fact CB is free and does 99% of everything we want it to is fantastic. This is just a minor thing that is easily lived with, that would just be great to fix.

I've assumed this is jquery not mootools, as CB has a large jquery library installed with it. Any pointers in the right direction greatly appreciated.

Please Log in to join the conversation.

13 years 10 months ago #136531 by nant
is all of this happening with the default joomla template?

Please Log in to join the conversation.

13 years 10 months ago #136532 by Muuurgh
Replied by Muuurgh on topic Re:Search Criteria displaying incorrectly
I knew I'd overlooked something potentially simple, let me quickly test that....

Despite the site looking really bad in the standard template, the behaviour of the search criteria area remains the same as outlined above, so it's not related to the Artisteer template we're using.

Post edited by: Muuurgh, at: 2010/06/25 12:40

Please Log in to join the conversation.

13 years 10 months ago #136538 by Muuurgh
Replied by Muuurgh on topic Re:Search Criteria displaying incorrectly
Ok, here's the fix.

File: /components/com_comprofiler/comprofiler.html.php

Lines: 804-805 are
[code:1]
// Hide the Search Criteria part and Results title:
. "\n $('#cbUserListsSearcher').hide();"[/code:1]

Replace those 2 lines with these 4

[code:1]
// Hide the search criteria areas before hiding the entire area
. "\n $('.cbSearchCriteria').hide();"
// Hide the Search Criteria part and Results title:
. "\n $('#cbUserListsSearcher').hide();"[/code:1]

That will fix the bug. It's simply hiding the criteria textfields before hiding the entire containing div. Perhaps the order should be different, but this order makes the most sense to me.

--- Ben

Post edited by: Muuurgh, at: 2010/06/25 17:14

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.217 seconds

Facebook Twitter LinkedIn