Skip to content

Commit

Permalink
Support ordinances.
Browse files Browse the repository at this point in the history
  • Loading branch information
ranbo committed Mar 28, 2024
1 parent f18f0fd commit f60aa6d
Show file tree
Hide file tree
Showing 5 changed files with 427 additions and 40 deletions.
8 changes: 6 additions & 2 deletions gx-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,14 @@ function getFactPlace(fact) {
}

// Get the first "Persistent" identifier (or "Primary" identifier, or any other identifier) from the given GedcomX object
function getIdentifier(gxObject) {
// Or, if the idType is specified, get the first of that type.
function getIdentifier(gxObject, idType) {
let id = null;
if (gxObject.identifiers) {
id = getFirst(gxObject.identifiers["http://gedcomx.org/Persistent"]);
if (idType) {
return getFirst(gxObject.identifiers[idType]);
}
id = getFirst(gxObject.identifiers[PERSISTENT_TYPE]);
if (id === null) {
id = getFirst(gxObject.identifiers["http://gedcomx.org/Primary"]);
if (id === null) {
Expand Down
4 changes: 4 additions & 0 deletions split/time-machine.css
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ td {
border: 1px solid #dccbb5;
background-color: #dae9f1;
}
.ord-row {
border: 1px solid #ecf1e9;
background-color: #f8f8f3;
}
.end-gx {
border: 1px solid #dad9ce;
background-color: #faf8eb
Expand Down
4 changes: 2 additions & 2 deletions split/time-machine.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"Usage: time-machine.html?[beta=true&]pid=<personId>[&sessionId=<sessionId>]");
}
}

let shouldFetchOrdinances = urlParams.has('ord');
if (url) {
let sessionId = urlParams.get('sessionId');
buildChangeLogView(url, sessionId, $("#main-table"), $status);
buildChangeLogView(url, sessionId, $("#main-table"), $status, shouldFetchOrdinances);
}
});
</script>
Expand Down
Loading

0 comments on commit f60aa6d

Please sign in to comment.