details: /erp/devel/pi/rev/ea1275fd5f85
changeset: 10911:ea1275fd5f85
user: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
date: Mon Feb 28 17:10:13 2011 +0100
summary: [OBUISEL] Handle minimum width of picklist and add extra width when
it shows extra fields.
diffstat:
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
| 17 ++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diffs (27 lines):
diff -r 3c1493c46cf4 -r ea1275fd5f85
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
Mon Feb 28 15:50:23 2011 +0100
+++
b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
Mon Feb 28 17:10:13 2011 +0100
@@ -294,6 +294,23 @@
showHeaderContextMenu: false
},
+ setPickListWidth: function(){
+ var extraWidth = 0,
+ fieldWidth = this.getVisibleWidth();
+ if (this.pickListFields.length > 1) {
+ extraWidth = 150 * (this.pickListFields.length - 1);
+ }
+
+ this.pickListWidth = (fieldWidth < 150 ? 150 : fieldWidth) + extraWidth;
+ },
+
+
+ // Set the pickListWidth just before being shown.
+ showPickList: function() {
+ this.setPickListWidth();
+ this.Super('showPickList', arguments);
+ },
+
init: function(){
this.icons = [{
src: this.popupIconSrc,
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits