Skip to content

Commit a1b78ff

Browse files
TeriandVladimir Kotal
authored andcommitted
ie10-11 js fix (#2695)
fixes #2694
1 parent b6c40b3 commit a1b78ff

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/web/Scripts.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public String toHtml() {
105105
SCRIPTS.put("jquery-tablesorter", new FileScript("js/jquery-tablesorter-2.26.6.min.js", 12));
106106
SCRIPTS.put("tablesorter-parsers", new FileScript("js/tablesorter-parsers-0.0.1.js", 13));
107107
SCRIPTS.put("searchable-option-list", new FileScript("js/searchable-option-list-2.0.6.js", 14));
108-
SCRIPTS.put("utils", new FileScript("js/utils-0.0.29.js", 15));
108+
SCRIPTS.put("utils", new FileScript("js/utils-0.0.30.js", 15));
109109
SCRIPTS.put("repos", new FileScript("js/repos-0.0.1.js", 20));
110110
SCRIPTS.put("diff", new FileScript("js/diff-0.0.3.js", 20));
111111
SCRIPTS.put("jquery-caret", new FileScript("js/jquery.caret-1.5.2.min.js", 25));

opengrok-web/src/main/webapp/js/utils-0.0.29.js renamed to opengrok-web/src/main/webapp/js/utils-0.0.30.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,7 @@ function initAutocomplete(config, minisearch) {
17541754
}
17551755

17561756
function initMinisearchAutocomplete(config) {
1757-
if (config.allowedFields && !config.allowedFields.includes('full')) {
1757+
if (config.allowedFields && config.allowedFields.indexOf('full') < 0) {
17581758
return;
17591759
}
17601760

@@ -1769,7 +1769,7 @@ function initMinisearchAutocomplete(config) {
17691769

17701770
initAutocompleteForField('search', 'full', config, function (input, field) {
17711771
var caretPos = input.caret();
1772-
if (!Number.isInteger(caretPos)) {
1772+
if (!(typeof caretPos === 'number')) {
17731773
console.error("Suggest: could not get caret position");
17741774
return;
17751775
}
@@ -1784,7 +1784,7 @@ function initMinisearchAutocomplete(config) {
17841784
}
17851785

17861786
function initAutocompleteForField(inputId, field, config, dataFunction, errorElemId) {
1787-
if (config.allowedFields && !config.allowedFields.includes(field)) {
1787+
if (config.allowedFields && config.allowedFields.indexOf(field) < 0) {
17881788
return;
17891789
}
17901790

@@ -1865,7 +1865,7 @@ function initAutocompleteForField(inputId, field, config, dataFunction, errorEle
18651865
event.preventDefault();
18661866
return;
18671867
}
1868-
if (event.originalEvent.originalEvent.type.startsWith('key')) { // replace value only on key events
1868+
if (event.originalEvent.originalEvent.type.indexOf('key') == 0) { // replace value only on key events
18691869
replaceValueWithSuggestion(input, text, identifier, ui.item.phrase);
18701870
}
18711871

0 commit comments

Comments
 (0)