details: https://code.openbravo.com/erp/devel/pi/rev/5a73d3a97e51 changeset: 13448:5a73d3a97e51 user: Martin Taal <martin.taal <at> openbravo.com> date: Sun Aug 07 19:42:06 2011 +0200 summary: Fixes issue 18204: [Personalize form layout] Any click in any tab shows/hides the "Properties" tab Also fixes an issue that you needed to click twice in the beginning to collapse the property section
details: https://code.openbravo.com/erp/devel/pi/rev/98e046b09ae5 changeset: 13449:98e046b09ae5 user: Martin Taal <martin.taal <at> openbravo.com> date: Sun Aug 07 19:42:52 2011 +0200 summary: A change in a property through the right click context menu is now reflected in the form below also. diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalization-treegrid.js | 7 ++ modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalize-form.js | 26 +++++++-- 2 files changed, 26 insertions(+), 7 deletions(-) diffs (69 lines): diff -r 6c3343dda3d6 -r 98e046b09ae5 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalization-treegrid.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalization-treegrid.js Sat Aug 06 05:30:55 2011 +0200 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalization-treegrid.js Sun Aug 07 19:42:52 2011 +0200 @@ -226,6 +226,13 @@ // items may have been hidden, which changes their colour personalizeForm.fieldsTreeGrid.markForRedraw(); + // set the value in the properties form also + if (property === 'hiddenInForm') { + personalizeForm.propertiesLayout.formLayout.form.setValue('displayed', !value); + } else { + personalizeForm.propertiesLayout.formLayout.form.setValue(property, value); + } + // this will reset everything personalizeForm.changed(); }; diff -r 6c3343dda3d6 -r 98e046b09ae5 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalize-form.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalize-form.js Sat Aug 06 05:30:55 2011 +0200 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalize-form.js Sun Aug 07 19:42:52 2011 +0200 @@ -116,9 +116,12 @@ fieldsTabSet = isc.OBTabSet.create({ height: '*', - tabBarProperties: {}, initWidget: function(){ + // copy the tabBarProperties as it is coming from + // OB.Styles.Personalization.TabSet which is also used + // by the other tabsets + this.tabBarProperties = isc.addProperties({}, this.tabBarProperties); this.tabBarProperties.tabSet = this; this.tabBarProperties.itemClick = function(item, itemNum){ me.propertiesTabSet.toggleVisualState(); @@ -420,7 +423,8 @@ // put it all in a tabset... this.propertiesTabSet = isc.OBTabSet.create(OB.Styles.Personalization.TabSet, { height: OB.Styles.Personalization.PropertiesTabSet.expandedHeight, - + expanded: true, + toggleVisualState: function() { if (this.expanded) { this.setHeight(OB.Styles.Personalization.PropertiesTabSet.collapsedHeight); @@ -761,11 +765,19 @@ }); itemClick = function(item) { - if (item.parentItem) { - me.doHandlePreviewFormItemClick(item.parentItem); - } else { - me.doHandlePreviewFormItemClick(item); - } + // disabled clicking in the form itself as multiple things need to be + // solved: + // - the cursor needs to become a pointer + // - when the field in a collapsed group in the tree (on the left) + // then the group has to expand automatically + // - when the field is not in the viewport on the left then + // it needs to be scrolled there + // - we also need to support clicking in the status bar +// if (item.parentItem) { +// me.doHandlePreviewFormItemClick(item.parentItem); +// } else { +// me.doHandlePreviewFormItemClick(item); +// } }; var persFields = this.getPersonalizationFields(); ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
