details: /erp/devel/pi/rev/375b3a0db3f1
changeset: 11392:375b3a0db3f1
user: Iván Perdomo <ivan.perdomo <at> openbravo.com>
date: Tue Mar 29 13:26:55 2011 +0200
summary: Issue 16528: Added widgetClassId to available widget classes
diffstat:
modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java
| 2 ++
modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js
| 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diffs (47 lines):
diff -r af3c2ae60fce -r 375b3a0db3f1
modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java
---
a/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java
Tue Mar 29 12:15:47 2011 +0200
+++
b/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java
Tue Mar 29 13:26:55 2011 +0200
@@ -66,6 +66,7 @@
public abstract class WidgetProvider {
private static final Logger log = Logger.getLogger(WidgetProvider.class);
+ public static final String WIDGETCLASSID = "widgetClassId";
public static final String TITLE = "title";
private static final String COLNUM = "colNum";
private static final String ROWNUM = "rowNum";
@@ -122,6 +123,7 @@
final JSONObject jsonObject = new JSONObject();
jsonObject.put(MyOpenbravoWidgetComponent.CLASSNAMEPARAMETER, this
.getClientSideWidgetClassName());
+ jsonObject.put(WIDGETCLASSID, widgetClass.getId());
jsonObject.put(TITLE, MyOBUtils.getWidgetTitle(widgetClass));
jsonObject.put(HEIGHT, widgetClass.getHeight() + WIDGET_HEADER_HEIGHT);
jsonObject.put(MENU_ITEMS, MyOBUtils.getWidgetMenuItems(widgetClass));
diff -r af3c2ae60fce -r 375b3a0db3f1
modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js
---
a/modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js
Tue Mar 29 12:15:47 2011 +0200
+++
b/modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js
Tue Mar 29 13:26:55 2011 +0200
@@ -513,14 +513,13 @@
} else {
var localWidgetProperties = isc.addProperties({}, widgetProperties);
for (i = 0; i < this.availableWidgetClasses.length; i++) {
- if (this.availableWidgetClasses[i].widgetClassName &&
- this.availableWidgetClasses[i].widgetClassName ===
widgetProperties.widgetClassName &&
- this.availableWidgetClasses[i].title === widgetProperties.title) {
+ if (this.availableWidgetClasses[i].widgetClassId ===
widgetProperties.widgetClassId) {
localWidgetProperties.showMaximizeButton =
this.availableWidgetClasses[i].showMaximizeButton;
localWidgetProperties.menuItems =
this.availableWidgetClasses[i].menuItems;
localWidgetProperties.fieldDefinitions =
this.availableWidgetClasses[i].fieldDefinitions;
localWidgetProperties.aboutFieldDefinitions =
this.availableWidgetClasses[i].aboutFieldDefinitions;
localWidgetProperties.parameters = isc.addProperties({},
widgetProperties.parameters);
+ localWidgetProperties.widgetClassId =
this.availableWidgetClasses[i].widgetClassId;
break;
}
}
@@ -711,6 +710,7 @@
newWidget.parameters = widget.parameters;
newWidget.title = widget.title;
newWidget.widgetClassName = widget.widgetClassName;
+ newWidget.widgetClassId = widget.widgetClassId;
this.widgets.push(newWidget);
}
}
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits