1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 18:03:48 +00:00

[search] rewrote 'highlight keyword in file view'

This commit is contained in:
llj
2014-06-04 11:39:03 +08:00
parent 859fc90f66
commit c97aa55ac4
6 changed files with 40 additions and 27 deletions

View File

@@ -181,8 +181,13 @@ var pdf2htmlEX = (function(){
_.find_pages();
_.schedule_render();
_.load_page(idx+1);
if (highlight_kw) {
highlight_kw($('#file-view'));
try {
if (highlight_kw) {
highlight_kw($('#pf' + parseInt(idx + 1).toString(16))[0]);
}
} catch (e) {
// cases: 'highlight_keyword' in file view is False, history file view
// there can be an ReferenceError 'highlight_kw is not defined'
}
});
}