Skip to content
Merged
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
84 changes: 72 additions & 12 deletions views/cc7/css/cc7.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ div.cc7Table .Female {
div.cc7Table .Male {
background-color: #cceeff;
}
div.cc7Table .blank {
background-color: #efe;
}

div.cc7Table ol,
div.cc7Table ul {
Expand Down Expand Up @@ -102,19 +105,19 @@ div.cc7Table #tree {
white-space: nowrap; /* keep date on a single line */
}

.cc7Table .degree.hasNote {
.cc7Table .research.hasNote {
position: relative; /* Ensure the gradient respects the td's bounds */
}
.cc7Table tr.Male .degree.hasNote {
.cc7Table tr.Male .research.hasNote {
background: linear-gradient(to top right, #cceeff, #1daddd);
}
.cc7Table tr.Female .degree.hasNote {
.cc7Table tr.Female .research.hasNote {
background: linear-gradient(to top right, #ffe6ea, #e05c6a);
}
.cc7Table tr .degree.hasNote {
.cc7Table tr .research.hasNote {
background: linear-gradient(to top right, #f5f5f5, #c3f6c7);
}
.cc7Table .degree.ToDo::before {
.cc7Table .research.ToDo::before {
content: "";
position: absolute;
top: 0;
Expand All @@ -124,7 +127,7 @@ div.cc7Table #tree {
border-top: 10px solid red; /* Triangle color and height */
border-left: 10px solid transparent; /* Transparent left edge */
}
.cc7Table .degree.InProgress::before {
.cc7Table .research.InProgress::before {
content: "";
position: absolute;
top: 0;
Expand All @@ -134,7 +137,7 @@ div.cc7Table #tree {
border-top: 10px solid rgb(255, 255, 0); /* Triangle color and height */
border-left: 10px solid transparent; /* Transparent left edge */
}
.cc7Table .degree.Parked::before {
.cc7Table .research.Parked::before {
content: "";
position: absolute;
top: 0;
Expand All @@ -144,7 +147,7 @@ div.cc7Table #tree {
border-top: 10px solid rgb(0, 0, 255); /* Triangle color and height */
border-left: 10px solid transparent; /* Transparent left edge */
}
.cc7Table .degree.Done::before {
.cc7Table .research.Done::before {
content: "";
position: absolute;
top: 0;
Expand Down Expand Up @@ -442,10 +445,10 @@ span.missingText {
min-width: 3em;
padding-right: 1.5em;
}
#cc7DegFilter {
#cc7NotesFilter {
min-width: 1em;
}
.cc7DegFilter-option svg {
.cc7NotesFilter-option svg {
width: 15px;
height: 15px;
vertical-align: middle;
Expand Down Expand Up @@ -772,7 +775,8 @@ div.cc7Table .cc7filter-row th {

#cc7Container ul.select2-results__options {
margin: 0;
padding: 0 0 0 6px;
padding: 0 3px 0 3px;
text-align: center;
}
#cc7Container li.select2-results__option {
min-height: 18px;
Expand All @@ -784,8 +788,9 @@ div.cc7Table .cc7filter-row th {
}
#cc7Container.cc7Table span.select2-selection__rendered {
min-width: 2.5em;
padding-left: 4px;
}
#cc7Container.cc7Table span.select2-results ul {
#cc7Container cc7Table span.select2-results ul {
margin-left: 0;
}
#cc7Container #relation,
Expand Down Expand Up @@ -926,3 +931,58 @@ div.cc7Table .cc7filter-row th {
}
}
}

.cc7-icon--rs-unfinished {
background: transparent url(https://www.wikitree.com/images/icons/rs/rs-unfinished.svg) left no-repeat;
background-size: 20px 20px;
display: inline-block;
height: 20px;
position: relative;
top: 3px;
width: 20px;
}
.cc7-icon--rs-help {
background: transparent url(https://www.wikitree.com/images/icons/rs/rs-help.svg) left no-repeat;
background-size: 20px 20px;
display: inline-block;
height: 20px;
position: relative;
top: 3px;
width: 20px;
}
.cc7-icon--rs-sources {
background: transparent url(https://www.wikitree.com/images/icons/rs/rs-sources.svg) left no-repeat;
background-size: 20px 20px;
display: inline-block;
height: 20px;
position: relative;
top: 3px;
width: 20px;
}
.cc7-icon--rs-silver {
background: transparent url(https://www.wikitree.com/images/icons/rs/rs-silver.svg) left no-repeat;
background-size: 20px 20px;
display: inline-block;
height: 20px;
position: relative;
top: 3px;
width: 20px;
}
.cc7-icon--rs-gold {
background: transparent url(https://www.wikitree.com/images/icons/rs/rs-gold.svg) left no-repeat;
background-size: 20px 20px;
display: inline-block;
height: 20px;
position: relative;
top: 3px;
width: 20px;
}
.cc7-icon--rs-complete {
background: transparent url(https://www.wikitree.com/images/icons/rs/rs-complete.svg) left no-repeat;
background-size: 20px 20px;
display: inline-block;
height: 20px;
position: relative;
top: 3px;
width: 20px;
}
12 changes: 6 additions & 6 deletions views/cc7/js/CC7Notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class CC7Notes {
jqDiv.addClass("instore");
let theClasses = "hasNote";
if (status != "") theClasses += ` ${status}`;
$(`tr[data-id="${person.Id}"] td.degree`).removeClass("ToDo InProgress Parked Done").addClass(theClasses);
$(`tr[data-id="${person.Id}"] td.research`).removeClass("ToDo InProgress Parked Done").addClass(theClasses);
}

jqDiv.remove();
Expand All @@ -168,7 +168,7 @@ export class CC7Notes {
const loggedInUserWtId = CC7Notes.getUserId();
const dbh = await CC7Notes.initializeDatabase();
dbh.deleteItem(CC7Notes.dbStore, `${person.Id}:${loggedInUserWtId}`);
$(`tr[data-id="${person.Id}"] td.degree`).removeClass("hasNote ToDo InProgress Parked Done");
$(`tr[data-id="${person.Id}"] td.research`).removeClass("hasNote ToDo InProgress Parked Done");

noteDiv.remove();
}
Expand Down Expand Up @@ -266,7 +266,7 @@ export class CC7Notes {

static async repaintNotes() {
// Clear all existing note tags from the page
$(`tr td.degree`).removeClass("hasNote ToDo InProgress Parked Done");
$(`tr td.research`).removeClass("hasNote ToDo InProgress Parked Done");

// Retrieve notes from store
const idsAndStatus = await CC7Notes.getIdsAndStatus();
Expand All @@ -275,9 +275,9 @@ export class CC7Notes {
for (const [id, status] of idsAndStatus) {
let theClasses = "hasNote";
if (status != "") theClasses += ` ${status}`;
$(`#peopleTable tr[data-id="${id}"] td.degree, #missingLinksTable tr[data-id="${id}"] td.degree`).addClass(
theClasses
);
$(
`#peopleTable tr[data-id="${id}"] td.research, #missingLinksTable tr[data-id="${id}"] td.research`
).addClass(theClasses);
}
}

Expand Down
29 changes: 19 additions & 10 deletions views/cc7/js/MissingLinksView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Settings } from "./Settings.js";
import { PRIVACY_LEVELS } from "./PeopleTable.js";
import { PRIVACY_LEVELS, RESEARCH_STATUS } from "./PeopleTable.js";
import { CC7Utils } from "./CC7Utils.js";
import { CC7Notes } from "./CC7Notes.js";

Expand All @@ -10,6 +10,7 @@ export class MissingLinksView {
<thead>
<tr>
<th scope="column">Privacy</th>
<th scope="column" title="Research Status">RS</th>
<th scope="column">Degree</th>
<th scope="column">First</th>
<th scope="column">Last</th>
Expand Down Expand Up @@ -40,6 +41,10 @@ export class MissingLinksView {

for (let person of sortedMap.values()) {
const privacy = person.Privacy || "?";
const rsDetail = RESEARCH_STATUS.get(person.ResearchStatus) || {
title: person.ResearchStatus,
class: "",
};
const degree = person.Meta.Degrees;
const first = person.RealName;
const last = person.LastNameAtBirth;
Expand All @@ -54,15 +59,19 @@ export class MissingLinksView {
const hasNote = idsWithNotes.has(person.Id);
let status = hasNote ? idsWithNotes.get(person.Id) : "";
if (status != "") status = " " + status;
const degreeCell = `<td class="degree${
hasNote ? " hasNote" : ""
}${status}" title="Degree. Click to add/edit Notes.">${degree}°</td>`;
const titleStatus = status == "" ? ". " : `, Note status:${status}. `;
const researchCell = `<td class="research${hasNote ? " hasNote" : ""}${status}" title="Research Status: ${
rsDetail.title
}${titleStatus} Click to add/edit Notes."><span class="${rsDetail.class} icon--inline"></span></td>`;

const degreeCell = `<td class="degree" title="Degree">${degree}°</td>`;

const newRow = $(`
<tr class="${person.Gender}" data-id="${person.Id}">
<td><img id="ml-privacy-lock" src="${PRIVACY_LEVELS.get(privacy).img}" title="${
PRIVACY_LEVELS.get(privacy).title
}" /></td>
PRIVACY_LEVELS.get(privacy).title
}" /></td>
${researchCell}
${degreeCell}
<td>${first}</td>
<td><a href="https://www.wikitree.com/genealogy/${last}" target="_blank">${last}</a></td>
Expand All @@ -74,15 +83,15 @@ export class MissingLinksView {
spouses < 1 && person.DataStatus?.Spouse != "blank"
? "is-lead"
: spouses > 0 && person.DataStatus?.Spouse != "blank"
? "possible-lead"
: ""
? "possible-lead"
: ""
}">${spouses}</td>
<td class="${
children < 1 && person.NoChildren != 1
? "is-lead"
: children > 0 && person.NoChildren != 1
? "possible-lead"
: ""
? "possible-lead"
: ""
}">${children}</td>
<td><a href="https://www.wikitree.com/index.php?title=Special:FindMatches&action=find&u=${
person.Id
Expand Down
Loading