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

Commit e27b64f

Browse files
authored
Merge pull request #436 from deedee/effort-days
fix frontend issue related to effort days
2 parents f2e92af + cc68230 commit e27b64f

File tree

12 files changed

+46
-44
lines changed

12 files changed

+46
-44
lines changed

src/web/WEB-INF/contest-details2.jsp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
billingAccounts.push({"id": "<s:property value="id" />",
136136
"name" : "<s:property value="name" />",
137137
"cca" : "<s:property value="cca" />",
138-
"enableEffortHours" : "<s:property value="enableEffortHours" />"
138+
"enableEffortDays" : "<s:property value="enableEffortDays" />"
139139
});
140140
</s:iterator>
141141
</script>
@@ -172,7 +172,7 @@
172172
</div>
173173
<!-- End #wrapper -->
174174
<div class="tooltipArea">
175-
<div id="effortHourToolTip" class="tooltipContainer">
175+
<div id="effortDaysToolTip" class="tooltipContainer">
176176
<span class="arrow"></span>
177177
<div class="tooltipLeft"><div class="tooltipRight"><div class="tooltipBottom">
178178
<div class="tooltipBottomLeft"><div class="tooltipBottomRight">
@@ -187,7 +187,7 @@
187187
</div><!-- End .tooltipCaption -->
188188

189189
<div class="tooltipContent">
190-
<p>in Equated <strong>offshore hours = onsite hours * 6 + offshore hours</strong></p>
190+
<p>Effort Days Estimate</p>
191191
</div><!-- End .tooltipContent -->
192192

193193
</div></div>

src/web/WEB-INF/includes/contest/editTab.jsp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,14 @@
348348
<br/><br/>
349349
<span class="name fixWidthName"><strong>Created By</strong></span>
350350
<span class ='small_info_spec' id="challegneCreatorLabel"></span>
351+
<div>
352+
<p class="save">
353+
<a href="javascript:;" class="cancel_text">cancel</a>
354+
<a href="javascript:;"><img src="/images/save_change.png" alt="save" class="save_btn" /></a>
355+
</p>
356+
</div>
351357
</div>
352358
</div>
353-
<p class="save">
354-
<a href="javascript:;" class="cancel_text">cancel</a>
355-
<a href="javascript:;"><img src="/images/save_change.png" alt="save" class="save_btn" /></a>
356-
</p>
357359
<div class="clear"></div>
358360
</div><!-- End .detailsContent -->
359361
</div><!-- End .details -->

src/web/WEB-INF/includes/contest/editTabMarathon.jsp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
<tr></tr>
137137
<tr class="effortEstimateRow hide">
138138
<td class="first_tab_type"><strong>Effort Hours Estimate</strong></td>
139-
<td class="sec_tab_type"><strong>: <span id="rEffortHoursEstimate"></span></strong></td>
139+
<td class="sec_tab_type"><strong>: <span id="rEffortDaysEstimate"></span></strong></td>
140140
</tr>
141141
<tr></tr>
142142
<tr>
@@ -295,8 +295,8 @@
295295
</div>
296296
<br /><br />
297297
<div class="effortEstimateRow">
298-
<span class="name fixWidthName" title="Enter effort hours estimate"><strong>Estimated Effort:&nbsp;</strong><a href="javascript:;" class="helpme"><img src="/images/help_ico5.gif" alt="help"/></a></span>
299-
<input id="effortHoursEstimate" class="bigin" name="effortHoursEstimate" type="text" value="" />
298+
<span class="name fixWidthName" title="Enter effort days estimate"><strong>Estimated Effort:&nbsp;</strong><a href="javascript:;" class="helpme"><img src="/images/help_ico5.gif" alt="help"/></a></span>
299+
<input id="effortDaysEstimate" class="bigin" name="effortDaysEstimate" type="text" value="" />
300300
</div>
301301
<br/><br/>
302302
<span class="name fixWidthName"><strong>Created By</strong></span>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</tr>
6262
<tr class="effortEstimateRow">
6363
<th>Effort Days Estimate :</th>
64-
<td><span id="sworEffortHoursEstimate"></span><a href="javascript:showPage('contestSelectionPage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
64+
<td><span id="sworEffortDaysEstimate"></span><a href="javascript:showPage('contestSelectionPage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
6565
</tr>
6666
</table>
6767
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
</tr>
7474
<tr class="effortEstimateRow">
7575
<th>Effort Days Estimate :</th>
76-
<td><span id="rswEffortDayssEstimate"></span><a href="javascript:showPage('contestSelectionPage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
76+
<td><span id="rswEffortDaysEstimate"></span><a href="javascript:showPage('contestSelectionPage');" class="tipLink"><img src="/images/edit-icon.png" alt="Edit"/></a></td>
7777
</tr>
7878
</table>
7979
</div>

