Render correct label for IPA table modal
This commit is contained in:
parent
ac8d88f082
commit
d682b0060e
src/js
|
@ -278,7 +278,7 @@ export function renderEditForm(wordId = false) {
|
||||||
|
|
||||||
export function renderIPATable(ipaTableButton) {
|
export function renderIPATable(ipaTableButton) {
|
||||||
ipaTableButton = typeof ipaTableButton.target === 'undefined' ? ipaTableButton : ipaTableButton.target;
|
ipaTableButton = typeof ipaTableButton.target === 'undefined' ? ipaTableButton : ipaTableButton.target;
|
||||||
// const label = ipaTableButton.parentElement.innerText.replace(/(\*|Maximize)/g, '').trim();
|
const label = ipaTableButton.parentElement.innerText.replace(/(Field Help|IPA Chart)/g, '').trim();
|
||||||
const textBox = ipaTableButton.parentElement.querySelector('input');
|
const textBox = ipaTableButton.parentElement.querySelector('input');
|
||||||
import('./KeyboardFire/phondue/ipa-table.html').then(html => {
|
import('./KeyboardFire/phondue/ipa-table.html').then(html => {
|
||||||
const modalElement = document.createElement('section');
|
const modalElement = document.createElement('section');
|
||||||
|
@ -286,7 +286,7 @@ export function renderIPATable(ipaTableButton) {
|
||||||
modalElement.innerHTML = `<div class="modal-background"></div>
|
modalElement.innerHTML = `<div class="modal-background"></div>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<a class="close-button">×︎</a>
|
<a class="close-button">×︎</a>
|
||||||
<header><label>Pronunciation <input value="${textBox.value}" class="ipa-field"></label></header>
|
<header><label>${label} <input value="${textBox.value}" class="ipa-field"></label></header>
|
||||||
<section>
|
<section>
|
||||||
${html}
|
${html}
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue