Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix YadVaShem new Design #119

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions buildform.js
Original file line number Diff line number Diff line change
Expand Up @@ -2070,6 +2070,27 @@ function getLocation(data) {
}
}

function addEvent(profiledata, event, dateval, eventlocation) {
data = []

dateval = cleanDate(dateval.replace("/","-"));
if (dateval !== "unknown" && dateval !== "") {
dt = moment(dateval, "DD-MM-YYYY", true);
if (dt.isValid()) {
dateval = dt.format('MMMM D, YYYY');
}
data.push({date: dateval});
}
if (eventlocation !== "") {
data.push({id: geoid, location: eventlocation});
geoid++;
}
if (!$.isEmptyObject(data)) {
profiledata[event] = data;
}
return profiledata;
}

function emptyEvent(data) {
if (exists(data)) {
if (exists(data.date)) {
Expand Down
24 changes: 1 addition & 23 deletions collections/bezikaron.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,26 +155,4 @@ registerCollection({
updateGeo();
}
return profiledata;
}

function addEvent(profiledata, event, dateval, eventlocation) {
data = []

dateval = cleanDate(dateval.replace("/","-"));
if (dateval !== "unknown" && dateval !== "") {
dt = moment(dateval, "DD-MM-YYYY", true);
if (dt.isValid()) {
dateval = dt.format('MMMM D, YYYY');
}
data.push({date: dateval});
}
if (eventlocation !== "") {
data.push({id: geoid, location: eventlocation});
geoid++;
}
if (!$.isEmptyObject(data)) {
profiledata[event] = data;
}
return profiledata;
}

}
20 changes: 1 addition & 19 deletions collections/billiongraves.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ function parseBillionGraves(htmlstring, familymembers, relation) {
return profiledata;
}


function getData(htmlstring) {
return JSON.parse(htmlstring.split('<script type="application/ld+json">')[1].split('</script>')[0]);
}
Expand All @@ -160,22 +161,3 @@ function displayDate(vardate) {
}
return formattedDate;
}

function addEvent(profiledata, event, dateval, eventlocation) {
data = []
if (exists(dateval) && dateval.contains(" (")) {
dateval = dateval.split(" (")[0];
}
dateval = cleanDate(dateval);
if (dateval !== "unknown" && dateval !== "") {
data.push({date: dateval});
}
if (eventlocation !== "") {
data.push({id: geoid, location: eventlocation});
geoid++;
}
if (!$.isEmptyObject(data)) {
profiledata[event] = data;
}
return profiledata;
}
18 changes: 0 additions & 18 deletions collections/findagrave.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,24 +273,6 @@ function getFindAGraveName(focusperson) {
return focusperson;
}

function addEvent(profiledata, event, dateval, eventlocation) {
data = []
if (exists(dateval) && dateval.contains(" (")) {
dateval = dateval.split(" (")[0];
}
dateval = cleanDate(dateval);
if (dateval !== "unknown" && dateval !== "") {
data.push({date: dateval});
}
if (eventlocation !== "") {
data.push({id: geoid, location: eventlocation});
geoid++;
}
if (!$.isEmptyObject(data)) {
profiledata[event] = data;
}
return profiledata;
}

function getFAGID(url) {
let fagid = url.substring(url.lastIndexOf('memorial/') + 9).replace("#", "");
Expand Down
21 changes: 0 additions & 21 deletions collections/gravez.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,3 @@ function parseGravezMe(htmlstring, familymembers, relation) {
return profiledata;
}

function addEvent(profiledata, event, dateval, eventlocation) {
data = []

dateval = cleanDate(dateval.replace("/","-"));
if (dateval !== "unknown" && dateval !== "") {
dt = moment(dateval, "DD-MM-YYYY", true);
if (dt.isValid()) {
dateval = dt.format('MMMM D, YYYY');
}
data.push({date: dateval});
}
if (eventlocation !== "") {
data.push({id: geoid, location: eventlocation});
geoid++;
}
if (!$.isEmptyObject(data)) {
profiledata[event] = data;
}
return profiledata;
}

21 changes: 0 additions & 21 deletions collections/toldot.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,25 +100,4 @@ function parseToldotRu(htmlstring, familymembers, relation) {
updateGeo();
}
return profiledata;
}

function addEvent(profiledata, event, dateval, eventlocation) {
data = []

dateval = cleanDate(dateval.replace("/","-"));
if (dateval !== "unknown" && dateval !== "") {
dt = moment(dateval, "DD-MM-YYYY", true);
if (dt.isValid()) {
dateval = dt.format('MMMM D, YYYY');
}
data.push({date: dateval});
}
if (eventlocation !== "") {
data.push({id: geoid, location: eventlocation});
geoid++;
}
if (!$.isEmptyObject(data)) {
profiledata[event] = data;
}
return profiledata;
}
141 changes: 0 additions & 141 deletions collections/yadVaShem.js

This file was deleted.

Loading