src/web/WEB-INF/launch-contest.jsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
<!-- End .tooltipContainer -->
153153
</div>
154154
<div class="tooltipArea">
155-
<div id="effortHourToolTip" class="tooltipContainer">
155+
<div id="effortDaysToolTip" class="tooltipContainer">
156156
<span class="arrow"></span>
157157
<div class="tooltipLeft"><div class="tooltipRight"><div class="tooltipBottom">
158158
<div class="tooltipBottomLeft"><div class="tooltipBottomRight">
@@ -167,7 +167,7 @@
167167
</div><!-- End .tooltipCaption -->
168168

169169
<div class="tooltipContent">
170-
<p>in Equated <strong>offshore hours = onsite hours * 6 + offshore hours</strong></p>
170+
<p>Effort Days Estimate</strong></p>
171171
</div><!-- End .tooltipContent -->
172172

173173
</div></div>

src/web/css/direct/launchcontest.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,7 @@ a.draft:hover span.right, a.preview:hover span.right {
17901790
}
17911791

17921792
.overviewData th {
1793-
width: 110px;
1793+
width: 130px;
17941794
font-weight: 400;
17951795
text-align: right;
17961796
}

src/web/scripts/launch/contestDetailSoftware.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ $(document).ready(function(){
188188

189189
$.each(billingAccounts, function(key, value) {
190190
var _cca = value["cca"] == "true" ? true : false;
191-
var _enableEffortHours = value["enableEffortHours"] == "true" ? true : false;
192-
$("#billingProjects").append($('<option></option>').val(value["id"]).html(value["name"]).data("cca", _cca).data("enableEffortHours", _enableEffortHours));
191+
var _enableEffortDays = value["enableEffortDays"] == "true" ? true : false;
192+
$("#billingProjects").append($('<option></option>').val(value["id"]).html(value["name"]).data("cca", _cca).data("enableEffortDays", _enableEffortDays));
193193
});
194194
/* Optgroup 2 columns fix */
195195
if($('.selectDesing optgroup, .selectDesign .newListOptionTitle').length > 0){
@@ -568,7 +568,7 @@ $(document).ready(function(){
568568
$("#chkboxCCA").removeAttr('disabled');
569569
}
570570

571-
if($(this).find(":selected").data("enableEffortHours")) {
571+
if($(this).find(":selected").data("enableEffortDays")) {
572572
$('.effortEstimateRow').show();
573573
} else {
574574
$('.effortEstimateRow').hide();
@@ -609,9 +609,9 @@ $(document).ready(function(){
609609
}
610610
});
611611
$('.effortEstimateRow .helpme').hover(function() {
612-
showPopup(this, 'effortHourToolTip');
612+
showPopup(this, 'effortDaysToolTip');
613613
}, function() {
614-
$('#effortHourToolTip').hide();
614+
$('#effortDaysToolTip').hide();
615615
});
616616
});
617617

@@ -890,7 +890,7 @@ function initContest(contestJson) {
890890
mainWidget.softwareCompetition.regEndDate = parseDate(contestJson.regEndDate);
891891

892892
$('#contestTypeNameText').text(getProjectCategoryById(mainWidget.softwareCompetition.projectHeader.projectCategory.id).name);
893-
mainWidget.softwareCompetition.projectHeader.properties['Effort Days Estimate'] = contestJson.properties['Effort Hours Estimate'];
893+
mainWidget.softwareCompetition.projectHeader.properties['Effort Days Estimate'] = contestJson.properties['Effort Days Estimate'];
894894

895895
// copilots
896896
var copilots = contestJson.copilots; // get copilots data from result
@@ -1438,9 +1438,9 @@ function populateTypeSection() {
14381438
}
14391439

14401440
var effortDaysEstimate = parseFloat(p['Effort Days Estimate']);
1441-
if (!isNaN(effortDaysEstimate) && effortDayssEstimate > 0 ) {
1441+
if (!isNaN(effortDaysEstimate) && effortDaysEstimate > 0 ) {
14421442
$('#rEffortDaysEstimate').text(parseFloat(effortDaysEstimate));
1443-
$('input[name=effortDayssEstimate]').val(effortDaysEstimate);
1443+
$('input[name=effortDaysEstimate]').val(effortDaysEstimate);
14441444
$('.effortEstimateRow').show();
14451445
} else {
14461446
$('#rEffortDaysEstimate').text('');
@@ -1585,7 +1585,7 @@ function validateFieldsTypeSection() {
15851585
}
15861586

15871587
// validate effort hours estimate
1588-
validateEffortHoursEstimate(errors);
1588+
validateEffortDaysEstimate(errors);
15891589

15901590
// do NOT need milestone for First2Finish and CODE contest
15911591
if (categoryId != SOFTWARE_CATEGORY_ID_F2F
@@ -1673,12 +1673,12 @@ function showTypeSectionEdit() {
16731673

16741674
$.each(billingAccounts,function(k, v) {
16751675
var _cca = v["cca"] == "true" ? true : false;
1676-
var _enableEffortHours = v["enableEffortHours"] == "true" ? true : false;
1676+
var _enableEffortDays = v["enableEffortDays"] == "true" ? true : false;
16771677
if (v["id"] == mainWidget.softwareCompetition.projectHeader.getBillingProject()) {
16781678
if (_cca) {
16791679
$("#chkboxCCA").attr('disabled','true');
16801680
}
1681-
if(_enableEffortHours) {
1681+
if(_enableEffortDays) {
16821682
$(".effortEstimateRow").show();
16831683
}
16841684
}
@@ -2853,7 +2853,7 @@ function showPrizeSectionEdit() {
28532853
$("#chkboxCCA").removeAttr('disabled');
28542854
}
28552855

2856-
if($(this).find(":selected").data("enableEffortHours")) {
2856+
if($(this).find(":selected").data("enableEffortDays")) {
28572857
$('.effortEstimateRow').show();
28582858
} else {
28592859
$('.effortEstimateRow').hide();
@@ -3633,8 +3633,8 @@ function handleProjectDropDownChange() {
36333633

36343634
$.each(billingAccounts, function(key, value) {
36353635
var _cca = value["cca"] == "true" ? true : false;
3636-
var _enableEffortHours = value["enableEffortHours"] == "true" ? true : false;
3637-
$("#billingProjects").append($('<option></option>').val(value["id"]).text(value["name"]).data("cca", _cca).data("enableEffortHours", _enableEffortHours));
3636+
var _enableEffortDays = value["enableEffortDays"] == "true" ? true : false;
3637+
$("#billingProjects").append($('<option></option>').val(value["id"]).text(value["name"]).data("cca", _cca).data("enableEffortDays", _enableEffortDays));
36383638
});
36393639
$("#chkboxCCA").removeAttr('checked');
36403640
$("#chkboxCCA").removeAttr('disabled');
@@ -3658,7 +3658,7 @@ function handleProjectDropDownChange() {
36583658
$("#chkboxCCA").removeAttr('disabled');
36593659
}
36603660

3661-
if($(this).find(":selected").data("enableEffortHours")) {
3661+
if($(this).find(":selected").data("enableEffortDays")) {
36623662
$('.effortEstimateRow').show();
36633663
} else {
36643664
$('.effortEstimateRow').hide();

src/web/scripts/launch/pages/orderReview.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function updateOrderReviewSoftware() {
144144
$('#sworContestName').html(mainWidget.softwareCompetition.assetDTO.name);
145145
$('#sworProjectName').html($("#projects option[value="+ mainWidget.softwareCompetition.projectHeader.tcDirectProjectId +"]").text());
146146
$('#sworBillingAccount').html($("#billingProjects option[value="+ billingProjectId +"]").text());
147-
$('#sworEffortHoursEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate']);
147+
$('#sworEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Days Estimate']);
148148
$('#sworStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate));
149149

150150
//points
@@ -296,7 +296,7 @@ function updateOrderReviewStudio() {
296296

297297
$('#orBillingAccount').html((billingProjectId == -1)?"(not selected)":$("#billingProjects option[value="+ billingProjectId +"]").text());
298298

299-
$('#orEffortHoursEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate']);
299+
$('#orEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Days Estimate']);
300300

301301
$('#orStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate));
302302

src/web/scripts/launch/pages/review.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function updateReviewAlgorithm() {
4343

4444
var billingProjectId = mainWidget.softwareCompetition.projectHeader.getBillingProject();
4545
$('#ralBillingAccount').html((billingProjectId == -1)?"&nbsp;":$("#billingProjects option[value="+ billingProjectId +"]").text());
46-
$('#ralEffortHoursEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Days Estimate']);
46+
$('#ralEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Days Estimate']);
4747
$('#ralStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate));
4848

4949
// to do
@@ -90,7 +90,7 @@ function updateReviewSoftware() {
9090
var billingProjectId = mainWidget.softwareCompetition.projectHeader.getBillingProject();
9191
$('#rswBillingAccount').html((billingProjectId == -1)?"&nbsp;":$("#billingProjects option[value="+ billingProjectId +"]").text());
9292

93-
$('#rswEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Hours Estimate']);
93+
$('#rswEffortDaysEstimate').html(mainWidget.softwareCompetition.projectHeader.properties['Effort Days Estimate']);
9494

9595
$('#rswStartDate').html(formatDateForReview(mainWidget.softwareCompetition.assetDTO.directjsProductionDate));
9696

src/web/scripts/launch/pages/selection.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function initCompetitionSelectionCommonData() {
120120
var tcProjectId = parseInt($('select#projects').val());
121121
var billingProjectId = parseInt($('select#billingProjects').val());
122122
var isMultiRound = hasMultiRound(categoryId) && ('multi' == $('#roundTypes').val());
123-
var effortHoursEstimate = $('input#effortHoursEstimate').val();
123+
var effortDaysEstimate = $('input#effortDaysEstimate').val();
124124

125125
// apply category id data
126126
var projectCategory = getProjectCategoryById(categoryId);
@@ -143,7 +143,7 @@ function initCompetitionSelectionCommonData() {
143143
mainWidget.softwareCompetition.projectHeader.setProjectName(contestName);
144144

145145
mainWidget.softwareCompetition.multiRound = isMultiRound;
146-
mainWidget.softwareCompetition.projectHeader.properties['Effort Days Estimate'] = effortHoursEstimate;
146+
mainWidget.softwareCompetition.projectHeader.properties['Effort Days Estimate'] = effortDaysEstimate;
147147
}
148148

149149
function validateFieldsContestSelectionAlgorithm() {
@@ -171,7 +171,7 @@ function validateFieldsContestSelectionAlgorithm() {
171171
errors.push('Marathon match type is required');
172172
}
173173

174-
validateEffortHoursEstimate(errors);
174+
validateEffortDaysEstimate(errors);
175175

176176
// validate schedule
177177
if(startDate >= regEndDate) {
@@ -264,7 +264,7 @@ function validateFieldsContestSelectionSoftware() {
264264
}
265265
}
266266

267-
validateEffortHoursEstimate(errors);
267+
validateEffortDaysEstimate(errors);
268268

269269
if (regEndDate.getTime() <= startDate.getTime()) {
270270
errors.push('Registration end date/time should be larger than Start date/time.');
@@ -413,7 +413,7 @@ function validateFieldsContestSelectionStudio() {
413413
validateDirectProjectMilestone(projectMilestoneId, errors);
414414
}
415415

416-
validateEffortHoursEstimate(errors);
416+
validateEffortDaysEstimate(errors);
417417

418418
if(isMultiRound) {
419419
if (checkpointDateHours == 0) {

src/web/scripts/launchcontest.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ $(document).ready(function() {
385385
});
386386

387387
$('.ms-row.effortEstimateRow .helpme').hover(function() {
388-
showPopup(this, 'effortHourToolTip');
388+
showPopup(this, 'effortDaysToolTip');
389389
}, function() {
390-
$('#effortHourToolTip').hide();
390+
$('#effortDaysToolTip').hide();
391391
});
392392

393393
$('#assembly_bug_hunt .helpme').hover(function () {
@@ -659,7 +659,7 @@ function handleProjectDropDownChange() {
659659

660660
$.each(billingAccounts, function(key, value) {
661661

662-
$("#billingProjects").append($('<option></option>').val(value["id"]).html(value["name"]).data("cca", (value["cca"] == "true" ? true : false)).data("enableEffortHours", value["enableEffortHours"]));
662+
$("#billingProjects").append($('<option></option>').val(value["id"]).html(value["name"]).data("cca", (value["cca"] == "true" ? true : false)).data("enableEffortDays", value["enableEffortDays"]));
663663

664664
if(value["id"] == $("input[name=CMCBillingID]").val()) {
665665
CMCBillingExisting = true;
@@ -670,7 +670,7 @@ function handleProjectDropDownChange() {
670670
$("#billingProjects").val(0);
671671

672672
if(hasCMCBilling && !CMCBillingExisting) {
673-
$("#billingProjects").append($('<option></option>').val($("input[name=CMCBillingID]").val()).html($("input[name=CMCBillingName]").val()).data("cca", false).data("enableEffortHours", value["enableEffortHours"]));
673+
$("#billingProjects").append($('<option></option>').val($("input[name=CMCBillingID]").val()).html($("input[name=CMCBillingName]").val()).data("cca", false).data("enableEffortDays", value["enableEffortDays"]));
674674
}
675675

676676
$("#billingProjects").resetSS();
@@ -683,7 +683,7 @@ function handleProjectDropDownChange() {
683683
$("#lccCheckBox").removeAttr('disabled');
684684
}
685685

686-
if($(this).find(":selected").data("enableEffortHours")) {
686+
if($(this).find(":selected").data("enableEffortDays")) {
687687
$('.effortEstimateRow').show();
688688
} else {
689689
$('.effortEstimateRow').hide();

0 commit comments

Comments
 (0)