Skip to content

reskin-or bug fixes #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ workflows:
branches:
only:
- dev-maven
- reskin-or

- build-prod:
context : org-global
Expand All @@ -190,6 +191,7 @@ workflows:
branches:
only:
- dev-maven
- reskin-or

- deployProd:
context : org-global
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@
<artifactId>log4j-core</artifactId>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.topcoder.onlinereview.component.resource.Resource;
import com.topcoder.onlinereview.component.resource.ResourceManager;
import com.topcoder.onlinereview.component.resource.ResourcePersistenceException;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.struts2.util.TextProviderHelper;

import javax.servlet.http.HttpServletRequest;
Expand Down Expand Up @@ -61,6 +62,9 @@ private Functions() {
* a text to encode.
*/
public static String htmlEncode(String text) {
// unescape string (convert strings like \\n to \n character),
// so we can find and replace it with corresponding string like <br />
text = StringEscapeUtils.unescapeJava(text);
if (text == null || text.length() == 0) {
return "";
}
Expand Down Expand Up @@ -100,8 +104,8 @@ public static String htmlEncode(String text) {
stringBuffer.append(ch);
}
}

return stringBuffer.toString();
// make sure we escape the unescaped string before returning it
return StringEscapeUtils.escapeJava(stringBuffer.toString());
}

