Customize addWord messaging
This commit is contained in:
parent
048c964405
commit
3f17a19c50
|
@ -78,9 +78,11 @@ export function clearWordForm() {
|
||||||
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…
Reference in New Issue