>`;
+ a.textContent = TRANSLATIONS.next + ">>";
next.appendChild(a);
}
@@ -242,13 +270,14 @@ class ClassHelper extends HTMLElement {
preview.name = "preview";
const cancel = document.createElement("button");
- cancel.textContent = "Cancel";
+ cancel.textContent = TRANSLATIONS.cancel;
cancel.addEventListener("click", () => {
preview.value = "";
})
const apply = document.createElement("button");
- apply.textContent = "Apply";
+ apply.textContent = TRANSLATIONS.apply;
+ apply.style.fontWeight = "bold";
apply.addEventListener("click", () => {
this.dispatchEvent(new CustomEvent("valueSelected", {
detail: {
@@ -257,8 +286,35 @@ class ClassHelper extends HTMLElement {
}))
})
+ const style = document.createElement("style");
+
+ style.textContent = `
+ #popup-control {
+ position: fixed;
+ display: block;
+ top: auto;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ padding: .5em;
+ border-top: 2px solid #444;
+ background-color: #eee;
+ }
+
+ #popup-preview {
+ margin-right: 3em;
+ margin-left: 1em;
+ }
+
+ #popup-control button {
+ margin-right: 2em;
+ margin-left: 2em;
+ width: 7em;
+ }`;
+
div.append(preview, cancel, apply);
- fragment.appendChild(div);
+
+ fragment.appendChild(div, style);
return fragment;
}
@@ -275,12 +331,13 @@ class ClassHelper extends HTMLElement {
table.setAttribute("id", "popup-table");
const thead = document.createElement('thead');
const tbody = document.createElement('tbody');
+ const tfoot = document.createElement('tfoot'); // Create table footer
// Create table headers
const headerRow = document.createElement('tr');
let thx = document.createElement("th");
- thx.textContent = "x";
- headerRow.appendChild(thx)
+ thx.textContent = "X";
+ headerRow.appendChild(thx);
headers.forEach(header => {
const th = document.createElement('th');
@@ -316,9 +373,61 @@ class ClassHelper extends HTMLElement {
tbody.appendChild(row);
});
+ // Create table footer with the same column values as headers
+ const footerRow = document.createElement('tr');
+ let footThx = document.createElement("th");
+ footThx.textContent = "X";
+ footerRow.appendChild(footThx);
+
+ headers.forEach(header => {
+ const th = document.createElement('th');
+ th.textContent = header;
+ footerRow.appendChild(th);
+ });
+ tfoot.appendChild(footerRow);
+
+ table.innerHTML = `
+
+ `;
+
// Assemble the table
table.appendChild(thead);
table.appendChild(tbody);
+ table.appendChild(tfoot); // Append the footer
+
fragment.appendChild(table);
return fragment;
@@ -382,6 +491,8 @@ class ClassHelper extends HTMLElement {
if (nextURL) {
nextURL = nextURL[0].uri;
}
+ let selfUrl = new URL(data["@links"].self[0].uri);
+ props.pageIndex = selfUrl.searchParams.get("@page_index");
let oldPagination = this.popupRef.document.getElementById("popup-pagination");
b.replaceChild(this.getPaginationFragment(prevURL, nextURL, props.pageIndex, props.pageSize), oldPagination);
diff --git a/html/issue.item.html b/html/issue.item.html
index 91cde322..bb1b37f1 100644
--- a/html/issue.item.html
+++ b/html/issue.item.html
@@ -57,8 +57,9 @@
-
+
+
View:
"
+
+msgid "Prev"
+msgstr "<"
+
+msgid "Hello World - \"New Programmer\""
+msgstr "Hallo Welt - \"neuer Programmierer\""
\ No newline at end of file
diff --git a/locale/en.po b/locale/en.po
new file mode 100644
index 00000000..aeb740db
--- /dev/null
+++ b/locale/en.po
@@ -0,0 +1,8 @@
+msgid "Submit"
+msgstr "Go"
+
+msgid "Next"
+msgstr ">"
+
+msgid "Prev"
+msgstr "<"
\ No newline at end of file
|