Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/web/WEB-INF/includes/contest/editTabMarathon.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@
<td class="sec_tab_type"><strong>: <span id="rProjectName"><c:out value="${sessionData.currentProjectContext.name}" /></span></strong></td>
</tr>
<tr></tr>
<tr>
<td class="first_tab_type"><strong>MM Type</strong></td>
<td class="sec_tab_type"><strong>: <span id="rMMType"></span></strong></td>
</tr>
<tr></tr>
<%--
<tr>
<td class="first_tab_type"><strong>Product</strong></td>
Expand Down Expand Up @@ -225,7 +230,20 @@
</select>
</div>
</div>
<br /><br /><br />
<br /><br />

<div id="mmTypeEditDiv">
<br />
<span class="name fixWidthName"><strong>MM Type</strong></span>
<div class="mmTypeSelect" style="float:left">
<select id="mmType" name="mmType" class="bigin">
<option value="0">Please select marathon match type</option>
<option value="Classic">Classic</option>
<option value="Banner">Banner</option>
</select>
</div>
</div>
<br /><br />
<%--
<span class="name fixWidthName"><strong>Product</strong></span>
<span class="value">
Expand Down
16 changes: 16 additions & 0 deletions src/web/WEB-INF/includes/launch/contestSelection.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,22 @@
</div>
</div>

<!-- MM Type -->
<div class="row">
<label>MM Type<span class="red">*</span> :</label>
<div class="mmTypeSelect">
<select id="mmType" name="mmType">
<option value="0">Please select marathon match type</option>
<option value="Classic">Classic</option>
<option value="Banner">Banner</option>
</select>
</div>
</div>

<div class="row" id="billingGroupCheckBox">
&nbsp;&nbsp;&nbsp;<input type="checkbox" style=""><span>Run this challenge in a private community ? &nbsp;&nbsp;</span> <select id="billingGroups" name="billingGroups"></select>
</div>

<!-- Billing Account -->
<div class="row">
<label>Billing Account :</label>
Expand Down
8 changes: 4 additions & 4 deletions src/web/css/direct/launchcontest.css
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
border: 1px solid #a8abad;
}

#launchContestOut .addNewContest .projectSelect, #launchContestOut .addNewContest .billingSelect, #launchContestOut .addNewContest .copilotSelect, .reviewScorecardSelect, .milestoneSelect, .reviewerSelect, .registrantsSelect {
#launchContestOut .addNewContest .projectSelect, #launchContestOut .addNewContest .billingSelect, #launchContestOut .addNewContest .copilotSelect, .reviewScorecardSelect, .milestoneSelect, .reviewerSelect, .registrantsSelect, .mmTypeSelect{
width: auto;
float: left;
display: inline;
Expand Down Expand Up @@ -1952,7 +1952,7 @@ a.draft:hover span.right, a.preview:hover span.right {
}

