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

Commit e12dee0

Browse files
committed
fix: pagination after click checkbox
1 parent 99afd11 commit e12dee0

File tree

1 file changed

+20
-33
lines changed

1 file changed

+20
-33
lines changed

src/main/com/topcoder/web/tc/view/pacts/client/PaymentHistory.jsp

Lines changed: 20 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
-
66
- Description: This page displays the payments for current user.
77
-
8-
- Version 1.1 (Member Payments Automation assembly) changes:
8+
- Version 1.1 (Member Payments Automation assembly) changes:
99
- added logic for displaying payment's release date.
1010
- added controls for data pagination parameters setting.
1111
- fixed a bug with passing sr, er parameters when sorting the paginated data.
@@ -80,7 +80,7 @@
8080
USER_PAYMENT_METHOD = ${userPaymentMethod eq null ? 'null' : userPaymentMethod};
8181
MINIMUM_PAYMENT_ACCRUAL_AMOUNT = ${MINIMUM_PAYMENT_ACCRUAL_AMOUNT};
8282
PAY_ME_CONFIRMATION_TEMPLATE = '${paymentConfirmationTemplate}';
83-
83+
8484
function next() {
8585
var myForm = document.f;
8686
myForm.<%=DataAccessConstants.START_RANK%>.value = ${requestScope[defaults][startRank]} + parseInt(myForm.<%=DataAccessConstants.NUMBER_RECORDS%>.value);
@@ -138,19 +138,6 @@
138138
var paymentId = this.getAttribute('data-value');
139139
$('.payable[value="' + paymentId + '"]').click();
140140
});
141-
142-
$('.payable').click(function() {
143-
var hasSelected = false;
144-
$('.payable:checked').each(function () {
145-
hasSelected = true;
146-
});
147-
148-
if (hasSelected) {
149-
$('.table-pagination').addClass('hiddenOnSelected');
150-
} else {
151-
$('.table-pagination').removeClass('hiddenOnSelected');
152-
}
153-
});
154141
});
155142
}
156143
</script>
@@ -309,7 +296,7 @@
309296
<c:when test="${not empty payments}">
310297
<form name="f" action="${sessionInfo.servletPath}" method="get" onsubmit="return checkPaymentHistoryForm();" class="form-container"
311298
id="PaymentHistoryForm">
312-
299+
313300
<c:if test="${!isReskin}">
314301
<c:if test="${croppedDataBefore or croppedDataAfter}" >
315302
<div class="pagingBox">
@@ -321,7 +308,7 @@
321308
&lt;&lt; prev
322309
</c:otherwise>
323310
</c:choose>
324-
311+
325312
<c:choose>
326313
<c:when test="${croppedDataAfter}">
327314
<a href="Javascript:next()" class="bcLink getable">next &gt;&gt;</a>
@@ -378,9 +365,9 @@
378365
</td>
379366
<td class="header">&nbsp;</td>
380367
</tr>
381-
368+
382369
<c:forEach items="${payments}" var="payment">
383-
370+
384371
<c:set var="typeId" value="${payment.paymentType}" />
385372
<tr class="<%=even?"light":"dark"%> ${(payment.currentStatus.id eq OWED or payment.currentStatus.id eq ACCRUING) ? 'highlight' : '' }">
386373
<td class="value description">
@@ -397,34 +384,34 @@
397384
<c:when test="${payment.installmentNumber == 3}">(${payment.installmentNumber}rd</c:when>
398385
<c:otherwise>(${payment.installmentNumber}th</c:otherwise>
399386
</c:choose>
400-
installment, total amount=${payment.totalAmount})
387+
installment, total amount=${payment.totalAmount})
401388
</c:if>
402-
</A>
389+
</A>
403390
</c:when>
404391
<c:when test="${(typeId == 17 || typeId == 25) && payment.stageId > 0}">
405-
<A href="/tc?module=LeaderBoard&ph=112&staid=${payment.stageId}" class="bcLink">${payment.description}</A>
392+
<A href="/tc?module=LeaderBoard&ph=112&staid=${payment.stageId}" class="bcLink">${payment.description}</A>
406393
</c:when>
407394
<c:when test="${typeId == 18 && payment.seasonId > 0}">
408-
<A href="/tc?module=RookieBoard&ph=112&seid=${payment.seasonId}" class="bcLink">${payment.description}</A>
395+
<A href="/tc?module=RookieBoard&ph=112&seid=${payment.seasonId}" class="bcLink">${payment.description}</A>
409396
</c:when>
410397
<c:when test="${(typeId == 40 || typeId == 41) && payment.trackId > 0}">
411-
<A href="/dr?module=ViewLeaderBoard&tid=${payment.trackId}" class="bcLink">${payment.description}</A>
398+
<A href="/dr?module=ViewLeaderBoard&tid=${payment.trackId}" class="bcLink">${payment.description}</A>
412399
</c:when>
413400
<c:when test="${typeId == 21 && payment.roundId > 0}">
414-
<A href="/longcontest/?module=ViewOverview&rd=${payment.roundId}>" class="bcLink">${payment.description}</A>
415-
</c:when>
401+
<A href="/longcontest/?module=ViewOverview&rd=${payment.roundId}>" class="bcLink">${payment.description}</A>
402+
</c:when>
416403
<c:otherwise>
417404
${payment.description}
418405
</c:otherwise>
419406
</c:choose>
420-
421-
407+
408+
422409
</td>
423410
<td class="value type">${payment.paymentTypeDesc}</td>
424411
<td class="valueC create-date"><fmt:formatDate value="${payment.createDate}" pattern="dd/MM/yyyy"/></td>
425412
<td class="valueR net-payment"><fmt:formatNumber value="${payment.netAmount}" type="currency" currencySymbol="$"/></td>
426413
<td class="value status"><span class="status ${payment.currentStatus.desc}"><span class="status-label">${payment.currentStatus.desc}</span></span>
427-
<c:forEach items="${payment.currentStatus.reasons}" var="reason">
414+
<c:forEach items="${payment.currentStatus.reasons}" var="reason">
428415
<br>- ${reason.desc}
429416
</c:forEach>
430417
</td>
@@ -628,13 +615,13 @@
628615
<div align="right" class="pay-me-btn">
629616
<input type="button" value="Pay Me" id="payMe" disabled="disabled"/>
630617
<span class="payMeValue">Total: <span id="payMeValue"></span></span>
631-
</div>
632-
618+
</div>
619+
633620
<tc-webtag:hiddenInput name="<%=Constants.MODULE_KEY%>" value="PaymentHistory"/>
634621
<tc-webtag:hiddenInput name="<%=DataAccessConstants.SORT_COLUMN%>"/>
635622
<tc-webtag:hiddenInput name="<%=DataAccessConstants.SORT_DIRECTION%>"/>
636623
<input type="hidden" name="<%= PaymentHistory.FULL_LIST %>" value="<c:out value="${fullList}"/>" />
637-
624+
638625
<div class="pagingBox table-pagination ${croppedDataBefore ? 'croppedDataBefore' : ''} ${croppedDataAfter ? 'croppedDataAfter' : ''} ${numTotal > 10 ? 'more-than-10-items' : ''}">
639626
<c:if test="${croppedDataBefore or croppedDataAfter}">
640627
<c:choose>
@@ -719,7 +706,7 @@
719706
</div><!-- // end .table-footer -->
720707
</c:if>
721708

722-
</form>
709+
</form>
723710
</c:when>
724711
<c:otherwise>
725712
<div align="center" class="no-payments-found">

0 commit comments

Comments
 (0)