diff --git a/src/web/WEB-INF/includes/contest/editTab.jsp b/src/web/WEB-INF/includes/contest/editTab.jsp index 7f498ec70..d7c33971c 100644 --- a/src/web/WEB-INF/includes/contest/editTab.jsp +++ b/src/web/WEB-INF/includes/contest/editTab.jsp @@ -163,8 +163,13 @@ - Estimated Effort
(in Person Days):
- : + Estimated Efforts
Offshore (In Person Days) + : + + + + Estimated Efforts
Onsite (In Person Days) + : @@ -342,8 +347,13 @@

- Estimated Effort
(in Person Days): 
help
- + Estimated Efforts
Offshore (In Person Days)
+ +
+

+
+ Estimated Efforts
Onsite(In Person Days)
+


Created By diff --git a/src/web/WEB-INF/includes/contest/editTabMarathon.jsp b/src/web/WEB-INF/includes/contest/editTabMarathon.jsp index 37c8649f2..ca2f6c6d9 100644 --- a/src/web/WEB-INF/includes/contest/editTabMarathon.jsp +++ b/src/web/WEB-INF/includes/contest/editTabMarathon.jsp @@ -135,8 +135,13 @@ - Estimated Effort
(in Person Days):
- : + Estimated Efforts
Offshore (In Person Days) + : + + + + Estimated Efforts
Onsite (In Person Days) + : @@ -295,8 +300,13 @@

- Estimated Effort
(in Person Days): 
help
- + Estimated Efforts
Offshore (In Person Days)
+ +
+

+
+ Estimated Efforts
Onsite(In Person Days)
+


Created By diff --git a/src/web/WEB-INF/includes/contest/editTabSoftware.jsp b/src/web/WEB-INF/includes/contest/editTabSoftware.jsp index 520abfd25..2b0b3beb3 100644 --- a/src/web/WEB-INF/includes/contest/editTabSoftware.jsp +++ b/src/web/WEB-INF/includes/contest/editTabSoftware.jsp @@ -185,8 +185,13 @@ - Estimated Effort
(in Person Days):
- : + Estimated Efforts
Offshore (In Person Days) + : + + + + Estimated Efforts
Onsite (In Person Days) + : @@ -369,13 +374,17 @@
- Estimated Effort
(in Person Days): 
help
- + Estimated Efforts
Offshore (In Person Days)
+ +
+

+
+ Estimated Efforts
Onsite(In Person Days)
+