/**
Expand Down
9 changes: 9 additions & 0 deletions web/css/or/new_styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -551,3 +551,12 @@ table.tabLinks .input {
.feedback-text {
width:100%;
}

.projectInfo__forumLink{
pointer-events: none;
cursor: pointer;
}

.projectInfo__forumLink.enabled{
pointer-events: all;
}
12 changes: 10 additions & 2 deletions web/css/reskin-or/reskin.css
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ body {
padding-bottom: 200px;
}

.content--viewSpec,
.content--viewApproval,
.content--projectPayment {
padding-bottom: 135px;
}
Expand Down Expand Up @@ -768,6 +770,10 @@ table.scorecard td.headerT {
text-decoration: none !important;
}

.backToHome {
margin-bottom: 32px;
}

.editPaymentBtn {
margin-right: 12px;
}
Expand Down Expand Up @@ -825,8 +831,8 @@ table.scorecard td.reviewerResp input {
.cta {
position: fixed;
width: 100%;
bottom: var(--footer-height);
background-color: #fff;
bottom: var(--footer-height);
z-index: 99;
box-shadow: 0 0 16px 16px rgb(42 42 42 / 10%);
}
Expand Down Expand Up @@ -2654,6 +2660,7 @@ td.resourcesTable__empty {
width: 100%;
z-index: 99;
bottom: 0;
left: 0;
}

.checkPoint__chevron {
Expand Down Expand Up @@ -2752,7 +2759,7 @@ td.resourcesTable__empty {
}

.ctaOpen {
bottom: 386px;
bottom: 386px !important;
}
.approvalRadioBtn {
display: flex;
Expand All @@ -2764,6 +2771,7 @@ td.resourcesTable__empty {
.lateDeliverableValue {
margin-top: 8px;
font-weight: 400;
white-space: normal;
}

.lateDeliverableProjectLink {
Expand Down
1,075 changes: 486 additions & 589 deletions web/includes/project/project_phase_reskin.jsp

Large diffs are not rendered by default.

103 changes: 45 additions & 58 deletions web/jsp/confirmAdvanceFailedScreeningSubmission.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,83 +13,70 @@
<%@ taglib prefix="or" uri="/or-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<jsp:include page="/includes/project/project_title.jsp">
<jsp:param name="thirdLevelPageKey" value="confirmAdvanceFailedScreeningSubmission.title" />
</jsp:include>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

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

<!-- TopCoder CSS -->
<link type="text/css" rel="stylesheet" href="/css/style.css" />
<link type="text/css" rel="stylesheet" href="/css/coders.css" />
<link type="text/css" rel="stylesheet" href="/css/stats.css" />
<link type="text/css" rel="stylesheet" href="/css/tcStyles.css" />
<!-- TopCoder CSS -->
<link type="text/css" rel="stylesheet" href="/css/style.css" />
<link type="text/css" rel="stylesheet" href="/css/coders.css" />

<!-- CSS and JS by Petar -->
<link type="text/css" rel="stylesheet" href="/css/or/new_styles.css" />
<script language="JavaScript" type="text/javascript"
src="/js/or/rollovers2.js"><!-- @ --></script>
</head>
<!-- CSS and JS by Petar -->
<script language="JavaScript" type="text/javascript"
src="/js/or/rollovers2.js"><!-- @ --></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(){
let avatar = document.querySelector('.webHeader__avatar a');
let avatarImage = document.createElement('div');
avatarImage.className = "webHeader__avatarImage";
let twoChar = avatar.text.substring(0, 2);
avatarImage.innerText = twoChar;
avatar.innerHTML = avatarImage.outerHTML;
});
</script>
</head>

<body>
<div align="center">

<div class="maxWidthBody" align="left">

<jsp:include page="/includes/inc_header.jsp" />

<jsp:include page="/includes/project/project_tabs.jsp" />

<div id="mainMiddleContent">
<body>
<jsp:include page="/includes/inc_header_reskin.jsp" />
<jsp:include page="/includes/project/project_tabs_reskin.jsp" />
<div class="content">
<div class="content__inner">
<jsp:include page="/includes/review/review_project.jsp">
<jsp:param name="hideScoreInfo" value="true" />
</jsp:include>
<div class="divider"></div>
<div id="mainContent">
<div style="position: relative; width: 100%;">

<div style="padding: 11px 6px 9px 0px;">
<table cellspacing="0" cellpadding="0" border="0">
<tr valign="middle">
<td><img src="/i/${categoryIconName}" alt="" border="0" /></td>
<td><img src="/i/${rootCatalogIcon}" alt="${rootCatalogName}" border="0" /></td>
<td>
<span class="bodyTitle">${project.allProperties["Project Name"]}</span>
<c:if test='${!(empty project.allProperties["Project Version"])}'>
<font size="4"><or:text key="global.version" />
${project.allProperties["Project Version"]}</font>
</c:if>
</td>
</tr>
</table>
</div><br />

<table class="scorecard" width="100%" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td class="title"><or:text key="confirmAdvanceFailedScreeningSubmission.box.title" /></td>
</tr>
<tr class="light">
<td class="valueC">
<td class="finalScore">
<br />
<or:text key="confirmAdvanceFailedScreeningSubmission.question" /><br /><br />
</td>
</tr>
<tr>
<td class="lastRowTD"><!-- @ --></td>
</tr>
</table><br />

<div align="right">
<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;
<a href="<or:url value='/actions/ViewProjectDetails?pid=${project.id}' />">
<img src="<or:text key='btnCancel.img' />" alt="<or:text key='btnCancel.alt' />" border="0" />
</table>
<div class="saveChanges__button">
<a href="<or:url value='/actions/AdvanceFailedScreeningSubmission?uid=${uid}&advance=y' />" class="saveChanges__save"><or:text key='confirmAdvanceFailedScreeningSubmission.btnConfirm.alt' /></a>
<a href="<or:url value='/actions/ViewProjectDetails?pid=${project.id}' />" class="saveChanges__save">
<or:text key='btnCancel.alt' />
</a>
</div><br />

</div>
</div>
</div>

<jsp:include page="/includes/inc_footer.jsp" />

</div>
</div>

</div>

</body>
<jsp:include page="/includes/inc_footer_reskin.jsp" />
</body>
</html>
2 changes: 1 addition & 1 deletion web/jsp/editLateDeliverable.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@
<input type="hidden" property="saveLateDeliverableBtn" />
</div>
</c:if>
<jsp:include page="/includes/inc_footer_reskin.jsp" />
</div>
<jsp:include page="/includes/inc_footer_reskin.jsp" />
</div>
</body>
<script type="text/javascript">
Expand Down
10 changes: 6 additions & 4 deletions web/jsp/editProject.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -1164,15 +1164,17 @@
let id = with_forum?.[0]?.id;
if (id !== undefined) {
let forumLinkEl = document.querySelector('.projectInfo__forumLink');
return forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
if(forumLinkEl){
forumLinkEl.classList.add("enabled");
forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
}
}
});
}
let projectId = ${project.id};
updateForumLink(projectId);

document.addEventListener("DOMContentLoaded", function(){
let projectId = ${project.id};
updateForumLink(projectId);

let selects = document.getElementsByClassName("selectCustom");
customSelect(selects);

Expand Down
11 changes: 7 additions & 4 deletions web/jsp/editProjectLinks.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,17 @@
let id = with_forum?.[0]?.id;
if (id !== undefined) {
let forumLinkEl = document.querySelector('.projectInfo__forumLink');
return forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
if(forumLinkEl){
forumLinkEl.classList.add("enabled");
forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
}
}
});
}
document.addEventListener("DOMContentLoaded", function(){
let projectId = ${project.id};
updateForumLink(projectId);
let projectId = ${project.id};
updateForumLink(projectId);

document.addEventListener("DOMContentLoaded", function(){
for (const dropdown of document.querySelectorAll(".custom-select-wrapper")) {
dropdown.addEventListener('click', function () {
this.querySelector('.custom-select').classList.toggle('open');
Expand Down
10 changes: 6 additions & 4 deletions web/jsp/editProjectPayments.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,17 @@
let id = with_forum?.[0]?.id;
if (id !== undefined) {
let forumLinkEl = document.querySelector('.projectInfo__forumLink');
return forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
if(forumLinkEl){
forumLinkEl.classList.add("enabled");
forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
}
}
});
}
let projectId = ${project.id};
updateForumLink(projectId);

document.addEventListener("DOMContentLoaded", function(){
let projectId = ${project.id};
updateForumLink(projectId);

let selects = document.getElementsByClassName("selectCustom");
customSelect(selects);

Expand Down
11 changes: 7 additions & 4 deletions web/jsp/editReview.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,17 @@
let id = with_forum?.[0]?.id;
if (id !== undefined) {
let forumLinkEl = document.querySelector('.projectInfo__forumLink');
return forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
if(forumLinkEl){
forumLinkEl.classList.add("enabled");
forumLinkEl.href = "https://<%=ApplicationServer.FORUMS_SERVER_NAME%>/categories/" + id;
}
}
});
}
document.addEventListener("DOMContentLoaded", function(){
let projectId = ${project.id};
updateForumLink(projectId);
let projectId = ${project.id};
updateForumLink(projectId);

document.addEventListener("DOMContentLoaded", function(){
for (const dropdown of document.querySelectorAll(".custom-select-wrapper")) {
dropdown.addEventListener('click', function () {
this.querySelector('.custom-select').classList.toggle('open');
Expand Down
Loading