Skip to content

Commit 0a74f48

Browse files
authored
Merge pull request #246 from topcoder-platform/dev-maven
dev-maven to master-maven
2 parents 9020cf9 + 5c21aa1 commit 0a74f48

18 files changed

+269
-139
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ workflows:
175175
branches:
176176
only:
177177
- dev-maven
178+
- reskin-or
178179

179180
- build-prod:
180181
context : org-global
@@ -190,6 +191,7 @@ workflows:
190191
branches:
191192
only:
192193
- dev-maven
194+
- reskin-or
193195

194196
- deployProd:
195197
context : org-global

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@
179179
<artifactId>log4j-core</artifactId>
180180
<version>2.17.2</version>
181181
</dependency>
182+
<dependency>
183+
<groupId>org.apache.commons</groupId>
184+
<artifactId>commons-text</artifactId>
185+
<version>1.10.0</version>
186+
</dependency>
182187
<dependency>
183188
<groupId>redis.clients</groupId>
184189
<artifactId>jedis</artifactId>

src/main/java/com/cronos/onlinereview/functions/Functions.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.topcoder.onlinereview.component.resource.Resource;
1313
import com.topcoder.onlinereview.component.resource.ResourceManager;
1414
import com.topcoder.onlinereview.component.resource.ResourcePersistenceException;
15+
import org.apache.commons.text.StringEscapeUtils;
1516
import org.apache.struts2.util.TextProviderHelper;
1617

1718
import javax.servlet.http.HttpServletRequest;
@@ -61,6 +62,9 @@ private Functions() {
6162
* a text to encode.
6263
*/
6364
public static String htmlEncode(String text) {
65+
// unescape string (convert strings like \\n to \n character),
66+
// so we can find and replace it with corresponding string like <br />
67+
text = StringEscapeUtils.unescapeJava(text);
6468
if (text == null || text.length() == 0) {
6569
return "";
6670
}
@@ -100,8 +104,8 @@ public static String htmlEncode(String text) {
100104
stringBuffer.append(ch);
101105
}
102106
}
103-
104-
return stringBuffer.toString();
107+
// make sure we escape the unescaped string before returning it
108+
return StringEscapeUtils.escapeJava(stringBuffer.toString());
105109
}
106110

