Just to summarize what is mentioned in the specified thread and answer the second query of inserting an image for sorting...
For reducing Rank column width
1. Search for the function writeTableHead in the file whfhost.js
2. Look for TD ID='OdinFtsRank'. Out of the two occurrences, update the width value of the second one as required.
For example <TD ID='OdinFtsRank' CLASS='fr_tt' STYLE='cursor:pointer; width:15%;'>
This should reduce the column widht value.
For using an image for sorting columns
1. Look for definitions of gsAscendFlag and gsDescendFlag on Line No 29 and 30 as ascending and descending sorting respectively.
2. Replace their values with img tag with necessary attributes. For exmaple: Something like this
gsAscendFlag = "<img src=\"down_arrow.gif\" />"
Please specify the image path accordingly and do enlose the path with \" --- \" as shown in the example.
I hope this resolves the issue.
That's brilliant thanks!
I've also removed the Rank column (mentioned in this thread http://forums.adobe.com/thread/660831). However, when the Rank column isn't displayed, the ascending/descending image doesn't display until you click the Title column header. I'm guessing it still thinks the Rank column is the default sort column. Don't suppose you know how to change this to the Title column so that the image is displayed straight away?
1 person found this helpful
This happens becuase, initially the results are displayed sorted by rank columnn which is hidden in your case. They are sorted by Title only when Title header is clicked.
You can update the sorting type so that the initial sorting also happens based on Title.
Update the value of g_nSortType from 0 to 1 at line 49 to change the sorting from Rank basis to Title basis.
var g_nSortType = 1;
Once again, your advice worked a treat!
Many thanks Mayank
Actually Mayank, before I let you go. Do you know how I can style the seach progress bar or even replace it with an animated gif?
1 person found this helpful
The change to line 49 didn't work for me, Mayank. The titles are still sorted by Rank.
@Jonathan. It will be great if you could start a new discussion in a separate thread. Also, it will be helpful for others if you could mark the helpful response in this thread as Answer so that others can refer it directly.
@Leon. Please try following all the steps mentioned in this thread. It should work for you. Or you can mention the exact steps you followed and exact problem you faced.
The exact steps I followed and the exact problem I faced?
- Since I had already disabled the Rank column in the whfhost.js file, I ignored your Feb 21, 2011 1:56 AM instructions on "reducing the Rank column width."
- Since I did not want to use ranking images, I ignored your Feb 21, 2011 1:56 AM instructions on "using an image for sorting columns."
- Since I did want to "update the sorting type so that the initial sorting also happens based on Title," I followed your Feb 21, 2011 8:00 AM instructions to "Update the value of g_nSortType from 0 to 1 at line 49."
The problem I faced with step 3 was this: your instructions resulted in no change to the default behavior. With a search that produced 18 results:
- 10 results to a page - page 1 titles sorted by rank, page 2 titles also sorted by rank
- 20 results to a page - all titles sorted by rank
Ideally the solution should work as per the steps followed by you.
It will be great if you could share the whfhost.js file on your system so that I can look into the exact issue. You can mail me at magrawalATadobeDOTcom
I was just faced with the same problem and found your solution, tried it out and ... it works!! Thanks a lot.
Greetings from Switzerland,