<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Expand or Collapse All Messages in a Thread in the EE Messaging System

Published on
8,407 Points
1,807 Views
6 Endorsements
Last Modified:
Approved
Joe Winograd, Fellow&MVE
50+ years in computer industry. Everything from development to sales. CIO. Document imaging. EE MVE 2015, EE MVE 2016, EE FELLOW 2017.
In Q3 of last year, Experts Exchange introduced a new Messaging System, allowing any member to communicate directly with other members.

During an especially long thread with a member, I wanted to go back to previous messages in the exchange to refresh my memory on an issue. However, the Message System doesn't have a Search function that allows you to search the contents of all messages in a thread. But then it occurred to me that I could take advantage of the search feature in my browser, Firefox (Edit>Find or Ctrl-F). However, to do that, all of the messages would have to be expanded by clicking the plus sign next to each one:
Plus-sign---Expand.jpgThat's very painful in a long thread! So I submitted an enhancement request entitled Need the ability to expand/collapse all messages in a thread  in the Messaging System testing project. An EE Administrator, eenookami, replied to my request with a fantastic work-around — JavaScript code to expand all messages in a thread, as well as JavaScript code to collapse all of them.

In the spirit of giving credit where credit is due, all of the credit goes to eenookami for this solution. My only minor contributions are taking the time to write the article in order to share the solution with other members of the EE community and adding an explanation of how to place the Expand All and Collapse All items on the Firefox Bookmarks Toolbar (I'm sure this can be achieved in other modern browsers, but this article discusses only Firefox — I hope other members post comments on this article explaining how to do it in other browsers or, even better, write their own articles on it).

Here are the solution steps for Firefox (probably works on all releases, or at least relatively recent ones):

o  If you don't already use the Bookmarks Toolbar, click the View menu, then Bookmarks, then Bookmarks Toolbar.

o  Click the Bookmarks menu, then Show All Bookmarks.

o  In the left pane, right-click on the Bookmarks Toolbar and then click New Bookmark:

New-Bookmark.jpg
o  Give whatever name you want to the bookmark that will expand all messages (such as ExpandAll) and then place eenookami's clever JavaScript code in the Location field:

javascript:void($('.expand-toggle').click());

It should look like this:

ExpandAll.jpg
o  Give whatever name you want to the bookmark that will collapse all messages (such as CollapseAll) and, once again, place eenookami's clever JavaScript code in the Location field:

javascript:void($('.collapse-toggle').click());

It should look like this:

CollapseAll.jpg
Now a single mouse click on the ExpandAll icon on the Bookmarks Toolbar will instantly expand all messages in the thread for easy perusal and, even better, searching for text via Edit>Find (Ctrl-F). Likewise, a single mouse click on the CollapseAll icon on the Bookmarks Toolbar will instantly collapse all messages in the thread.

Thanks again to eenookami for this excellent work-around (until Search and/or and Expand/Collapse features are added to the EE Messaging System), as well as for giving me permission to write and publish an EE article about the solution.

If you find this article to be helpful, please click the thumbs-up icon below. This lets me know what is valuable for EE members and provides direction for future articles. Thanks very much! Regards, Joe
6
Comment
2 Comments
LVL 2

Expert Comment

by:Rob Jurd
Great Article Joe and thanks for giving me kudos however no one would know about it without taking it a step further with this article contribution.

For those interested, it is called a bookmarklet and it will work it all browsers.  For those adventurous ones, you can write your own bookmarklets to do anything on the site you would otherwise do with a click or a keypress on your keyboard.  I'll leave the examples for your imagination...

The bug report that started this is: http://support.experts-exchange.com/customer/portal/articles/1162518

Cheers,

eenookami
0
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Hi eenookami,

Thanks for the compliment and the Helpful Vote — I appreciate both! Additional thanks for the further explanation of bookmarklet — very interesting!

Btw, the link you posted for the bug report that started this does not seem to be right, but it gave me the idea to include that link in the article, which I will do in a moment. Regards, Joe
0

Featured Post

Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Join & Write a Comment

Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
If you, like me, have a dislike for using Online Subscription anti-spam services, then this video series is for you. I have an inherent dislike of leaving decisions such as what is and what isn't spamming to other people or services for me and insis…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month