Skip to content

Commit

Permalink
change temp alert in search modal
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksptang committed Oct 31, 2023
1 parent 606d0fb commit 76a1df3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions step-web/src/main/webapp/js/search_selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -1197,10 +1197,15 @@ step.searchSelect = {
userInput = userInput.replace(/[\n\r]/g, ' ').replace(/\t/g, ' ').replace(/\s\s/g, ' ').replace(/,,/g, ',').replace(/^\s+/g, '');
if ((userInput.length > 1) || ((step.searchSelect.userLang.toLowerCase().indexOf("zh") == 0) && (userInput.length > 0))) {
// If user enter a Lucene standard stop word, let the user know.
if (" a an and are as at be but by for if in into is it no not of on or such that the their then there these they this to was will with ".indexOf(" " + userInput.toLowerCase() + " ") > -1)
step.util.tempAlert("The word your entered is an extremely common word. That exact word will not be found in Fuzzy (meaning), Greek and Hebrew searches.", 3);
else
$('#tmpStepAlert').remove();
if (" a an and are as at be but by for if in into is it no not of on or such that the their then there these they this to was will with ".indexOf(" " + userInput.toLowerCase() + " ") > -1) {
$('#warningMessage').text('Search for extremely common words might not be found in Fuzzy, Greek and Hebrew searches.');
setTimeout(function(){
$('#warningMessage').text('');
}, 3000);
}
else if ($('#warningMessage').html().indexOf("common word") > -1)
$('#warningMessage').text('');
//$('#tmpStepAlert').remove();
$('#updateButton').hide();
var url;
if ((limitType === "") && (step.searchSelect.searchOnSpecificType === ""))
Expand Down
6 changes: 3 additions & 3 deletions step-web/src/main/webapp/js/step.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ step.util = {
el.innerHTML = msg + "<div style='font-size:12px'>This message will go away in " + Math.ceil(duration * .333) + " second.</div>";
setTimeout(function(){
el.parentNode.removeChild(el);
},duration * 333);
},duration * 333);
},duration * 333);
}, duration * 333);
}, duration * 333);
}, duration * 333);
document.body.appendChild(el);
},
getErrorPopup: function (message, level) {
Expand Down

0 comments on commit 76a1df3

Please sign in to comment.