107111
/**

web/css/or/new_styles.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,3 +551,12 @@ table.tabLinks .input {
551551
.feedback-text {
552552
width:100%;
553553
}
554+
555+
.projectInfo__forumLink{
556+
pointer-events: none;
557+
cursor: pointer;
558+
}
559+
560+
.projectInfo__forumLink.enabled{
561+
pointer-events: all;
562+
}

web/css/reskin-or/reskin.css

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ body {
192192
padding-bottom: 200px;
193193
}
194194

195+
.content--viewSpec,
196+
.content--viewApproval,
195197
.content--projectPayment {
196198
padding-bottom: 135px;
197199
}
@@ -768,6 +770,10 @@ table.scorecard td.headerT {
768770
text-decoration: none !important;
769771
}
770772

773+
.backToHome {
774+
margin-bottom: 32px;
775+
}
776+
771777
.editPaymentBtn {
772778
margin-right: 12px;
773779
}
@@ -825,8 +831,8 @@ table.scorecard td.reviewerResp input {
825831
.cta {
826832
position: fixed;
827833
width: 100%;
828-
bottom: var(--footer-height);
829834
background-color: #fff;
835+
bottom: var(--footer-height);
830836
z-index: 99;
831837
box-shadow: 0 0 16px 16px rgb(42 42 42 / 10%);
832838
}
@@ -2654,6 +2660,7 @@ td.resourcesTable__empty {
26542660
width: 100%;
26552661
z-index: 99;
26562662
bottom: 0;
2663+
left: 0;
26572664
}
26582665

26592666
.checkPoint__chevron {
@@ -2752,7 +2759,7 @@ td.resourcesTable__empty {
27522759
}
27532760

27542761
.ctaOpen {
2755-
bottom: 386px;
2762+
bottom: 386px !important;
27562763
}
27572764
.approvalRadioBtn {
27582765
display: flex;
@@ -2764,6 +2771,7 @@ td.resourcesTable__empty {
27642771
.lateDeliverableValue {
27652772
margin-top: 8px;
27662773
font-weight: 400;
2774+
white-space: normal;
27672775
}
27682776

27692777
.lateDeliverableProjectLink {

web/jsp/confirmAdvanceFailedScreeningSubmission.jsp

Lines changed: 45 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -13,83 +13,70 @@
1313
<%@ taglib prefix="or" uri="/or-tags" %>
1414
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
1515
<html>
16+
<head>
17+
<jsp:include page="/includes/project/project_title.jsp">
18+
<jsp:param name="thirdLevelPageKey" value="confirmAdvanceFailedScreeningSubmission.title" />
19+
</jsp:include>
20+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
1621

17-
<head>
18-
<jsp:include page="/includes/project/project_title.jsp">
19-
<jsp:param name="thirdLevelPageKey" value="confirmAdvanceFailedScreeningSubmission.title" />
20-
</jsp:include>
21-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
22+
<!-- Reskin -->
23+
<link type="text/css" rel="stylesheet" href="/css/reskin-or/reskin.css">
24+
<link type="text/css" rel="stylesheet" href="/css/reskin-or/toasts.css">
2225

23-
<!-- TopCoder CSS -->
24-
<link type="text/css" rel="stylesheet" href="/css/style.css" />
25-
<link type="text/css" rel="stylesheet" href="/css/coders.css" />
26-
<link type="text/css" rel="stylesheet" href="/css/stats.css" />
27-
<link type="text/css" rel="stylesheet" href="/css/tcStyles.css" />
26+
<!-- TopCoder CSS -->
27+
<link type="text/css" rel="stylesheet" href="/css/style.css" />
28+
<link type="text/css" rel="stylesheet" href="/css/coders.css" />
2829

29-
<!-- CSS and JS by Petar -->
30-
<link type="text/css" rel="stylesheet" href="/css/or/new_styles.css" />
31-
<script language="JavaScript" type="text/javascript"
32-
src="/js/or/rollovers2.js"><!-- @ --></script>
33-
</head>
30+
<!-- CSS and JS by Petar -->
31+
<script language="JavaScript" type="text/javascript"
32+
src="/js/or/rollovers2.js"><!-- @ --></script>
33+
<script type="text/javascript">
34+
document.addEventListener("DOMContentLoaded", function(){
35+
let avatar = document.querySelector('.webHeader__avatar a');
36+
let avatarImage = document.createElement('div');
37+
avatarImage.className = "webHeader__avatarImage";
38+
let twoChar = avatar.text.substring(0, 2);
39+
avatarImage.innerText = twoChar;
40+
avatar.innerHTML = avatarImage.outerHTML;
41+
});
42+
</script>
43+
</head>
3444

35-
<body>
36-
<div align="center">
37-
38-
<div class="maxWidthBody" align="left">
39-
40-
<jsp:include page="/includes/inc_header.jsp" />
41-
42-
<jsp:include page="/includes/project/project_tabs.jsp" />
43-
44-
<div id="mainMiddleContent">
45+
<body>
46+
<jsp:include page="/includes/inc_header_reskin.jsp" />
47+
<jsp:include page="/includes/project/project_tabs_reskin.jsp" />
48+
<div class="content">
49+
<div class="content__inner">
50+
<jsp:include page="/includes/review/review_project.jsp">
51+
<jsp:param name="hideScoreInfo" value="true" />
52+
</jsp:include>
53+
<div class="divider"></div>
54+
<div id="mainContent">
4555
<div style="position: relative; width: 100%;">
46-
47-
<div style="padding: 11px 6px 9px 0px;">
48-
<table cellspacing="0" cellpadding="0" border="0">
49-
<tr valign="middle">
50-
<td><img src="/i/${categoryIconName}" alt="" border="0" /></td>
51-
<td><img src="/i/${rootCatalogIcon}" alt="${rootCatalogName}" border="0" /></td>
52-
<td>
53-
<span class="bodyTitle">${project.allProperties["Project Name"]}</span>
54-
<c:if test='${!(empty project.allProperties["Project Version"])}'>
55-
<font size="4"><or:text key="global.version" />
56-
${project.allProperties["Project Version"]}</font>
57-
</c:if>
58-
</td>
59-
</tr>
60-
</table>
61-
</div><br />
62-
6356
<table class="scorecard" width="100%" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
6457
<tr>
6558
<td class="title"><or:text key="confirmAdvanceFailedScreeningSubmission.box.title" /></td>
6659
</tr>
6760
<tr class="light">
68-
<td class="valueC">
61+
<td class="finalScore">
6962
<br />
7063
<or:text key="confirmAdvanceFailedScreeningSubmission.question" /><br /><br />
7164
</td>
7265
</tr>
7366
<tr>
7467
<td class="lastRowTD"><!-- @ --></td>
7568
</tr>
76-
</table><br />
77-
78-
<div align="right">
79-
<a href="<or:url value='/actions/AdvanceFailedScreeningSubmission?uid=${uid}&advance=y' />"><img src="<or:text key='confirmAdvanceFailedScreeningSubmission.btnConfirm.img' />" alt="<or:text key='confirmAdvanceFailedScreeningSubmission.btnConfirm.alt' />" border="0" /></a>&#160;
80-
<a href="<or:url value='/actions/ViewProjectDetails?pid=${project.id}' />">
81-
<img src="<or:text key='btnCancel.img' />" alt="<or:text key='btnCancel.alt' />" border="0" />
69+
</table>
70+
<div class="saveChanges__button">
71+
<a href="<or:url value='/actions/AdvanceFailedScreeningSubmission?uid=${uid}&advance=y' />" class="saveChanges__save"><or:text key='confirmAdvanceFailedScreeningSubmission.btnConfirm.alt' /></a>
72+
<a href="<or:url value='/actions/ViewProjectDetails?pid=${project.id}' />" class="saveChanges__save">
73+
<or:text key='btnCancel.alt' />
8274
</a>
83-
</div><br />
84-
75+
</div>
8576
</div>
8677
</div>
87-
88-
<jsp:include page="/includes/inc_footer.jsp" />
89-
78+
</div>
9079
</div>
91-
92-
</div>
93-
94-
</body>
80+
<jsp:include page="/includes/inc_footer_reskin.jsp" />
81+
</body>
9582
</html>

web/jsp/editLateDeliverable.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@
311311
<input type="hidden" property="saveLateDeliverableBtn" />
312312
</div>
313313
</c:if>
314-
<jsp:include page="/includes/inc_footer_reskin.jsp" />
315314
</div>
315+
<jsp:include page="/includes/inc_footer_reskin.jsp" />
316316
</div>
317317
</body>
318318
<script type="text/javascript">

web/jsp/editProject.jsp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,15 +1164,17 @@
11641164
let id = with_forum?.[0]?.id;
11651165
if (id !== undefined) {
11661166
let forumLinkEl = document.querySelector('.projectInfo__forumLink');
1167-
return forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
1167+
if(forumLinkEl){
1168+
forumLinkEl.classList.add("enabled");
1169+
forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
1170+
}
11681171
}
11691172
});
11701173
}
1174+
let projectId = ${project.id};
1175+
updateForumLink(projectId);
11711176
11721177
document.addEventListener("DOMContentLoaded", function(){
1173-
let projectId = ${project.id};
1174-
updateForumLink(projectId);
1175-
11761178
let selects = document.getElementsByClassName("selectCustom");
11771179
customSelect(selects);
11781180

web/jsp/editProjectLinks.jsp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,17 @@
4747
let id = with_forum?.[0]?.id;
4848
if (id !== undefined) {
4949
let forumLinkEl = document.querySelector('.projectInfo__forumLink');
50-
return forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
50+
if(forumLinkEl){
51+
forumLinkEl.classList.add("enabled");
52+
forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
53+
}
5154
}
5255
});
5356
}
54-
document.addEventListener("DOMContentLoaded", function(){
55-
let projectId = ${project.id};
56-
updateForumLink(projectId);
57+
let projectId = ${project.id};
58+
updateForumLink(projectId);
5759
60+
document.addEventListener("DOMContentLoaded", function(){
5861
for (const dropdown of document.querySelectorAll(".custom-select-wrapper")) {
5962
dropdown.addEventListener('click', function () {
6063
this.querySelector('.custom-select').classList.toggle('open');

web/jsp/editProjectPayments.jsp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,17 @@
7676
let id = with_forum?.[0]?.id;
7777
if (id !== undefined) {
7878
let forumLinkEl = document.querySelector('.projectInfo__forumLink');
79-
return forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
79+
if(forumLinkEl){
80+
forumLinkEl.classList.add("enabled");
81+
forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
82+
}
8083
}
8184
});
8285
}
86+
let projectId = ${project.id};
87+
updateForumLink(projectId);
8388
8489
document.addEventListener("DOMContentLoaded", function(){
85-
let projectId = ${project.id};
86-
updateForumLink(projectId);
87-
8890
let selects = document.getElementsByClassName("selectCustom");
8991
customSelect(selects);
9092

web/jsp/editReview.jsp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,17 @@
4848
let id = with_forum?.[0]?.id;
4949
if (id !== undefined) {
5050
let forumLinkEl = document.querySelector('.projectInfo__forumLink');
51-
return forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
51+
if(forumLinkEl){
52+
forumLinkEl.classList.add("enabled");
53+
forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
54+
}
5255
}
5356
});
5457
}
55-
document.addEventListener("DOMContentLoaded", function(){
56-
let projectId = ${project.id};
57-
updateForumLink(projectId);
58+
let projectId = ${project.id};
59+
updateForumLink(projectId);
5860
61+
document.addEventListener("DOMContentLoaded", function(){
5962
for (const dropdown of document.querySelectorAll(".custom-select-wrapper")) {
6063
dropdown.addEventListener('click', function () {
6164
this.querySelector('.custom-select').classList.toggle('open');

0 commit comments

Comments
 (0)