Author: diveshdutta
Date: Sat Nov 21 12:33:52 2015
New Revision: 1715505
URL: http://svn.apache.org/viewvc?rev=1715505&view=rev
Log:
[OFBIZ-6709] Now when you add party content, party profile page refresh,
earlier it was not refreshing. Updated uiLabelJsonObjects method's (used for
jsonify ui lables) signature. Added callback function in this method to get
response returned from asynchronous ajax request. After this uiLabel object is
available which resolves the issue
Modified:
ofbiz/trunk/applications/party/webapp/partymgr/static/PartyProfileContent.js
ofbiz/trunk/framework/images/webapp/images/selectall.js
ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/EditAddress.js
Modified:
ofbiz/trunk/applications/party/webapp/partymgr/static/PartyProfileContent.js
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/static/PartyProfileContent.js?rev=1715505&r1=1715504&r2=1715505&view=diff
==============================================================================
---
ofbiz/trunk/applications/party/webapp/partymgr/static/PartyProfileContent.js
(original)
+++
ofbiz/trunk/applications/party/webapp/partymgr/static/PartyProfileContent.js
Sat Nov 21 12:33:52 2015
@@ -22,13 +22,12 @@ under the License.
*/
var uiLabelJsonObject = null;
jQuery(document).ready(function() {
-
var labelObject = {
"CommonUiLabels" : ["CommonUpload", "CommonSave",
"CommonCompleted"]
};
-
- uiLabelJsonObjects = getJSONuiLabels(labelObject);
-
+ getJSONuiLabels(labelObject, function(result){
+ uiLabelJsonObjects = result.responseJSON;
+ });
jQuery("#progress_bar").progressbar({value: 0});
});
Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?rev=1715505&r1=1715504&r2=1715505&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/selectall.js Sat Nov 21 12:33:52
2015
@@ -854,24 +854,20 @@ function waitSpinnerHide() {
* @param requiredLabels JSON Object {resource : [label1, label2 ...],
resource2 : [label1, label2, ...]}
* @return JSON Object
*/
-function getJSONuiLabels(requiredLabels) {
- var returnVal = {};
- var requiredLabelsStr = JSON.stringify(requiredLabels)
+function getJSONuiLabels(requiredLabels, callback) {
+ var requiredLabelsStr = JSON.stringify(requiredLabels)
- if (requiredLabels != null && requiredLabels != "") {
- jQuery.ajax({
- url: "getJSONuiLabelArray",
- type: "POST",
- data: {"requiredLabels" : requiredLabelsStr},
- success: function(data) {
- returnVal = data;
- }
- });
- }
-
- return returnVal;
+ if (requiredLabels != null && requiredLabels != "") {
+ jQuery.ajax({
+ url: "getJSONuiLabelArray",
+ type: "POST",
+ data: {"requiredLabels" : requiredLabelsStr},
+ complete: function(data) {
+ callback(data);
+ }
+ });
+ }
}
-
/**
* Read the requiered uiLabel from the uiLabelXml Resource
* @param uiResource String
@@ -927,7 +923,9 @@ function showErrorAlertLoadUiLabel(errBo
labels[uiResource] = [errUiLabel];
}
// request the labels
- labels = getJSONuiLabels(labels);
+ getJSONuiLabels(labels, function(result){
+ labels = result.responseJSON;
+ });
var errMsgBox = jQuery("#contentarea").after(jQuery("<div
id='errorAlertBox'></div>"));
Modified:
ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/EditAddress.js
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/EditAddress.js?rev=1715505&r1=1715504&r2=1715505&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/EditAddress.js
(original)
+++ ofbiz/trunk/specialpurpose/webpos/webapp/webpos/images/js/EditAddress.js
Sat Nov 21 12:33:52 2015
@@ -54,7 +54,9 @@ jQuery(document).ready(function() {
"CommonUiLabels" : ["CommonCreate", "CommonUpdate"],
};
- uiLabelJsonObjects = getJSONuiLabels(labelObject);
+ getJSONuiLabels(labelObject, function(result){
+ uiLabelJsonObjects = result.responseJSON;
+ });
});
function getResultOfCreateUpdateAddress(data) {