Forced imports to always create a new dictionary.
This commit is contained in:
parent
ade8d57281
commit
e8c31a86d5
|
@ -568,12 +568,12 @@ function ImportDictionary() {
|
||||||
if (tmpDicitonary.hasOwnProperty("name") && tmpDicitonary.hasOwnProperty("description") &&
|
if (tmpDicitonary.hasOwnProperty("name") && tmpDicitonary.hasOwnProperty("description") &&
|
||||||
tmpDicitonary.hasOwnProperty("words") && tmpDicitonary.hasOwnProperty("settings"))
|
tmpDicitonary.hasOwnProperty("words") && tmpDicitonary.hasOwnProperty("settings"))
|
||||||
{
|
{
|
||||||
localStorage.setItem('dictionary', reader.result);
|
currentDictionary = JSON.parse(reader.result);
|
||||||
document.getElementById("importFile").value = "";
|
currentDictionary.externalID = 0; // Reset external id for imported dictionary.
|
||||||
LoadLocalDictionary();
|
SaveDictionary(true, true);
|
||||||
SendDictionary(true);
|
|
||||||
ProcessLoad();
|
ProcessLoad();
|
||||||
HideSettings();
|
HideSettings();
|
||||||
|
document.getElementById("importFile").value = "";
|
||||||
} else {
|
} else {
|
||||||
var errorString = "File is missing:";
|
var errorString = "File is missing:";
|
||||||
if (!tmpDicitonary.hasOwnProperty("name"))
|
if (!tmpDicitonary.hasOwnProperty("name"))
|
||||||
|
|
Loading…
Reference in New Issue