files: added option to use highlight marker to show keywords inside file source.
This commit is contained in:
parent
6957757150
commit
47db530369
2 changed files with 23 additions and 2 deletions
|
|
@ -314,7 +314,7 @@
|
|||
$(document).ready(function() {
|
||||
callbacks();
|
||||
var search_GET = "${request.GET.get('search','')}";
|
||||
if (search_GET == "1") {
|
||||
if (search_GET === "1") {
|
||||
_NODEFILTER.initFilter();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -106,4 +106,25 @@
|
|||
%endif
|
||||
%endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
% if request.GET.get('mark'):
|
||||
|
||||
$(function(){
|
||||
$(".codehilite").mark(
|
||||
"${request.GET.get('mark')}",
|
||||
{
|
||||
"className": 'match',
|
||||
"accuracy": "complementary",
|
||||
"ignorePunctuation": ":._(){}[]!'+=".split(""),
|
||||
"each": function(el) {
|
||||
// and also highlight lines !
|
||||
$($(el).closest('tr')).find('td.cb-lineno').addClass('cb-line-selected');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
% endif
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue