Skip to content

Commit

Permalink
Fixed: When you add a party content the party profile screen does not…
Browse files Browse the repository at this point in the history
… refresh (OFBIZ-6709)

There is a problem showing the result of upload either if it's rejected or not.
In all case it shows "Maybe for security reason your file has not been accepted,
 check the log."

The best solution is to temporarily show this information, say 10 sec.
No need to show if it's a success, the list above shows it anyway.

That's what I did but  7 sec is enough to read the message.
Massage that is a bit longer now, but more explicit:
"If you don't see your file in Party Content list above, it has been rejected
for security reason. Check the log."
  • Loading branch information
JacquesLeRoux committed Sep 11, 2024
1 parent 106f1f5 commit ac43745
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions applications/party/webapp/partymgr/static/PartyProfileContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@ function uploadCompleted() {
// to the page partyContentList
jQuery("#partyContentList").html(iframePartyContentList);

if (iframePartyContentList.includes(uiLabelJsonObjects.PartyNoContent)) {
jQuery('#progressBarSavingMsg').html(uiLabelJsonObjects.CommonCompleted);
} else {
jQuery('#progressBarSavingMsg').html("Maybe for security reason your file has not been accepted, check the log.");
}
// Explanation in case of rejected file
jQuery('#progressBarSavingMsg').html("If you don't see your file in Party Content list above, it has been rejected for security reason. Check the log.");

// Remove explanation in case of rejected file
setTimeout(() => { jQuery('#progressBarSavingMsg').hide(); }, 7000);

// reset progressbar
jQuery("#progress_bar").progressbar("option", "value", 0);


// remove iFrame
jQuery("#target_upload").remove();
return;
Expand Down

0 comments on commit ac43745

Please sign in to comment.