Skip to content

Commit

Permalink
Merge pull request #2519 from CCAFS/aiccra-dev-A2-392-IPI-2.3
Browse files Browse the repository at this point in the history
a2 392 ipi 2.3 -visual changes -rule9
  • Loading branch information
MetalPrime authored Apr 29, 2024
2 parents 1a8492f + f4d7ada commit e3c276b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@
[#if action.isSubmit(cluster.project.id)]
<p style="font-style: italic; font-size: 10px;">Cluster submitted.</p>
[/#if]
[#-- Allow to track if the cluster is submitted --]
[#assign isSubmit = action.isSubmit(cluster.project.id)?string('true', 'false') /]
<p style="display:none" class="clusterSubmitted" isSubmit="${isSubmit}" name="${(list[index].project.acronym)!''}"></p>
</div>
<br>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,6 @@ div.fieldFocus-deliverable {
.button-exit{
position: absolute;
float: inline-end;
top: 40px;
right: 10px;
font-size: 18px;
cursor: pointer;
Expand All @@ -1021,6 +1020,7 @@ div.fieldFocus-deliverable {
.title-modal-evidences{
font-size: 19px;
font-weight: 600;
margin: 0;
}

.text-modal-evidences{
Expand All @@ -1029,7 +1029,10 @@ div.fieldFocus-deliverable {
}

.text-modal-evidences p{
max-width: 500px;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}

.content-modal{
Expand Down Expand Up @@ -1073,8 +1076,8 @@ div.fieldFocus-deliverable {

.button-close-modal{
background-color: #0779a4;
min-width: 120px;
height: 40px;
min-width: 100px;
height: 30px;
text-align: center;
display: flex;
align-items: center;
Expand Down
23 changes: 23 additions & 0 deletions marlo-web/src/main/webapp/global/js/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,29 @@ $(document).ready(function () {
var message = $(messageSelector).html().split(":")[1];
var messageType = "success";
notifyErrorMessage(messageType, message);
} else if (messageSelector.length >= 1 && messageSelector.html().split(":")[0] != "message" && messageSelector.html().split(":")[1] === " deliverable.status.remaining") {
// SHOW CLUSTER SUBMITTED BASED ON THE DISABLED INPUT
var $clusterSubmitted = $(`.clusterSubmitted`);
var message = "";
if ($clusterSubmitted.length > 0) {
// $clusterSubmitted exists, do something
const $mapClusterSubmit = $clusterSubmitted.filter((index, ele) => $(ele).attr("issubmit") === "true").get();
const $stringClusterSubmit = $mapClusterSubmit.reduce((prev,curr) => prev +$(curr).attr("name")+",","");
const stringFixed = $stringClusterSubmit.substring(0, $stringClusterSubmit.length - 1);
message += "The Information was correctly saved. <br> ";
message += "It seems that the following cluster(s) were submitted: <b>"+stringFixed+ "</b>. We suggest the following actions so you can save the information correctly: <br> ";
message += "<ul style='padding-left: 32px;'> <li>Click on the cluster name to see the information. </li> ";
message += "<li>Contact the cluster leader to unsubmitt the cluster and update the information. </li> ";
message += "</ul> ";
} else {
// $clusterSubmitted does not exist, do something else
message += "The Information was correctly saved. <br> ";
message += "It seems that the <b>Remaining shared information</b> is incompleted please take a look.";
}
// WARNING MESSAGE

var messageType = "warning";
notifyErrorMessage(messageType, message);
} else if (messageSelector.length >= 1 && messageSelector.html().split(":")[0] != "message") {
// WARNING MESSAGE
var message = ""
Expand Down

0 comments on commit e3c276b

Please sign in to comment.