fixed pagination
This commit is contained in:
parent
785cb81386
commit
e4b4a77de3
@ -1,7 +1,10 @@
|
|||||||
var pageLimit = 20;
|
var pageLimit = 20;
|
||||||
|
|
||||||
function secondStepSearch(fragment) {
|
function secondStepSearch(fragment, resetOffset=false) {
|
||||||
|
|
||||||
|
if (resetOffset) {
|
||||||
|
$('#current-offset').val(0);
|
||||||
|
}
|
||||||
var searchQuery = $('body').data('current_fragment');
|
var searchQuery = $('body').data('current_fragment');
|
||||||
if (typeof(fragment) !== "undefined") {
|
if (typeof(fragment) !== "undefined") {
|
||||||
searchQuery = fragment;
|
searchQuery = fragment;
|
||||||
@ -193,7 +196,7 @@ function renderResult(data) {
|
|||||||
|
|
||||||
//the marked fragment
|
//the marked fragment
|
||||||
var textFragment = htmlEncode(inputSentence.slice(fragment['matchedPatternStart'], fragment['matchedPatternEnd']));
|
var textFragment = htmlEncode(inputSentence.slice(fragment['matchedPatternStart'], fragment['matchedPatternEnd']));
|
||||||
markedSentence += '<span onclick="secondStepSearch(this.innerHTML)" class="matchedFragment">'+textFragment+'</span>';
|
markedSentence += '<span onclick="secondStepSearch(this.innerHTML, true)" class="matchedFragment">'+textFragment+'</span>';
|
||||||
|
|
||||||
lastInsertedEnd = fragment['matchedPatternEnd'];
|
lastInsertedEnd = fragment['matchedPatternEnd'];
|
||||||
|
|
||||||
|
@ -175,7 +175,6 @@ ExampleOccurence UnitDAO::_getExampleOccurence(DBconnection & connection, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int prevPos = -2;
|
int prevPos = -2;
|
||||||
int currStart = -1;
|
int currStart = -1;
|
||||||
int currEnd = -1;
|
int currEnd = -1;
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
psql -U concordia concordia_server
|
PGPASSWORD=concordia psql -U concordia concordia_server
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
psql -U concordia -p 6543 -h localhost concordia_server
|
PGPASSWORD=concordia psql -U concordia -p 6543 -h localhost concordia_server
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user