“searchhi” wrapped using ToscaWidgets
Posted by gldnspud on the 31st of December, 2006 at 3:39 pm under Uncategorized. This post has one comment.I wanted to make sure search terms were highlighted when searching for items in SPHYRA, so I set off to find something that would help me do so. I came across Trac's implementation, which uses JavaScript and is based on the one here.
In those cases, the code is used to highlight search terms that were entered by the user in a referring page, such as a Google search result page. What I desired was a way to specify my own words, and only highlight within a certain area.
Here's the first pass of a ToscaWidgets based widget I came up with for doing this.
- Widget subclass
- JavaScript
- CSS
- Currently used by find_item in sphyra.controllers.tag and its corresponding template.
Submit Comment