Commit ae8ec1f5 authored by Bruno Meyer's avatar Bruno Meyer 😢

Merge branch '44-salvar-as-configuracoes-no-stroop' into 'master'

fix

Closes #44

See merge request !17
parents 978fad83 438977d1
......@@ -13,8 +13,10 @@ function save_data(){
var stroopFileContent = {};
stroopFileContent.perguntas = localStorage.getItem("perguntas");
stroopFileContent.ordemBateria = localStorage.getItem("ordemBateria");
var configs = getConfiguracoes();
for(var c in configs){
stroopFileContent[c] = configs[c];
}
stroopFileContent.dataSet = dataSet;
......@@ -44,12 +46,12 @@ function load_data(inputFiles){
var data = e.target.result;
var stroopFileContent = JSON.parse(data);
dataSet = stroopFileContent.dataSet;
localStorage.setItem(
"ordemBateria",stroopFileContent.ordemBateria
);
localStorage.setItem(
"perguntas",stroopFileContent.perguntas
);
var configs = getConfiguracoes();
for(var c in configs){
configs[c] = stroopFileContent[c];
}
__saveConfigs();
salvaTestes();
location.reload();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment