Skip to content

Commit

Permalink
Fixed onproblemresultchanged;
Browse files Browse the repository at this point in the history
Now there are no delLink if serverResp changed
  • Loading branch information
UltimateHikari committed Dec 1, 2018
1 parent 1e32e8c commit 7aa74e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion client_Core.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,15 @@
//push data to special structure
//var TeamNames = JSON.parse(sessionStorage.getItem("myKey"));
// instead of a - TeamNames[a - 1]
if(e == "Записано"){
var delstr = "<a id='del" + link + "'> Удалить </a>";
}else{
var delstr = "";
}
var teamnames = JSON.parse(sessionStorage.getItem("teamnames"));
document.getElementById("log" + link).innerHTML = teamnames[a-1] +
" (" + a + ") " + "; " + b + "; " + c + "; " + d + "; " + e + "; " +
"<a id='del" + link + "'> Удалить </a>";
delstr;
document.getElementById("del" + link).onclick = function () { var res = confirm('Подтведите удаление'); handleDelete(res, token,link); };

}
Expand Down
4 changes: 2 additions & 2 deletions client_FormMethods.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
if( (Math.trunc(team/1000) + Math.trunc(team/100) + Math.trunc(team/10) + 7) % 10 == sum){
var teamnames = JSON.parse(sessionStorage.getItem("teamnames"));
if(team > 0 && team < (getVersionValue() + 1) ){
document.getElementById('current_team_name').innerText = teamnames[ parseInt(team/10) -1];
document.getElementById('current_team_name').innerText = teamnames[ Math.trunc(team/10) -1];
}
getSubmitButtonElem().removeAttribute("disabled");
}else{
Expand All @@ -24,7 +24,7 @@
}

function onProblemNumberChanged(){
team = getTeamValue();
team = Math.trunc(getTeamValue()/10);
problem = getProblemValue();
id = getIDValue();
//console.log(team, problem);
Expand Down

0 comments on commit 7aa74e6

Please sign in to comment.