Commit d873e300 authored by pet's avatar pet

Interface para adicionar ordem de testes

parent 2996dd27
var numeroTestes = 0;
function logado_config_addTeste(){
var ordem = document.getElementById("logado_config_selects");
var all = document.createElement("DIV");
all.id = "config_select_all"+numeroTestes;
var select = document.createElement("SELECT");
select.id = "config_select"+numeroTestes;
var option;
option = document.createElement("option");
option.text = "Congruente";
option.value = "C";
select.options.add(option);
option = document.createElement("option");
option.text = "Incongruente";
option.value = "I";
select.options.add(option);
option = document.createElement("option");
option.text = "Pre-teste Congruente";
option.value = "pC";
select.options.add(option);
option = document.createElement("option");
option.text = "Pre-teste Incongruente";
option.value = "pI";
select.options.add(option);
all.appendChild(select);
var buttonRemove = document.createElement("button");
buttonRemove.type = "button";
buttonRemove.value = numeroTestes;
buttonRemove.innerHTML="X";
buttonRemove.onclick = function(){
var value = this.value;
var all = document.getElementById("config_select_all"+value);
ordem.removeChild(all);
}
all.appendChild(buttonRemove);
all.appendChild(document.createElement("BR"));
numeroTestes++;
ordem.appendChild(all);
}
function configuracoes(){
paginaAtual = "config";
document.getElementById("logado_config_numero_perguntas").value = localStorage.perguntas;
document.getElementById("logado_config_selects").innerHTML = "";
logado_config_addTeste();
loadPage();
}
......@@ -9,5 +68,7 @@ function logado_config_salvaConfig(){
if(confirm("Fazendo isso você deletará todos os testes!\nDeseja continuar?")){
localStorage.perguntas = document.getElementById("logado_config_numero_perguntas").value;
var dataSet = [];
salvaTestes();
}
}
......@@ -117,6 +117,17 @@
<br>
<br>
<button onClick="logado_config_salvaConfig()">Salvar</button>
<br>
<br>
<br>
Ordem dos testes
<br>
<center id="logado_config_selects"></center>
<br>
<br>
<button onClick="logado_config_addTeste();">Adicionar teste</button>
</center>
</div>
</div>
......
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