Skip to content

Commit

Permalink
Changed reports so that when using localhost they don't add the versi…
Browse files Browse the repository at this point in the history
…on number to the json path.
  • Loading branch information
dmckinnon78 committed Sep 26, 2023
1 parent 37cd7e5 commit dcf033e
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 15 deletions.
5 changes: 4 additions & 1 deletion step-web/src/main/webapp/html/gospel_harmony.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ <h2>Harmony of the Gospels</h2>
}
$.ajaxSetup({async: false});
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

var tblRowHTML = ""
$.getJSON(jsonPath + jsonFileName + ".json", function(array) {
for (var i = 0; i < array.length; i ++ ) {
Expand Down
5 changes: 4 additions & 1 deletion step-web/src/main/webapp/html/lectionary.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,10 @@
var earliest_date;
var latest_date;
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

// set 'date' to be the first Advent of the current year (or of the reference year if looking ahead/back)
$.getJSON(jsonPath + jsonFileName1 + ".json", function(array) {
var i = 0;
Expand Down
4 changes: 3 additions & 1 deletion step-web/src/main/webapp/html/mcheynes_readings.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ <h2 class="hTitle">R. M. M'Cheyne's 1, 2, or 3 Year Readings</h2>
var clickText2 = '")>';
var clickText3 = '</span>';
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

$.getJSON(jsonPath + jsonFileName + ".json", function(array) {

Expand Down
5 changes: 4 additions & 1 deletion step-web/src/main/webapp/html/miracles.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ <h2>Miracles in the Bible</h2>
else if (pos > 0) jsonFileName = tmp.substr(0,pos);
}
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

$.ajaxSetup({async: false});
var tblRowHTML = ""
$.getJSON(jsonPath + jsonFileName + ".json", function(array) {
Expand Down
5 changes: 4 additions & 1 deletion step-web/src/main/webapp/html/names.html
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ <h2>Names of God</h2>
}

var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

$.getJSON(jsonPath + jsonFileName + ".json", function(array) {
for (var i = 0; i < array.length; i ++ ) {
var clickText = "";
Expand Down
5 changes: 4 additions & 1 deletion step-web/src/main/webapp/html/nt_letters.html
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ <h2>New Testament Letter Structure</h2>
}
$.ajaxSetup({async: false});
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

var tblRowHTML = ""
$.getJSON(jsonPath + jsonFileName + ".json", function(array) {
for (var i = 0; i < array.length; i ++ ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ <h2 class="hTitle">One Year Chronological NT with Related OT</h2>
var clickText2 = '")>';
var clickText3 = '</span>';
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

$.getJSON(jsonPath + jsonFileName + ".json", function(array) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ <h2 class="hTitle">One Year Chronological OT and NT Together</h2>
var clickText2 = '")>';
var clickText3 = '</span>';
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

$.getJSON(jsonPath + jsonFileName + ".json", function(array) {

var anchor = ' id="today"';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,10 @@ <h2 class="hTitle">One Year Chronological OT with Related NT</h2>
var clickText2 = '")>';
var clickText3 = '</span>';
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

$.getJSON(jsonPath + jsonFileName + ".json", function(array) {

var anchor = ' id="today"';
Expand Down
5 changes: 4 additions & 1 deletion step-web/src/main/webapp/html/one_year_themes_chrono.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,10 @@ <h2 class="hTitle">One Year Themes Collected Chronologically</h2>
var clickText2 = '")>';
var clickText3 = '</span>';
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

$.getJSON(jsonPath + jsonFileName + ".json", function(array) {

var anchor = ' id="today"';
Expand Down
5 changes: 4 additions & 1 deletion step-web/src/main/webapp/html/ot_in_nt.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ <h2>Old Testament used in New Testament</h2>
}
$.ajaxSetup({async: false});
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

var tblRowHTML = ""
$.getJSON(jsonPath + jsonFileName + ".json", function(array) {
for (var i = 0; i < array.length; i ++ ) {
Expand Down
5 changes: 4 additions & 1 deletion step-web/src/main/webapp/html/ot_parallel.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ <h2>Old Testament parallels</h2>
}
$.ajaxSetup({async: false});
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

var tblRowHTML = ""
$.getJSON(jsonPath + jsonFileName + ".json", function(array) {
for (var i = 0; i < array.length; i ++ ) {
Expand Down
5 changes: 4 additions & 1 deletion step-web/src/main/webapp/html/parashot.html
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@
var first_sabbath_of_year;
var first_sabbath_of_next_year;
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

// set 'date' to be the first Sabbath of the current year
$.getJSON(jsonPath + jsonFileName1 + ".json", function(array) {
var i = 0;
Expand Down
5 changes: 4 additions & 1 deletion step-web/src/main/webapp/html/places.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@ <h2>Biblical locations</h2>
else if (pos > 0) jsonFileName = tmp.substr(0,pos);
}
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

$.ajaxSetup({async: false});
var tblRowHTML = ""
$.getJSON(jsonPath + jsonFileName + ".json", function(array) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ <h2 class="hTitle">Two Year Chronological OT with Related NT</h2>
var clickText2 = '")>';
var clickText3 = '</span>';
var jsonPath = urlPart1 + "/html/json/";
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
if (urlPart1.indexOf("localhost") == -1 && urlPart1.indexOf("127.0.0.1") == -1) {
jsonPath += ("STEP_SERVER_VERSION_TOKEN".toLowerCase() !== "step_server_version_token") ? "STEP_SERVER_VERSION_TOKEN/" : "";
}

$.getJSON(jsonPath + jsonFileName + ".json", function(array) {

Expand Down

0 comments on commit dcf033e

Please sign in to comment.