diff --git a/src/web/css/direct/launchcontest.css b/src/web/css/direct/launchcontest.css
index 658d60188..90ee4fd92 100644
--- a/src/web/css/direct/launchcontest.css
+++ b/src/web/css/direct/launchcontest.css
@@ -309,7 +309,7 @@
margin-left: 14px;
font-family: "Source Sans Pro", Arial, Helvetica, sans-serif;
font-size: 14px;
- line-height: 28px;
+ line-height: 24px;
}
#launchContestOut.launchCopilotContest .addNewContest label {
@@ -1790,7 +1790,7 @@ a.draft:hover span.right, a.preview:hover span.right {
}
.overviewData th {
- width: 110px;
+ width: 130px;
font-weight: 400;
text-align: right;
}
@@ -3256,6 +3256,10 @@ div.ms-group-display .ms-group-div{
margin-top: 17px;
}
+.effortEstimateRow {
+ height: 50px;
+}
+
.dropdown-menu {
position: absolute;
top: 100%;
@@ -3287,3 +3291,7 @@ div.ms-group-display .ms-group-div{
width: 401px;
height: 25px;
}
+
+span.name.fixWidthName {
+ line-height: 24px;
+}
\ No newline at end of file
diff --git a/src/web/scripts/launch/contestDetail.js b/src/web/scripts/launch/contestDetail.js
index 3370ef154..5d9233e15 100644
--- a/src/web/scripts/launch/contestDetail.js
+++ b/src/web/scripts/launch/contestDetail.js
@@ -19,8 +19,8 @@
* Version 1.1 (Module Assembly - TC Cockpit Contest Milestone Association 1)
* - Add support for milestone association with contest in contest detail page.
*
- * Version 1.2 (Topcoder - Add effort hours field)
- * - Add enable effort hours.
+ * Version 1.2 (Topcoder - Add effort days field)
+ * - Add enable effort days.
*
* @author GreatKevin
* @version 1.2
@@ -337,8 +337,8 @@ function populateTypeSection() {
$('#challegneCreatorLabel').html(mainWidget.competition.contestData.challengeCreator);
$('#rChallengeCreator').html(mainWidget.competition.contestData.challengeCreator);
- $('#effortHoursEstimate').html(mainWidget.competition.contestData.projectHeader.properties['Effort Hours Estimate']);
- $('#rEffortHoursEstimate').html(mainWidget.competition.contestData.projectHeader.properties['Effort Hours Estimate']);
+ $('#effortDaysEstimate').html(mainWidget.competition.contestData.projectHeader.properties['Effort Hours Estimate']);
+ $('#rEffortDaysEstimate').html(mainWidget.competition.contestData.projectHeader.properties['Effort Hours Estimate']);
if(isBillingEditable()) {
$('#billingAccountDivEdit').show();
diff --git a/src/web/scripts/launch/contestDetailSoftware.js b/src/web/scripts/launch/contestDetailSoftware.js
index 35bb4c4bd..cd98eb744 100644
--- a/src/web/scripts/launch/contestDetailSoftware.js
+++ b/src/web/scripts/launch/contestDetailSoftware.js
@@ -143,8 +143,8 @@
* Version 4.5 (Topcoder - Support Points Prize Type For Challenges)
* - Add support for points prize type
*
- * Version 4.6 (Topcoder - Add effort hours field)
- * - Add enable effort hours
+ * Version 4.6 (Topcoder - Add effort days field)
+ * - Add enable effort days
* @author isv, minhu, pvmagacho, GreatKevin, Veve, GreatKevin, TCSCODER
* @version 4.6
*/
@@ -188,8 +188,8 @@ $(document).ready(function(){
$.each(billingAccounts, function(key, value) {
var _cca = value["cca"] == "true" ? true : false;
- var _enableEffortHours = value["enableEffortHours"] == "true" ? true : false;
- $("#billingProjects").append($('
').val(value["id"]).html(value["name"]).data("cca", _cca).data("enableEffortHours", _enableEffortHours));
+ var _enableEffortDays = value["enableEffortDays"] == "true" ? true : false;
+ $("#billingProjects").append($('
').val(value["id"]).html(value["name"]).data("cca", _cca).data("enableEffortDays", _enableEffortDays));
});
/* Optgroup 2 columns fix */
if($('.selectDesing optgroup, .selectDesign .newListOptionTitle').length > 0){
@@ -568,7 +568,7 @@ $(document).ready(function(){
$("#chkboxCCA").removeAttr('disabled');
}
- if($(this).find(":selected").data("enableEffortHours")) {
+ if($(this).find(":selected").data("enableEffortDays")) {
$('.effortEstimateRow').show();
} else {
$('.effortEstimateRow').hide();
@@ -609,9 +609,9 @@ $(document).ready(function(){
}
});
$('.effortEstimateRow .helpme').hover(function() {
- showPopup(this, 'effortHourToolTip');
+ showPopup(this, 'effortDaysToolTip');
}, function() {
- $('#effortHourToolTip').hide();
+ $('#effortDaysToolTip').hide();
});
});
@@ -1322,7 +1322,6 @@ function populateTypeSection() {
}
*/
$('#rContestTypeName').text($("#contestTypes option[value=" + mainWidget.competitionType + mainWidget.softwareCompetition.projectHeader.projectCategory.id +"]").text());
-
loadReviewScorecardList(null);
$.each(reviewScorecards,function(){
@@ -1438,13 +1437,14 @@ function populateTypeSection() {
$(".matchRoundId").show();
}
- var effortHoursEstimate = parseFloat(p['Effort Hours Estimate']);
- if (!isNaN(effortHoursEstimate) && effortHoursEstimate > 0 ) {
- $('#rEffortHoursEstimate').text(parseFloat(effortHoursEstimate));
- $('input[name=effortHoursEstimate]').val(effortHoursEstimate);
+ // change to days
+ var effortDaysEstimate = parseFloat(p['Effort Hours Estimate']) / 24;
+ if (!isNaN(effortDaysEstimate) && effortDaysEstimate > 0 ) {
+ $('#rEffortDaysEstimate').text(parseFloat(effortDaysEstimate));
+ $('input[name=effortDaysEstimate]').val(effortDaysEstimate);
$('.effortEstimateRow').show();
} else {
- $('#rEffortHoursEstimate').text('');
+ $('#rEffortDaysEstimate').text('');
}
if (mainWidget.softwareCompetition.projectHeader.properties.hasOwnProperty(MM_TYPE)) {
@@ -1586,7 +1586,7 @@ function validateFieldsTypeSection() {
}
// validate effort hours estimate
- validateEffortHoursEstimate(errors);
+ validateEffortDaysEstimate(errors);
// do NOT need milestone for First2Finish and CODE contest
if (categoryId != SOFTWARE_CATEGORY_ID_F2F
@@ -1656,7 +1656,6 @@ function showTypeSectionDisplay() {
}
function showTypeSectionEdit() {
-
$("#reviewerEditDiv").hide();
$("#reviewTypeEditDiv").hide();
@@ -1675,12 +1674,12 @@ function showTypeSectionEdit() {
$.each(billingAccounts,function(k, v) {
var _cca = v["cca"] == "true" ? true : false;
- var _enableEffortHours = value["enableEffortHours"] == "true" ? true : false;
+ var _enableEffortDays = v["enableEffortDays"] == "true" ? true : false;
if (v["id"] == mainWidget.softwareCompetition.projectHeader.getBillingProject()) {
if (_cca) {
$("#chkboxCCA").attr('disabled','true');
}
- if(_enableEffortHours) {
+ if(_enableEffortDays) {
$(".effortEstimateRow").show();
}
}
@@ -1698,7 +1697,6 @@ function showTypeSectionEdit() {
$('#copilots').data('customized',true);
}
-
if(!$('#milestones').data('customized')) {
$('#milestones').sSelect({ddMaxHeight: '220',yscroll: true});
$('#milestones').data('customized',true);
@@ -1715,7 +1713,6 @@ function showTypeSectionEdit() {
}
$('#contestTypes').getSetSSValue(mainWidget.competitionType + mainWidget.softwareCompetition.projectHeader.projectCategory.id);
-
var projectType = mainWidget.competitionType;
var projectCategoryId = mainWidget.softwareCompetition.projectHeader.projectCategory.id;
setupReviewerDropdown(projectCategoryId, mainWidget.softwareCompetition.projectHeader.tcDirectProjectId);
@@ -2857,7 +2854,7 @@ function showPrizeSectionEdit() {
$("#chkboxCCA").removeAttr('disabled');
}
- if($(this).find(":selected").data("enableEffortHours")) {
+ if($(this).find(":selected").data("enableEffortDays")) {
$('.effortEstimateRow').show();
} else {
$('.effortEstimateRow').hide();
@@ -3637,8 +3634,8 @@ function handleProjectDropDownChange() {
$.each(billingAccounts, function(key, value) {
var _cca = value["cca"] == "true" ? true : false;
- var _enableEffortHours = value["enableEffortHours"] == "true" ? true : false;
- $("#billingProjects").append($('
').val(value["id"]).text(value["name"]).data("cca", _cca).data("enableEffortHours", _enableEffortHours));
+ var _enableEffortDays = value["enableEffortHours"] == "true" ? true : false;
+ $("#billingProjects").append($('
').val(value["id"]).text(value["name"]).data("cca", _cca).data("enableEffortDays", _enableEffortDays));
});
$("#chkboxCCA").removeAttr('checked');
$("#chkboxCCA").removeAttr('disabled');
@@ -3662,7 +3659,7 @@ function handleProjectDropDownChange() {
$("#chkboxCCA").removeAttr('disabled');
}
- if($(this).find(":selected").data("enableEffortHours")) {
+ if($(this).find(":selected").data("enableEffortDays")) {
$('.effortEstimateRow').show();
} else {
$('.effortEstimateRow').hide();
diff --git a/src/web/scripts/launch/main.js b/src/web/scripts/launch/main.js
index 3880b80f2..41bcb2fb6 100644
--- a/src/web/scripts/launch/main.js
+++ b/src/web/scripts/launch/main.js
@@ -133,8 +133,8 @@
* Version 4.6 (Topcoder - Support Points Prize Type For Challenges)
* - Add support for points prize type
*
- * Version 4.7 (Topcoder - Add effort hours field)
- * - Add enable effort hours
+ * Version 4.7 (Topcoder - Add effort days field)
+ * - Add enable effort days
* @author isv, GreatKevin, bugbuka, GreatKevin, Veve, TCSCODER, TCSASSEMBER
* @version 4.7
*/
@@ -300,7 +300,7 @@ $(document).ready(function() {
contentType: 'application/json; charset=utf-8',
async: false,
beforeSend: function (xhr) {
- xhr.setRequestHeader("Authorization", "Bearer " + $.cookie(jwtCookieName));
+ xhr.setRequestHeader("Authorization", "Bearer " + $.cookie(jwtCookieName));
},
success: function (jsonResult) {
if (jQuery_1_11_1("#groups").magicSuggest().getValue().length > 0){
@@ -1195,8 +1195,9 @@ function saveAsDraftRequest() {
}
if($(".effortEstimateRow").is(":visible")) {
- var effortHoursEstimate = $("input[name=effortHoursEstimate]").val();
- mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] = effortHoursEstimate;
+ var effortDaysEstimate = $("input[name=effortDaysEstimate]").val().trim();
+ if (effortDaysEstimate.length > 0) effortDaysEstimate *= 24;
+ mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] = effortDaysEstimate;
} else {
mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] = '';
}
@@ -3467,18 +3468,18 @@ function validateFileTypes(errors) {
}
/**
- * Validates effort hours estimate.
+ * Validates effort days estimate.
* @param errors array of errors
*/
-function validateEffortHoursEstimate(errors) {
- if($("input[name=effortHoursEstimate]").is(":visible")
- && $("input[name=effortHoursEstimate]").length > 0
- && $.trim($("input[name=effortHoursEstimate]").val()).length > 0) {
- var effortHoursEstimate = $("input[name=effortHoursEstimate]").val();
- if(!checkNumber(effortHoursEstimate)) {
- errors.push("The Effort Hours Estimate should be a number");
- } else if(effortHoursEstimate == 0) {
- errors.push("The Effort Hours Estimate should be positive");
+function validateEffortDaysEstimate(errors) {
+ if($("input[name=effortDaysEstimate]").is(":visible")
+ && $("input[name=effortDaysEstimate]").length > 0
+ && $.trim($("input[name=effortDaysEstimate]").val()).length > 0) {
+ var effortDaysEstimate = $("input[name=effortDaysEstimate]").val();
+ if(!checkNumber(effortDaysEstimate)) {
+ errors.push("The Effort Days Estimate should be a number");
+ } else if(effortDaysEstimate == 0) {
+ errors.push("The Effort Days Estimate should be positive");
}
}
}
diff --git a/src/web/scripts/launch/pages/orderReview.js b/src/web/scripts/launch/pages/orderReview.js
index 7ff32a23c..5aacdfc79 100644
--- a/src/web/scripts/launch/pages/orderReview.js
+++ b/src/web/scripts/launch/pages/orderReview.js
@@ -51,8 +51,8 @@
* Version 2.4 (Topcoder - Support Points Prize Type For Challenges)
* - Add support for points prize type
*
- * Version 2.5 (Topcoder - Add effort hours field)
- * - Add enable effort hours
+ * Version 2.5 (Topcoder - Add effort days field)
+ * - Add enable effort days
*
* @author pvmagacho, GreatKevin, bugbuka, GreatKevin, Veve, GreatKevin
* @version 2.5
@@ -70,9 +70,11 @@ function updateOrderReviewAlgorithm() {
$('#alorProject').html($("#projects option[value="+ mainWidget.softwareCompetition.projectHeader.tcDirectProjectId +"]").text());
$('#alorBillingAccount').html((billingProjectId == -1)?"(not selected)":$("#billingProjects option[value="+ billingProjectId +"]").text());
-
- $('#alorEffortHoursEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate']);
-
+ if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) {
+ $('#alorEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24 );
+ } else {
+ $('#alorEffortDaysEstimate').html("");
+ }
$('#alorStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate));
//points
@@ -144,7 +146,11 @@ function updateOrderReviewSoftware() {
$('#sworContestName').html(mainWidget.softwareCompetition.assetDTO.name);
$('#sworProjectName').html($("#projects option[value="+ mainWidget.softwareCompetition.projectHeader.tcDirectProjectId +"]").text());
$('#sworBillingAccount').html($("#billingProjects option[value="+ billingProjectId +"]").text());
- $('#sworEffortHoursEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate']);
+ if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) {
+ $('#sworEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24);
+ } else {
+ $('#sworEffortDaysEstimate').html("");
+ }
$('#sworStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate));
//points
@@ -296,8 +302,11 @@ function updateOrderReviewStudio() {
$('#orBillingAccount').html((billingProjectId == -1)?"(not selected)":$("#billingProjects option[value="+ billingProjectId +"]").text());
- $('#orEffortHoursEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate']);
-
+ if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) {
+ $('#orEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24 );
+ } else {
+ $('#orEffortDaysEstimate').html("");
+ }
$('#orStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate));
//points
diff --git a/src/web/scripts/launch/pages/review.js b/src/web/scripts/launch/pages/review.js
index 3651dfb07..9591990e6 100644
--- a/src/web/scripts/launch/pages/review.js
+++ b/src/web/scripts/launch/pages/review.js
@@ -43,7 +43,11 @@ function updateReviewAlgorithm() {
var billingProjectId = mainWidget.softwareCompetition.projectHeader.getBillingProject();
$('#ralBillingAccount').html((billingProjectId == -1)?" ":$("#billingProjects option[value="+ billingProjectId +"]").text());
- $('#ralEffortHoursEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate']);
+ if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) {
+ $('#ralEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24);
+ } else {
+ $('#ralEffortDaysEstimate').html("");
+ }
$('#ralStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate));
// to do
@@ -89,9 +93,11 @@ function updateReviewSoftware() {
var billingProjectId = mainWidget.softwareCompetition.projectHeader.getBillingProject();
$('#rswBillingAccount').html((billingProjectId == -1)?" ":$("#billingProjects option[value="+ billingProjectId +"]").text());
-
- $('#rswEffortHoursEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate']);
-
+ if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) {
+ $('#rswEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24);
+ } else {
+ $('#rswEffortDaysEstimate').html("");
+ }
$('#rswStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate));
$('#rswDetailedRequirements').html(mainWidget.softwareCompetition.projectHeader.projectSpec.detailedRequirements);
@@ -248,8 +254,11 @@ function updateReviewStudio() {
} else {
$("#reviewPage .maxSubmissions").show();
}
-
- $('#rEffortHoursEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate']);
+ if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) {
+ $('#rEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24);
+ } else {
+ $('#rEffortDaysEstimate').html("");
+ }
}
/**
diff --git a/src/web/scripts/launch/pages/selection.js b/src/web/scripts/launch/pages/selection.js
index aa749ccdc..e7881b096 100644
--- a/src/web/scripts/launch/pages/selection.js
+++ b/src/web/scripts/launch/pages/selection.js
@@ -58,7 +58,7 @@
* Version 2.5 (Topcoder - Support Points Prize Type For Challenges)
* - Add support for points prize type
*
- * Version 2.6 (Topcoder - Add Effort Hours Field)
+ * Version 2.6 (Topcoder - Add Effort Days Field)
* - Add support for effort hours estimate
*
* @version 2.6
@@ -120,7 +120,7 @@ function initCompetitionSelectionCommonData() {
var tcProjectId = parseInt($('select#projects').val());
var billingProjectId = parseInt($('select#billingProjects').val());
var isMultiRound = hasMultiRound(categoryId) && ('multi' == $('#roundTypes').val());
- var effortHoursEstimate = $('input#effortHoursEstimate').val();
+ var effortDaysEstimate = $('input#effortDaysEstimate').val().trim();
// apply category id data
var projectCategory = getProjectCategoryById(categoryId);
@@ -143,7 +143,9 @@ function initCompetitionSelectionCommonData() {
mainWidget.softwareCompetition.projectHeader.setProjectName(contestName);
mainWidget.softwareCompetition.multiRound = isMultiRound;
- mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] = effortHoursEstimate;
+ // change to hours
+ if (effortDaysEstimate.length > 0) effortDaysEstimate *= 24;
+ mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] = effortDaysEstimate;
}
function validateFieldsContestSelectionAlgorithm() {
@@ -171,7 +173,7 @@ function validateFieldsContestSelectionAlgorithm() {
errors.push('Marathon match type is required');
}
- validateEffortHoursEstimate(errors);
+ validateEffortDaysEstimate(errors);
// validate schedule
if(startDate >= regEndDate) {
@@ -264,7 +266,7 @@ function validateFieldsContestSelectionSoftware() {
}
}
- validateEffortHoursEstimate(errors);
+ validateEffortDaysEstimate(errors);
if (regEndDate.getTime() <= startDate.getTime()) {
errors.push('Registration end date/time should be larger than Start date/time.');
@@ -413,7 +415,7 @@ function validateFieldsContestSelectionStudio() {
validateDirectProjectMilestone(projectMilestoneId, errors);
}
- validateEffortHoursEstimate(errors);
+ validateEffortDaysEstimate(errors);
if(isMultiRound) {
if (checkpointDateHours == 0) {
diff --git a/src/web/scripts/launchcontest.js b/src/web/scripts/launchcontest.js
index b4b9698f0..e63914c27 100644
--- a/src/web/scripts/launchcontest.js
+++ b/src/web/scripts/launchcontest.js
@@ -82,7 +82,7 @@
* Version 2.12 (Topcoder - Support Points Prize Type For Challenges)
* - Fix the bug the round info not properly shown/hidden when changing contest type
*
- * Version 2.13 (Topcoder - Add effort hours field)
+ * Version 2.13 (Topcoder - Add effort days field)
* - Add support for enable effort hours
* @author GreatKevin, csy2012, bugbuka, TCSCODER
* @version 2.13
@@ -385,9 +385,9 @@ $(document).ready(function() {
});
$('.ms-row.effortEstimateRow .helpme').hover(function() {
- showPopup(this, 'effortHourToolTip');
+ showPopup(this, 'effortDaysToolTip');
}, function() {
- $('#effortHourToolTip').hide();
+ $('#effortDaysToolTip').hide();
});
$('#assembly_bug_hunt .helpme').hover(function () {
@@ -658,8 +658,8 @@ function handleProjectDropDownChange() {
$.each(billingAccounts, function(key, value) {
-
- $("#billingProjects").append($('
').val(value["id"]).html(value["name"]).data("cca", (value["cca"] == "true" ? true : false)).data("enableEffortHours", value["enableEffortHours"]));
+ var _enableEffortDays = value["enableEffortHours"] == "true" ? true : false;
+ $("#billingProjects").append($('
').val(value["id"]).html(value["name"]).data("cca", (value["cca"] == "true" ? true : false)).data("enableEffortDays", _enableEffortDays));
if(value["id"] == $("input[name=CMCBillingID]").val()) {
CMCBillingExisting = true;
@@ -670,7 +670,7 @@ function handleProjectDropDownChange() {
$("#billingProjects").val(0);
if(hasCMCBilling && !CMCBillingExisting) {
- $("#billingProjects").append($('
').val($("input[name=CMCBillingID]").val()).html($("input[name=CMCBillingName]").val()).data("cca", false).data("enableEffortHours", value["enableEffortHours"]));
+ $("#billingProjects").append($('
').val($("input[name=CMCBillingID]").val()).html($("input[name=CMCBillingName]").val()).data("cca", false).data("enableEffortDays", value["enableEffortDays"]));
}
$("#billingProjects").resetSS();
@@ -683,7 +683,7 @@ function handleProjectDropDownChange() {
$("#lccCheckBox").removeAttr('disabled');
}
- if($(this).find(":selected").data("enableEffortHours")) {
+ if($(this).find(":selected").data("enableEffortDays")) {
$('.effortEstimateRow').show();
} else {
$('.effortEstimateRow').hide();