This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 72660bb3ba Improved: When you add a party content the party profile
screen does not refresh (OFBIZ-6709)
72660bb3ba is described below
commit 72660bb3ba6f0f6677ba69f16d9ba378eca4b7e7
Author: Jacques Le Roux <[email protected]>
AuthorDate: Tue Mar 19 10:07:48 2024 +0100
Improved: When you add a party content the party profile screen does not
refresh
(OFBIZ-6709)
When you upload a file not accepted because of SecuredUpload class you don't
have any feedback about that. This improves it
---
.../party/webapp/partymgr/static/PartyProfileContent.js | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/applications/party/webapp/partymgr/static/PartyProfileContent.js
b/applications/party/webapp/partymgr/static/PartyProfileContent.js
index b7105b56e9..2f51b8d839 100644
--- a/applications/party/webapp/partymgr/static/PartyProfileContent.js
+++ b/applications/party/webapp/partymgr/static/PartyProfileContent.js
@@ -22,14 +22,14 @@ under the License.
*/
var uiLabelJsonObject = null;
jQuery(document).ready(function() {
- var labelObject = ["CommonUpload", "CommonSave", "CommonCompleted"];
+ var labelObject = ["CommonUpload", "CommonSave", "CommonCompleted",
"PartyNoContent"];
getJSONuiLabels(labelObject, function(result){
uiLabelJsonObjects = result.responseJSON;
});
jQuery("#progress_bar").progressbar({value: 0});
});
-function uploadPartyContent(event){
+function uploadPartyContent(event) {
jQuery("#progress_bar").progressbar("option", "value", 0);
var targetFrame = jQuery('#target_upload');
var infodiv = jQuery('#content-messages');
@@ -47,14 +47,18 @@ function uploadPartyContent(event){
}
}
-function uploadCompleted(){
+function uploadCompleted() {
var iframePartyContentList =
jQuery("#target_upload").contents().find("#partyContentList").html();
// update partyContentList - copy the Data from the iFrame partyContentList
// to the page partyContentList
jQuery("#partyContentList").html(iframePartyContentList);
- jQuery('#progressBarSavingMsg').html(uiLabelJsonObjects.CommonCompleted);
+ 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.");
+ }
// reset progressbar
jQuery("#progress_bar").progressbar("option", "value", 0);