Changeset 17 for src/main/webapp/newtournament.xhtml
- Timestamp:
- 09/22/20 08:52:49 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/webapp/newtournament.xhtml
r16 r17 36 36 id="protocolselection" onchange="selectProtocol()"> 37 37 <option value="SAOP">SAOP</option> 38 <option value="MOPAC">MOPAC</option> 39 <option value="AMOP">AMOP</option> 38 40 <option value="SHAOP">SHAOP</option> 39 </select> <br /> Deadline: <input type="number" id="deadlinevalue" 41 42 43 </select> 44 45 <div id="votingevaluator"> 46 <br /> Voting Evaluator: <select id="selectedevaluator"> 47 <option value="LargestAgreement">Largest Agreement</option> 48 <option value="LargestAgreementsLoop">Largest Agreements 49 and Repeat</option> 50 </select> 51 </div> 52 53 54 <br /> Deadline: <input type="number" id="deadlinevalue" 40 55 name="deadline" min="1" max="10000" value="10" /> <select 41 56 id="deadlinetype"> … … 87 102 <!-- party 1 selection --> 88 103 Party: <select id="partyselection"> 89 </select> 90 <br /> Parameters: { 104 </select> <br /> Parameters: { 91 105 <textarea id="parameters" rows="2" cols="70" 92 106 onchange="getParameters('parameters')" value="" /> … … 95 109 <div class="onlySHAOP"> 96 110 COB: <select id="partyselection2"> 97 </select> 98 <br /> Parameters: { 111 </select> <br /> Parameters: { 99 112 <textarea id="parameters2" rows="2" cols="70" 100 113 onchange="getParameters('parameters2')" value="" /> … … 166 179 167 180 181 168 182 // FIXME quick and dirty code. No clean MVC 169 183 … … 186 200 */ 187 201 function selectProtocol() { 188 const isShaop= "SHAOP"==document.getElementById("protocolselection").value; 189 setStyleSheet('.onlySHAOP','{ display: '+(isShaop? '?':'none')+'; }') 202 const protocol = document.getElementById("protocolselection").value; 203 setStyleSheet('.onlySHAOP','{ display: '+(protocol=="SHAOP"? '?':'none')+'; }') 204 205 document.getElementById("votingevaluator").style.display=(protocol=="MOPAC" ? 'block': 'none'); 190 206 } 191 207 … … 536 552 537 553 // create S(H)AOPSettings. [header] is a weird ECMA script workaround for javascript issue. 538 const sessionSettings = { [header]:{"participants":[],"deadline":deadline}}; 539 554 var settingvalues={"participants":[],"deadline":deadline}; 555 if (protocol=="MOPAC") { 556 var combo = document.getElementById("selectedevaluator"); 557 var evaluator = combo.options[combo.selectedIndex].value; 558 settingvalues['votingevaluator'] = { [evaluator]: {} }; 559 } 560 561 const sessionSettings = { [header]:settingvalues}; 562 540 563 var teamsFull = []; 541 564 for (const team of teamslist) { 542 if (protocol=="S AOP") // only first member of team is used.543 teamsFull.push({"Team": [team[0]]});565 if (protocol=="SHAOP") 566 teamsFull.push({"Team":team}); 544 567 else 545 teamsFull.push({"Team": team});568 teamsFull.push({"Team":[team[0]]}); // most protocols have just 1 member per team 546 569 } 547 570 var profilesFull = [] ; 548 571 for (const profileset of profiles) { 549 if (protocol=="SAOP") // only first member of team is used. 572 if (protocol=="SHAOP") // only first member of team is used. 573 profilesFull.push({"ProfileList":profileset}); 574 else 550 575 profilesFull.push({"ProfileList":[profileset[0]]}); 551 else552 profilesFull.push({"ProfileList":profileset});553 576 } 554 577 … … 562 585 */ 563 586 function init() { 564 document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1. 4.4";565 document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1. 4.4";587 document.getElementById("partiesserverurl").value =window.location.hostname+":8080/partiesserver-1.5.0"; 588 document.getElementById("profilesserverurl").value =window.location.hostname+":8080/profilesserver-1.5.0"; 566 589 567 590 selectProtocol(); … … 587 610 588 611 612 589 613 </script> 590 614
Note:
See TracChangeset
for help on using the changeset viewer.