/** billing and round select **/
.reviewScorecardSelect .newListSelected, .billingSelect .newListSelected, .prizeBillingSelect .newListSelected, .roundelect .newListSelected, .copilotSelect .newListSelected, .milestoneSelect .newListSelected, .projectsSelect .newListSelected, .copilotsSelect .newListSelected, .problemSelect .newListSelected, .reviewerSelect .newListSelected, .registrantsSelect .newListSelected {
.reviewScorecardSelect .newListSelected, .billingSelect .newListSelected, .prizeBillingSelect .newListSelected, .roundelect .newListSelected, .copilotSelect .newListSelected, .milestoneSelect .newListSelected, .projectsSelect .newListSelected, .copilotsSelect .newListSelected, .problemSelect .newListSelected, .reviewerSelect .newListSelected, .registrantsSelect .newListSelected, .mmTypeSelect .newListSelected {
width: 283px;
height: 28px;
padding: 0 5px;
Expand All @@ -1969,11 +1969,11 @@ a.draft:hover span.right, a.preview:hover span.right {
color: #6c6c6c;
}

.reviewScorecardSelect .selectedTxt, .billingSelect .selectedTxt, .prizeBillingSelect .selectedTxt, .roundelect .selectedTxt, .copilotSelect .selectedTxt, .milestoneSelect .selectedTxt, .copilotsSelect .selectedTxt, .projectsSelect .selectedTxt, .problemSelect .selectedTxt, .reviewerSelect .selectedTxt, .registrantsSelect .selectedTxt {
.reviewScorecardSelect .selectedTxt, .billingSelect .selectedTxt, .prizeBillingSelect .selectedTxt, .roundelect .selectedTxt, .copilotSelect .selectedTxt, .milestoneSelect .selectedTxt, .copilotsSelect .selectedTxt, .projectsSelect .selectedTxt, .problemSelect .selectedTxt, .reviewerSelect .selectedTxt, .registrantsSelect .selectedTxt, .mmTypeSelect .selectedTxt {
width: 281px;
}

.reviewScorecardSelect .newList, .billingSelect .newList, .prizeBillingSelect .newList, .roundelect .newList, .copilotSelect .newList, .milestoneSelect .newList, .copilotsSelect .newList, .projectsSelect .newList, .problemSelect .newList, .reviewerSelect .newList, .registrantsSelect .newList{
.reviewScorecardSelect .newList, .billingSelect .newList, .prizeBillingSelect .newList, .roundelect .newList, .copilotSelect .newList, .milestoneSelect .newList, .copilotsSelect .newList, .projectsSelect .newList, .problemSelect .newList, .reviewerSelect .newList, .registrantsSelect .newList, .mmTypeSelect .newList{
width: 290px;
border: #ccc solid 1px;
background: #fff;
Expand Down
18 changes: 18 additions & 0 deletions src/web/scripts/launch/contestDetailSoftware.js
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,11 @@ function populateTypeSection() {
$(".matchRoundId").show();
}

if (mainWidget.softwareCompetition.projectHeader.properties.hasOwnProperty(MM_TYPE)) {
$('#rMMType').text(mainWidget.softwareCompetition.projectHeader.properties[MM_TYPE]);
$('#mmType').getSetSSValue(mainWidget.softwareCompetition.projectHeader.properties[MM_TYPE]);
}

// populate review style
if (mainWidget.softwareCompetition.projectHeader.properties['Review Type'] && mainWidget.competitionType == "SOFTWARE") {
var reviewType = mainWidget.softwareCompetition.projectHeader.properties['Review Type'];
Expand Down Expand Up @@ -1524,6 +1529,9 @@ function validateFieldsTypeSection() {
&& categoryId != STUDIO_CATEGORY_ID_DESIGN_F2F) {
validateDirectProjectMilestone(milestoneId, errors);
}
if (categoryId == ALGORITHM_CATEGORY_ID_MARATHON && $('#mmType').val() === '0') {
errors.push('Marathon match type is required');
}
if (errors.length > 0) {
showErrors(errors);
return false;
Expand Down Expand Up @@ -1569,6 +1577,11 @@ function validateFieldsTypeSection() {
// set iterative review scorecard
mainWidget.softwareCompetition.projectHeader.reviewScorecardId = parseInt($('select#reviewScorecardSelects').val());
}

if (categoryId == ALGORITHM_CATEGORY_ID_MARATHON) {
mainWidget.softwareCompetition.projectHeader.properties[MM_TYPE] = $('#mmType').val().trim();
}

return true;
}

Expand Down Expand Up @@ -1627,6 +1640,11 @@ function showTypeSectionEdit() {
$('#reviewer').data('customized',true);
}

if(!$('#mmType').data('customized')) {
$('#mmType').sSelect({ddMaxHeight: '220',yscroll: true});
$('#mmType').data('customized',true);
}

$('#contestTypes').getSetSSValue(mainWidget.competitionType + mainWidget.softwareCompetition.projectHeader.projectCategory.id);

var projectType = mainWidget.competitionType;
Expand Down
1 change: 1 addition & 0 deletions src/web/scripts/launch/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ var PRODUCT_SKU ="Product SKU";

var ENVIRONMENT = "Environment";
var CODE_REPO = "Code Repo";
var MM_TYPE = "Marathon Match Type";

var projectCategoryArray = [
{id:SOFTWARE_CATEGORY_ID_CONCEPT, name:'CONCEPTUALIZATION', label:'Software Conceptualization', typeId:2, typeName:'Application', hasMulti:true, hideInDropdown: true},
Expand Down
4 changes: 4 additions & 0 deletions src/web/scripts/launch/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,8 @@ function saveAsDraftRequestSoftware() {
mainWidget.softwareCompetition.projectHeader.properties['Thurgood Platform'] = '';
}

delete mainWidget.softwareCompetition.projectHeader.properties[MM_TYPE];

if(isF2F() || isCode()) {
// get the auto assign reviewer ID to F2F / CODE challenge
mainWidget.softwareCompetition.projectHeader.autoAssignReviewerId =
Expand Down Expand Up @@ -1321,6 +1323,8 @@ function saveAsDraftRequestStudio() {
request['directProjectMilestoneId'] = mainWidget.softwareCompetition.projectMilestoneId;
request['preRegisterUsers'] = mainWidget.softwareCompetition.preRegisterUsers;

delete mainWidget.softwareCompetition.projectHeader.properties[MM_TYPE];

if (!isNaN(mainWidget.softwareCompetition.copilotUserId)) {
request['contestCopilotId'] = mainWidget.softwareCompetition.copilotUserId;
request['contestCopilotName'] = mainWidget.softwareCompetition.copilotUserName;
Expand Down
8 changes: 6 additions & 2 deletions src/web/scripts/launch/pages/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,18 @@ function validateFieldsContestSelectionAlgorithm() {
var startDate = getDateByIdPrefix('start');
var regEndDate = getDateByIdPrefix('regEnd');
var endDate = getDateByIdPrefix('subEnd');

//validation
var errors = [];

//validate contest
validateContestName(contestName, errors);

validateTcProject(tcProjectId, errors);


if ($('#mmType').val() === '0') {
errors.push('Marathon match type is required');
}
// validate schedule
if(startDate >= regEndDate) {
errors.push('The registration end date should be after the start date.');
Expand Down Expand Up @@ -196,6 +199,7 @@ function validateFieldsContestSelectionAlgorithm() {

mainWidget.softwareCompetition.subEndDate = endDate;
mainWidget.softwareCompetition.regEndDate = regEndDate;
mainWidget.softwareCompetition.projectHeader.properties[MM_TYPE] = $('#mmType').val().trim();

//prizes is on category id
// fillPrizes();
Expand Down
5 changes: 4 additions & 1 deletion src/web/scripts/launchcontest.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ $(document).ready(function() {
ddMaxHeight: '220px',
yscroll: true
};
$('.billingSelect select,.roundelect select,.startEtSelect select,.checkpointEtSelect select,.endEtSelect select').sSelect(SelectOptions);
$('.billingSelect select,.roundelect select,.startEtSelect select,.checkpointEtSelect select,.endEtSelect select, .mmTypeSelect select').sSelect(SelectOptions);
$('.projectSelect select').sSelect(SelectOptions).change(function() {
handleProjectDropDownChange();
});
Expand Down Expand Up @@ -884,12 +884,15 @@ function onContestTypeChange() {
// show the end date for marathon match
$("#subEndDateDiv").show();
$("div.milestoneSelect").parents("div.row").hide();
$("#mmType").closest(".row").show();
} else if(contestType == 'SOFTWARE') {
$("#subEndDateDiv").show();
$("div.milestoneSelect").parents("div.row").show();
$("#mmType").closest(".row").hide();
} else {
$("#subEndDateDiv").hide();
$("div.milestoneSelect").parents("div.row").show();
$("#mmType").closest(".row").hide();
}

if (isContestSaved() && mainWidget.competitionType != contestType) {
Expand Down