Make alphabetical order editable
This commit is contained in:
parent
2bf0f15f67
commit
aa956e9820
|
@ -13,7 +13,7 @@ export function updateDictionary () {
|
|||
}
|
||||
|
||||
export function openEditModal() {
|
||||
const { name, specification, description, partsOfSpeech } = window.currentDictionary;
|
||||
const { name, specification, description, partsOfSpeech, alphabeticalOrder } = window.currentDictionary;
|
||||
const { consonants, vowels, blends } = window.currentDictionary.details.phonology;
|
||||
const { phonotactics, orthography, grammar } = window.currentDictionary.details;
|
||||
const { allowDuplicates, caseSensitive, sortByDefinition, theme, isPublic } = window.currentDictionary.settings;
|
||||
|
@ -22,6 +22,7 @@ export function openEditModal() {
|
|||
document.getElementById('editSpecification').value = specification;
|
||||
document.getElementById('editDescription').value = description;
|
||||
document.getElementById('editPartsOfSpeech').value = partsOfSpeech.join(',');
|
||||
document.getElementById('editAlphabeticalOrder').value = alphabeticalOrder.join(' ');
|
||||
|
||||
document.getElementById('editConsonants').value = consonants.join(' ');
|
||||
document.getElementById('editVowels').value = vowels.join(' ');
|
||||
|
@ -52,6 +53,7 @@ export function saveEditModal() {
|
|||
window.currentDictionary.specification = removeTags(document.getElementById('editSpecification').value.trim());
|
||||
window.currentDictionary.description = removeTags(document.getElementById('editDescription').value.trim());
|
||||
window.currentDictionary.partsOfSpeech = document.getElementById('editPartsOfSpeech').value.split(',').map(val => val.trim()).filter(val => val !== '');
|
||||
window.currentDictionary.alphabeticalOrder = document.getElementById('editAlphabeticalOrder').value.split(' ').map(val => val.trim()).filter(val => val !== '');
|
||||
|
||||
window.currentDictionary.details.phonology.consonants = document.getElementById('editConsonants').value.split(' ').map(val => val.trim()).filter(val => val !== '');
|
||||
window.currentDictionary.details.phonology.vowels = document.getElementById('editVowels').value.split(' ').map(val => val.trim()).filter(val => val !== '');
|
||||
|
@ -75,14 +77,15 @@ export function saveEditModal() {
|
|||
} else {
|
||||
window.currentDictionary.settings.isPublic = false;
|
||||
}
|
||||
|
||||
addMessage('Saved ' + window.currentDictionary.specification + ' Successfully');
|
||||
saveDictionary();
|
||||
|
||||
renderTheme();
|
||||
renderDictionaryDetails();
|
||||
renderPartsOfSpeech();
|
||||
sortWords(true);
|
||||
|
||||
addMessage('Saved ' + window.currentDictionary.specification + ' Successfully');
|
||||
saveDictionary();
|
||||
|
||||
if (hasToken()) {
|
||||
import('./account/index.js').then(account => {
|
||||
account.uploadDetailsDirect();
|
||||
|
|
|
@ -255,8 +255,12 @@
|
|||
<label>Parts of Speech <small>(Comma Separated List)</small><br>
|
||||
<input id="editPartsOfSpeech" maxlength="2500" placeholder="Noun,Adjective,Verb">
|
||||
</label>
|
||||
<label>Alphabetical Order <small>(Comma Separated List. Include every letter!)</small><br>
|
||||
<input id="editAlphabeticalOrder" disabled value="English Alphabet">
|
||||
<label>Alphabetical Order <small>(Space Separated List)</small><br>
|
||||
<input id="editAlphabeticalOrder" placeholder="a A b B c C d D ...">
|
||||
<a class="label-help-button" onclick="alert('Include every letter and case! Any letters used in your words that are not specified will be sorted in the default order below your alphabetically custom-sorted words.\n\nLexiconga can only sort by single characters and will sort by the words AS ENTERED, not using orthographic translation.')">
|
||||
Field Info
|
||||
</a>
|
||||
<small>Leave blank for default (case-insensitive ASCII/Unicode sorting)</small>
|
||||
</label>
|
||||
<h3>Phonology</h3>
|
||||
<div class="split three">
|
||||
|
|
Loading…
Reference in New Issue