mirror of
https://github.com/Alamantus/Lexiconga.git
synced 2025-04-07 12:11:30 +02:00
Customize addWord messaging
This commit is contained in:
parent
048c964405
commit
3f17a19c50
1 changed files with 5 additions and 3 deletions
|
@ -74,13 +74,15 @@ export function clearWordForm() {
|
||||||
document.getElementById('wordPartOfSpeech').value = '';
|
document.getElementById('wordPartOfSpeech').value = '';
|
||||||
document.getElementById('wordDefinition').value = '';
|
document.getElementById('wordDefinition').value = '';
|
||||||
document.getElementById('wordDetails').value = '';
|
document.getElementById('wordDetails').value = '';
|
||||||
|
|
||||||
document.getElementById('wordName').focus();
|
document.getElementById('wordName').focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addWord(word, render = true) {
|
export function addWord(word, render = true, message = true) {
|
||||||
window.currentDictionary.words.push(word);
|
window.currentDictionary.words.push(word);
|
||||||
addMessage('Word Created Successfully');
|
if (message) {
|
||||||
|
addMessage(`<a href="#${word.wordId}">${word.name}</a> Created Successfully`, 10000);
|
||||||
|
}
|
||||||
sortWords(render);
|
sortWords(render);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue