diff --git a/pom.xml b/pom.xml
index ccb7577c4..4161bfbb5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
com.tyndalehouse.step
step-mvn
- 26.5.1
+ 26.5.2
pom
STEP :: Scripture Tools for Every pastor
diff --git a/step-assembly/pom.xml b/step-assembly/pom.xml
index e3044af4a..73fd357d9 100644
--- a/step-assembly/pom.xml
+++ b/step-assembly/pom.xml
@@ -5,7 +5,7 @@
step-mvn
com.tyndalehouse.step
- 26.5.1
+ 26.5.2
4.0.0
diff --git a/step-build/pom.xml b/step-build/pom.xml
index bf18b87a2..46f044f09 100644
--- a/step-build/pom.xml
+++ b/step-build/pom.xml
@@ -4,7 +4,7 @@
com.tyndalehouse.step
step-mvn
- 26.5.1
+ 26.5.2
step-build
diff --git a/step-core-data/pom.xml b/step-core-data/pom.xml
index 29cd041a8..d1a953989 100644
--- a/step-core-data/pom.xml
+++ b/step-core-data/pom.xml
@@ -7,7 +7,7 @@
com.tyndalehouse.step
step-mvn
- 26.5.1
+ 26.5.2
step-core-data
diff --git a/step-core/pom.xml b/step-core/pom.xml
index 864b1e129..67fb9af88 100644
--- a/step-core/pom.xml
+++ b/step-core/pom.xml
@@ -4,7 +4,7 @@
com.tyndalehouse.step
step-mvn
- 26.5.1
+ 26.5.2
com.tyndalehouse.step
diff --git a/step-packages/pom.xml b/step-packages/pom.xml
index d9f05b54f..3f3947747 100644
--- a/step-packages/pom.xml
+++ b/step-packages/pom.xml
@@ -5,7 +5,7 @@
com.tyndalehouse.step
step-mvn
- 26.5.1
+ 26.5.2
com.tyndalehouse.step
diff --git a/step-server/pom.xml b/step-server/pom.xml
index c59197970..0936522b1 100644
--- a/step-server/pom.xml
+++ b/step-server/pom.xml
@@ -2,7 +2,7 @@
com.tyndalehouse.step
step-mvn
- 26.5.1
+ 26.5.2
4.0.0
diff --git a/step-test/pom.xml b/step-test/pom.xml
index ede25cdca..fd352c03c 100644
--- a/step-test/pom.xml
+++ b/step-test/pom.xml
@@ -6,7 +6,7 @@
com.tyndalehouse.step
step-mvn
- 26.5.1
+ 26.5.2
com.tyndalehouse.step
diff --git a/step-tools/pom.xml b/step-tools/pom.xml
index 9875b7ea1..9a4c4fd9d 100644
--- a/step-tools/pom.xml
+++ b/step-tools/pom.xml
@@ -4,7 +4,7 @@
com.tyndalehouse.step
step-mvn
- 26.5.1
+ 26.5.2
com.tyndalehouse.step
diff --git a/step-war-precompiled/pom.xml b/step-war-precompiled/pom.xml
index 8d6840eb5..c61878066 100644
--- a/step-war-precompiled/pom.xml
+++ b/step-war-precompiled/pom.xml
@@ -5,7 +5,7 @@
step-mvn
com.tyndalehouse.step
- 26.5.1
+ 26.5.2
4.0.0
diff --git a/step-web-test/pom.xml b/step-web-test/pom.xml
index 685bb7831..02c0649da 100644
--- a/step-web-test/pom.xml
+++ b/step-web-test/pom.xml
@@ -5,7 +5,7 @@
com.tyndalehouse.step
step-mvn
- 26.5.1
+ 26.5.2
com.tyndalehouse.step
diff --git a/step-web/pom.xml b/step-web/pom.xml
index ef4adfef4..a9eebf0b0 100644
--- a/step-web/pom.xml
+++ b/step-web/pom.xml
@@ -4,7 +4,7 @@
com.tyndalehouse.step
step-mvn
- 26.5.1
+ 26.5.2
step-web
diff --git a/step-web/src/main/webapp/js/step_ready.js b/step-web/src/main/webapp/js/step_ready.js
index 9cf38f471..080fda28d 100644
--- a/step-web/src/main/webapp/js/step_ready.js
+++ b/step-web/src/main/webapp/js/step_ready.js
@@ -344,7 +344,7 @@
var deletedCount = 0;
for (var j = sortedIndex.length - 1; j > 0; j--) {
if ((sortedIndex[j] < 0) || (sortedIndex[j] >= step.bookmarks.length)) {
- console.log("The sorted history index is wrong!")
+ console.log("The sorted history index is wrong: " + sortedIndex[j]);
continue; // index is wrong, skip it to avoid an exception
}
var histItem = step.bookmarks.models[sortedIndex[j]];
@@ -354,7 +354,7 @@
histItem.destroy();
deletedCount ++
}
- if (deletedCount > 19)
+ if (deletedCount > 19) // Delete 20 at a time.
break;
}
}
@@ -469,29 +469,29 @@
var historyOfReferencesIndex = 0;
for (var histIndex = 0; histIndex < history.length; histIndex ++) {
var histItem = history.at(histIndex);
- if ((typeof histItem === "object") &&
- (typeof histItem.get === "function")) {
- var histItemLastAccess = histItem.get("lastAccessed");
- if (typeof histItemLastAccess !== "number")
- continue;
- if (historyOfReferencesIndex == 0) { // insertion sort should be quite efficient because the history is usually sorted already.
- sortedHistoryTimeStamps[0] = histItemLastAccess;
- sortedHistoryIndexes[0] = histIndex;
- }
- else { // part of the insertion sort
- var j = historyOfReferencesIndex - 1;
- while (j > -1 && sortedHistoryTimeStamps[j] < histItemLastAccess) {
- sortedHistoryTimeStamps[j + 1] = sortedHistoryTimeStamps[j];
- sortedHistoryIndexes[j + 1] = sortedHistoryIndexes[j];
- j = j - 1;
- }
- sortedHistoryTimeStamps[j + 1] = histItemLastAccess;
- sortedHistoryIndexes[j + 1] = histIndex;
+ if ((typeof histItem !== "object") ||
+ (typeof histItem.get !== "function"))
+ continue;
+ var histItemLastAccess = histItem.get("lastAccessed");
+ if (typeof histItemLastAccess !== "number")
+ continue;
+ if (historyOfReferencesIndex == 0) { // 1st part of insertion sort should be quite efficient because the history is usually sorted already.
+ sortedHistoryTimeStamps[0] = histItemLastAccess;
+ sortedHistoryIndexes[0] = histIndex;
+ }
+ else { // 2nd part of the insertion sort
+ var j = historyOfReferencesIndex - 1;
+ while (j > -1 && sortedHistoryTimeStamps[j] < histItemLastAccess) {
+ sortedHistoryTimeStamps[j + 1] = sortedHistoryTimeStamps[j];
+ sortedHistoryIndexes[j + 1] = sortedHistoryIndexes[j];
+ j = j - 1;
}
- historyOfReferencesIndex ++;
+ sortedHistoryTimeStamps[j + 1] = histItemLastAccess;
+ sortedHistoryIndexes[j + 1] = histIndex;
}
+ historyOfReferencesIndex ++;
}
- sortedHistoryIndexes.length = historyOfReferencesIndex;
+ sortedHistoryIndexes.length = historyOfReferencesIndex; // if size of array has changed, update size
return sortedHistoryIndexes;
}
function checkForExampleURL() {
@@ -559,7 +559,7 @@
var mostRecentPassage = "";
for (var i = 0; i < sortedIndex.length && mostRecentPassage === ""; i++) {
if ((sortedIndex[i] < 0) || (sortedIndex[i] >= history.length)) {
- console.log("The sorted history index is wrong!")
+ console.log("The sorted history index is wrong: " + sortedIndex[i]);
continue; // index is wrong, skip it to avoid an exception
}
var histItem = history.at(sortedIndex[i]);
@@ -599,7 +599,7 @@
var histItemDisplay = histItem.get("display") || "";
if ((typeof histItemOptions === "string") && (typeof histItemDisplay === "string")) {
step.router.doMasterSearch(version + URL_SEPARATOR + query, histItemOptions, histItemDisplay);
- break; // break from for loop. This line should not be necessary because doMasterSearch should not return. Just in case it returns.
+ break; // break from for loop
}
}
}