-
Created By diff --git a/src/web/WEB-INF/includes/launch/contestSelection.jsp b/src/web/WEB-INF/includes/launch/contestSelection.jsp index 8d81a028f..8c1f04851 100644 --- a/src/web/WEB-INF/includes/launch/contestSelection.jsp +++ b/src/web/WEB-INF/includes/launch/contestSelection.jsp @@ -236,9 +236,18 @@
-
+ <%--
+
--%> + +
+ + +
+
+ +
diff --git a/src/web/WEB-INF/includes/launch/orderReview.jsp b/src/web/WEB-INF/includes/launch/orderReview.jsp index ce95d301c..a4cbae60a 100644 --- a/src/web/WEB-INF/includes/launch/orderReview.jsp +++ b/src/web/WEB-INF/includes/launch/orderReview.jsp @@ -59,9 +59,13 @@ Edit - Effort Days Estimate : - Edit + Effort Estimates :
Offshore (In Person Days)
+ Edit + + Effort Estimates :
Onsite (In Person Days)
+ Edit + diff --git a/src/web/WEB-INF/includes/launch/orderReviewAlgorithm.jsp b/src/web/WEB-INF/includes/launch/orderReviewAlgorithm.jsp index b4ceba03b..4370098a9 100644 --- a/src/web/WEB-INF/includes/launch/orderReviewAlgorithm.jsp +++ b/src/web/WEB-INF/includes/launch/orderReviewAlgorithm.jsp @@ -48,9 +48,13 @@ Edit - Effort Days Estimate : - Edit + Effort Estimates :
Offshore (In Person Days)
+ Edit + + Effort Estimates :
Onsite (In Person Days)
+ Edit + diff --git a/src/web/WEB-INF/includes/launch/orderReviewSoftware.jsp b/src/web/WEB-INF/includes/launch/orderReviewSoftware.jsp index 385845c51..d7c2d23d3 100644 --- a/src/web/WEB-INF/includes/launch/orderReviewSoftware.jsp +++ b/src/web/WEB-INF/includes/launch/orderReviewSoftware.jsp @@ -60,9 +60,13 @@ Edit - Effort Days Estimate : - Edit + Effort Estimates :
Offshore (In Person Days)
+ Edit + + Effort Estimates :
Onsite (In Person Days)
+ Edit + diff --git a/src/web/WEB-INF/includes/launch/review.jsp b/src/web/WEB-INF/includes/launch/review.jsp index 3a55ef526..fbcde56e3 100644 --- a/src/web/WEB-INF/includes/launch/review.jsp +++ b/src/web/WEB-INF/includes/launch/review.jsp @@ -68,8 +68,14 @@ Edit - Effort Days Estimate : - + Effort Estimates :
Offshore (In Person Days)
+
+ Edit + + + + Effort Estimates :
Onsite (In Person Days)
+ Edit diff --git a/src/web/WEB-INF/includes/launch/reviewAlgorithm.jsp b/src/web/WEB-INF/includes/launch/reviewAlgorithm.jsp index af1291fd2..0c2796205 100644 --- a/src/web/WEB-INF/includes/launch/reviewAlgorithm.jsp +++ b/src/web/WEB-INF/includes/launch/reviewAlgorithm.jsp @@ -53,10 +53,18 @@ Group(s) : Edit - - Effort Days Estimate : - Edit - + + Effort Estimates :
Offshore (In Person Days)
+ + Edit + + + + Effort Estimates :
Onsite (In Person Days)
+ + Edit + + diff --git a/src/web/WEB-INF/includes/launch/reviewSoftware.jsp b/src/web/WEB-INF/includes/launch/reviewSoftware.jsp index ae5ddbebe..f2f99d8e9 100644 --- a/src/web/WEB-INF/includes/launch/reviewSoftware.jsp +++ b/src/web/WEB-INF/includes/launch/reviewSoftware.jsp @@ -71,10 +71,18 @@ Group(s) : Edit - - Effort Days Estimate : - Edit - + + Effort Estimates :
Offshore (In Person Days)
+ + Edit + + + + Effort Estimates :
Onsite (In Person Days)
+ + Edit + + diff --git a/src/web/css/direct/launchcontest.css b/src/web/css/direct/launchcontest.css index 90ee4fd92..2d387c78b 100644 --- a/src/web/css/direct/launchcontest.css +++ b/src/web/css/direct/launchcontest.css @@ -303,13 +303,17 @@ /** label **/ #launchContestOut .addNewContest label { - width: 125px; - float: left; - display: inline; - margin-left: 14px; - font-family: "Source Sans Pro", Arial, Helvetica, sans-serif; - font-size: 14px; - line-height: 24px; + width: 125px; + float: left; + display: inline; + margin-left: 14px; + font-family: "Source Sans Pro", Arial, Helvetica, sans-serif; + font-size: 14px; + line-height: 24px; +} + +#launchContestOut .addNewContest .effortEstimateRow label { + width: 270px; } #launchContestOut.launchCopilotContest .addNewContest label { @@ -331,6 +335,10 @@ font-size: 12px; } +#launchContestOut .addNewContest .effortEstimateRow .text { + width: 50px; +} + #launchContestOut.launchCopilotContest .addNewContest .text { background: none; width: 370px; @@ -3256,8 +3264,9 @@ div.ms-group-display .ms-group-div{ margin-top: 17px; } -.effortEstimateRow { - height: 50px; +.effortEstimateRow th { + line-height: 15px; + padding: 7px 0 7px 0; } .dropdown-menu { diff --git a/src/web/scripts/launch/contestDetailSoftware.js b/src/web/scripts/launch/contestDetailSoftware.js index cd98eb744..994b3cc57 100644 --- a/src/web/scripts/launch/contestDetailSoftware.js +++ b/src/web/scripts/launch/contestDetailSoftware.js @@ -608,11 +608,6 @@ $(document).ready(function(){ } } }); - $('.effortEstimateRow .helpme').hover(function() { - showPopup(this, 'effortDaysToolTip'); - }, function() { - $('#effortDaysToolTip').hide(); - }); }); var ACTIVE_PROJECT_STATUS = 1; @@ -890,7 +885,8 @@ function initContest(contestJson) { mainWidget.softwareCompetition.regEndDate = parseDate(contestJson.regEndDate); $('#contestTypeNameText').text(getProjectCategoryById(mainWidget.softwareCompetition.projectHeader.projectCategory.id).name); - mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] = contestJson.properties['Effort Hours Estimate']; + mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_OFFSHORE] = contestJson.properties[ESTIMATE_EFFORT_OFFSHORE]; + mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_ONSITE] = contestJson.properties[ESTIMATE_EFFORT_ONSITE]; // copilots var copilots = contestJson.copilots; // get copilots data from result @@ -1437,14 +1433,17 @@ function populateTypeSection() { $(".matchRoundId").show(); } - // 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(); + var effortDaysEstimateOffshore = p[ESTIMATE_EFFORT_OFFSHORE] || ''; + var effortDaysEstimateOnsite = p[ESTIMATE_EFFORT_ONSITE] || ''; + $('#rEffortDaysEstimateOffshore').text(effortDaysEstimateOffshore); + $('#rEffortDaysEstimateOnsite').text(effortDaysEstimateOnsite); + $('input[name=effortDaysEstimateOffshore]').val(effortDaysEstimateOffshore); + $('input[name=effortDaysEstimateOnsite]').val(effortDaysEstimateOnsite); + + if (isNaN(p[ESTIMATE_EFFORT_OFFSHORE]) && isNaN(p[ESTIMATE_EFFORT_ONSITE]) ) { + $('.effortEstimateRow').hide(); } else { - $('#rEffortDaysEstimate').text(''); + $('.effortEstimateRow').show(); } if (mainWidget.softwareCompetition.projectHeader.properties.hasOwnProperty(MM_TYPE)) { diff --git a/src/web/scripts/launch/entity.js b/src/web/scripts/launch/entity.js index 20e5e3c45..aae91c77f 100644 --- a/src/web/scripts/launch/entity.js +++ b/src/web/scripts/launch/entity.js @@ -209,6 +209,8 @@ var PRODUCT_SKU ="Product SKU"; var ENVIRONMENT = "Environment"; var CODE_REPO = "Code Repo"; var MM_TYPE = "Marathon Match Type"; +var ESTIMATE_EFFORT_OFFSHORE = "Estimate Efforts Days Offshore"; +var ESTIMATE_EFFORT_ONSITE = "Estimate Efforts Days Onsite"; var projectCategoryArray = [ {id:32, name:'Application Front-End Design', label:'Application Front-End Design', typeId:3, typeName:'Studio', hasMulti:true, hideInDropdown: false}, diff --git a/src/web/scripts/launch/main.js b/src/web/scripts/launch/main.js index 41bcb2fb6..fde206758 100644 --- a/src/web/scripts/launch/main.js +++ b/src/web/scripts/launch/main.js @@ -1195,11 +1195,13 @@ function saveAsDraftRequest() { } if($(".effortEstimateRow").is(":visible")) { - var effortDaysEstimate = $("input[name=effortDaysEstimate]").val().trim(); - if (effortDaysEstimate.length > 0) effortDaysEstimate *= 24; - mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] = effortDaysEstimate; + var effortDaysEstimateOffshore = $("input[name=effortDaysEstimateOffshore]").val().trim(); + var effortDaysEstimateOnsite = $("input[name=effortDaysEstimateOnsite]").val().trim(); + mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_OFFSHORE] = effortDaysEstimateOffshore; + mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_ONSITE] = effortDaysEstimateOnsite; } else { - mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] = ''; + mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_OFFSHORE] = ''; + mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_ONSITE] = ''; } /* @@ -3472,15 +3474,18 @@ function validateFileTypes(errors) { * @param errors array of errors */ 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"); - } + if (jQuery_1_11_1('.effortEstimateRow:visible').length > 0) { + var effortOffshore = $("input[name=effortDaysEstimateOffshore]").val(); + var effortOnsite = $("input[name=effortDaysEstimateOnsite]").val(); + if (isNotEmpty(effortOffshore) && !checkNumber(effortOffshore) && !(effortOffshore > 0)) { + errors.push("The estimate effort offshore should be a positive number"); + } + if (isNotEmpty(effortOnsite) && !checkNumber(effortOnsite) && !(effortOnsite > 0)) { + errors.push("The estimate effort onsite should be a positive number"); + } + if (isEmpty(effortOffshore) && isEmpty(effortOnsite)) { + errors.push("The estimate effort for offshore and/or onsite is required"); + } } } diff --git a/src/web/scripts/launch/pages/orderReview.js b/src/web/scripts/launch/pages/orderReview.js index 5aacdfc79..03ecd4f28 100644 --- a/src/web/scripts/launch/pages/orderReview.js +++ b/src/web/scripts/launch/pages/orderReview.js @@ -70,11 +70,8 @@ function updateOrderReviewAlgorithm() { $('#alorProject').html($("#projects option[value="+ mainWidget.softwareCompetition.projectHeader.tcDirectProjectId +"]").text()); $('#alorBillingAccount').html((billingProjectId == -1)?"(not selected)":$("#billingProjects option[value="+ billingProjectId +"]").text()); - if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) { - $('#alorEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24 ); - } else { - $('#alorEffortDaysEstimate').html(""); - } + $('#alorEffortDaysEstimateOffshore').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_OFFSHORE]); + $('#alorEffortDaysEstimateOnsite').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_ONSITE]); $('#alorStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate)); //points @@ -146,11 +143,8 @@ 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()); - if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) { - $('#sworEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24); - } else { - $('#sworEffortDaysEstimate').html(""); - } + $('#sworEffortDaysEstimateOffshore').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_OFFSHORE]); + $('#sworEffortDaysEstimateOnsite').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_ONSITE]); $('#sworStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate)); //points @@ -302,11 +296,8 @@ function updateOrderReviewStudio() { $('#orBillingAccount').html((billingProjectId == -1)?"(not selected)":$("#billingProjects option[value="+ billingProjectId +"]").text()); - if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) { - $('#orEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24 ); - } else { - $('#orEffortDaysEstimate').html(""); - } + $('#orEffortDaysEstimateOffshore').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_OFFSHORE]); + $('#orEffortDaysEstimateOnsite').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_ONSITE]); $('#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 9591990e6..b4ddd1a18 100644 --- a/src/web/scripts/launch/pages/review.js +++ b/src/web/scripts/launch/pages/review.js @@ -43,11 +43,8 @@ function updateReviewAlgorithm() { var billingProjectId = mainWidget.softwareCompetition.projectHeader.getBillingProject(); $('#ralBillingAccount').html((billingProjectId == -1)?" ":$("#billingProjects option[value="+ billingProjectId +"]").text()); - if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) { - $('#ralEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24); - } else { - $('#ralEffortDaysEstimate').html(""); - } + $('#ralEffortDaysEstimateOffshore').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_OFFSHORE]); + $('#ralEffortDaysEstimateOnsite').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_ONSITE]); $('#ralStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate)); // to do @@ -93,11 +90,10 @@ function updateReviewSoftware() { var billingProjectId = mainWidget.softwareCompetition.projectHeader.getBillingProject(); $('#rswBillingAccount').html((billingProjectId == -1)?" ":$("#billingProjects option[value="+ billingProjectId +"]").text()); - if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) { - $('#rswEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24); - } else { - $('#rswEffortDaysEstimate').html(""); - } + + $('#rswEffortDaysEstimateOffshore').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_OFFSHORE]); + $('#rswEffortDaysEstimateOnsite').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_ONSITE]); + $('#rswStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate)); $('#rswDetailedRequirements').html(mainWidget.softwareCompetition.projectHeader.projectSpec.detailedRequirements); @@ -254,11 +250,8 @@ function updateReviewStudio() { } else { $("#reviewPage .maxSubmissions").show(); } - if (mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'].toString().length > 0) { - $('#rEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] / 24); - } else { - $('#rEffortDaysEstimate').html(""); - } + $('#rEffortDaysEstimateOffshore').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_OFFSHORE]); + $('#rEffortDaysEstimateOnsite').html(mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_ONSITE]); } /** diff --git a/src/web/scripts/launch/pages/selection.js b/src/web/scripts/launch/pages/selection.js index e7881b096..a256f79af 100644 --- a/src/web/scripts/launch/pages/selection.js +++ b/src/web/scripts/launch/pages/selection.js @@ -120,7 +120,12 @@ function initCompetitionSelectionCommonData() { var tcProjectId = parseInt($('select#projects').val()); var billingProjectId = parseInt($('select#billingProjects').val()); var isMultiRound = hasMultiRound(categoryId) && ('multi' == $('#roundTypes').val()); - var effortDaysEstimate = $('input#effortDaysEstimate').val().trim(); + var effortDaysEstimateOffshore = ''; + var effortDaysEstimateOnsite = ''; + if (jQuery_1_11_1('.effortEstimateRow:visible').length > 0) { + effortDaysEstimateOffshore = $('input#effortDaysEstimateOffshore').val().trim(); + effortDaysEstimateOnsite = $('input#effortDaysEstimateOnsite').val().trim(); + } // apply category id data var projectCategory = getProjectCategoryById(categoryId); @@ -143,9 +148,9 @@ function initCompetitionSelectionCommonData() { mainWidget.softwareCompetition.projectHeader.setProjectName(contestName); mainWidget.softwareCompetition.multiRound = isMultiRound; - // change to hours - if (effortDaysEstimate.length > 0) effortDaysEstimate *= 24; - mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate'] = effortDaysEstimate; + + mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_OFFSHORE] = effortDaysEstimateOffshore; + mainWidget.softwareCompetition.projectHeader.properties[ESTIMATE_EFFORT_ONSITE] = effortDaysEstimateOnsite } function validateFieldsContestSelectionAlgorithm() { diff --git a/src/web/scripts/launchcontest.js b/src/web/scripts/launchcontest.js index e63914c27..e44aa05f6 100644 --- a/src/web/scripts/launchcontest.js +++ b/src/web/scripts/launchcontest.js @@ -384,12 +384,6 @@ $(document).ready(function() { $('#enforceCCAToolTip').hide(); }); - $('.ms-row.effortEstimateRow .helpme').hover(function() { - showPopup(this, 'effortDaysToolTip'); - }, function() { - $('#effortDaysToolTip').hide(); - }); - $('#assembly_bug_hunt .helpme').hover(function () { showPopup(this, 'bugHuntForAssemblyToolTip'); }, function () {