1
0
Fork 0
mirror of https://github.com/Alamantus/Lexiconga.git synced 2025-03-22 19:38:55 +01:00

Forced imports to always create a new dictionary.

This commit is contained in:
Robbie Antenesse 2015-11-30 16:28:21 -07:00
parent ade8d57281
commit e8c31a86d5

View file

@ -568,12 +568,12 @@ function ImportDictionary() {
if (tmpDicitonary.hasOwnProperty("name") && tmpDicitonary.hasOwnProperty("description") &&
tmpDicitonary.hasOwnProperty("words") && tmpDicitonary.hasOwnProperty("settings"))
{
localStorage.setItem('dictionary', reader.result);
document.getElementById("importFile").value = "";
LoadLocalDictionary();
SendDictionary(true);
currentDictionary = JSON.parse(reader.result);
currentDictionary.externalID = 0; // Reset external id for imported dictionary.
SaveDictionary(true, true);
ProcessLoad();
HideSettings();
document.getElementById("importFile").value = "";
} else {
var errorString = "File is missing:";
if (!tmpDicitonary.hasOwnProperty("name"))