Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 47c43bc

Browse files
committed
fix edit group
1 parent f363c55 commit 47c43bc

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

src/web/WEB-INF/includes/launch/reviewAlgorithm.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<td><span id="ralEndDate"></span><a href="javascript:showPage('contestSelectionPage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
4545
</tr>
4646
<tr class="rGroups">
47-
<th>Challenge Groups :</th>
47+
<th>Group(s) :</th>
4848
<td><a href="javascript:backReview();" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
4949
</tr>
5050
</table>

src/web/WEB-INF/includes/launch/reviewSoftware.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<td><span id="rswCheckpointDate"></span><a href="javascript:showPage('contestSelectionPage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
6363
</tr>
6464
<tr class="rGroups">
65-
<th>Challenge Groups :</th>
65+
<th>Group(s) :</th>
6666
<td><a href="javascript:backReview();" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
6767
</tr>
6868
</table>

src/web/scripts/launch/contestDetailSoftware.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,17 @@ function populateTypeSection() {
13661366

13671367

13681368
}
1369+
jQuery_1_11_1("#groups").magicSuggest().setValue(mainWidget.softwareCompetition.groups);
1370+
var groupMap = {};
1371+
$.each(securityGroups, function(i, val){
1372+
groupMap[''+val.id]=val.name;
1373+
});
1374+
var selectedGroupName = [];
1375+
$.each(mainWidget.softwareCompetition.groups, function(i, val){
1376+
selectedGroupName.push(groupMap[val]);
1377+
});
13691378

1379+
$('#rswGroups').html(selectedGroupName.join(", "));
13701380
}
13711381

13721382
/**
@@ -1422,6 +1432,7 @@ function saveTypeSection() {
14221432
dataType: 'json',
14231433
success: function (jsonResult) {
14241434
handleSaveAsDraftContestResult(jsonResult);
1435+
mainWidget.softwareCompetition.groups = jQuery_1_11_1("#groups").magicSuggest().getValue();
14251436
populateTypeSection();
14261437
populateRoundSection();
14271438
if (mainWidget.competitionType == "SOFTWARE") {
@@ -2596,8 +2607,6 @@ function populateSpecSection(initFlag) {
25962607
$("#swThurgoodDiv input").removeAttr("checked");
25972608
}
25982609

2599-
jQuery_1_11_1("#groups").magicSuggest().setValue(mainWidget.softwareCompetition.groups);
2600-
26012610
// for studio
26022611
if (mainWidget.competitionType == "STUDIO") {
26032612
$('#contestIntroduction').val(mainWidget.softwareCompetition.projectHeader.projectStudioSpecification.contestIntroduction);
@@ -2652,16 +2661,6 @@ function populateSpecSection(initFlag) {
26522661
});
26532662
$('#rswTechnologies').html(html);
26542663
}
2655-
var groupMap = {};
2656-
$.each(securityGroups, function(i, val){
2657-
groupMap[''+val.id]=val.name;
2658-
});
2659-
var selectedGroupName = [];
2660-
$.each(mainWidget.softwareCompetition.groups, function(i, val){
2661-
selectedGroupName.push(groupMap[val]);
2662-
});
2663-
2664-
$('#rswGroups').html(selectedGroupName.join(", "));
26652664

26662665
if(isPlatformContest()) {
26672666
var html = "";

0 commit comments

Comments
 (0)