Skip to content

Added search highlighting#10

Merged
Iodine- merged 1 commit intoMoveInc:masterfrom
DavidMove:dh-search-highlighting
Feb 14, 2017
Merged

Added search highlighting#10
Iodine- merged 1 commit intoMoveInc:masterfrom
DavidMove:dh-search-highlighting

Conversation

@DavidMove
Copy link

@DavidMove DavidMove commented Feb 9, 2017

Details

  • Inside renderRows function I added some logic to wrap <span class="bootgrid-search-highlight"> tags around the search term.
  • We couldn't do a simple string search and replace because otherwise it will replace HTML tags or text inside HTML attributes. So we needed to traverse through the actual nodes and only replace the text within it.
  • When replacing the search phrase for each node it will encode all symbols. So we needed to do another replace on the entire string afterwards.

Screenshots

screen shot 2017-02-09 at 1 54 27 pm

@Iodine- Iodine- force-pushed the dh-search-highlighting branch from d7ee403 to f68aeee Compare February 10, 2017 17:35
@DavidMove DavidMove force-pushed the dh-search-highlighting branch from f68aeee to 1da760f Compare February 10, 2017 18:56
@DavidMove DavidMove force-pushed the dh-search-highlighting branch from 1da760f to 260098c Compare February 10, 2017 19:17
Copy link

@Iodine- Iodine- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@Iodine- Iodine- merged commit d684ee5 into MoveInc:master Feb 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments