details: /erp/devel/pi/rev/b9c4daa3bff7
changeset: 10129:b9c4daa3bff7
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Jan 25 23:49:38 2011 +0100
summary: Set form height to 100%, changed initial empty data message of grid
to loading
details: /erp/devel/pi/rev/1b9e9f910f8c
changeset: 10130:1b9e9f910f8c
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Jan 25 23:50:40 2011 +0100
summary: layoutchildren returns value
details: /erp/devel/pi/rev/8007b8d1d5ba
changeset: 10131:8007b8d1d5ba
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Jan 25 23:51:27 2011 +0100
summary: Solved smaller bugs in standard window
details: /erp/devel/pi/rev/4569470336c6
changeset: 10132:4569470336c6
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Jan 25 23:52:34 2011 +0100
summary: Mouse cursor only changes for mid tabset, solved layout issue for
grand-child tab when minimized
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
| 3 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view-tabset.js
| 47 +++++--
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
| 58 +++------
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-window.js
| 18 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
| 2 +
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
| 19 +-
6 files changed, 73 insertions(+), 74 deletions(-)
diffs (truncated from 428 to 300 lines):
diff -r 67117d6c25f3 -r 4569470336c6
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
Tue Jan 25 23:48:58 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
Tue Jan 25 23:52:34 2011 +0100
@@ -122,13 +122,14 @@
// keep the funnel stuff placed correctly
layoutChildren : function () {
- this.Super("layoutChildren", arguments);
+ var ret = this.Super("layoutChildren", arguments);
if (this.funnelLayout) {
this.funnelLayout.setLeft(this.computeFunnelLeft());
}
if (this.filterImage) {
this.filterImage.setLeft(this.computeFunnelLeft(2));
}
+ return ret;
},
actionButtonProperties: {
diff -r 67117d6c25f3 -r 4569470336c6
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view-tabset.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view-tabset.js
Tue Jan 25 23:48:58 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view-tabset.js
Tue Jan 25 23:52:34 2011 +0100
@@ -38,7 +38,7 @@
isc.Timer.setTimeout(function(){
// if no double click happened then do the single click
if (me.dblClickWaiting) {
- me.dblClickWaiting = false;
+ me.dblClickWaiting = false;
me.tabSet.doHandleClick();
}
}, OB.Constants.DBL_CLICK_DELAY);
@@ -59,26 +59,37 @@
},
mouseDown: function() {
- this.setCursor(isc.Canvas.MOVE);
+ if (this.state === isc.OBStandardView.STATE_IN_MID) {
+ this.setCursor(isc.Canvas.MOVE);
+ }
},
mouseUp: function() {
- this.setCursor(isc.Canvas.ROW_RESIZE);
+ if (this.state === isc.OBStandardView.STATE_IN_MID) {
+ this.setCursor(isc.Canvas.ROW_RESIZE);
+ }
},
mouseOut: function() {
- this.setCursor(isc.Canvas.ROW_RESIZE);
+ if (this.state === isc.OBStandardView.STATE_IN_MID) {
+ this.setCursor(isc.Canvas.ROW_RESIZE);
+ }
},
mouseOver: function() {
- this.setCursor(isc.Canvas.ROW_RESIZE);
+ if (this.state === isc.OBStandardView.STATE_IN_MID) {
+ this.setCursor(isc.Canvas.ROW_RESIZE);
+ }
},
getCurrentCursor: function() {
- if (isc.EventHandler.leftButtonDown()) {
- return isc.Canvas.MOVE;
+ if (this.state === isc.OBStandardView.STATE_IN_MID) {
+ if (isc.EventHandler.leftButtonDown()) {
+ return isc.Canvas.MOVE;
+ }
+ return isc.Canvas.ROW_RESIZE;
}
- return isc.Canvas.ROW_RESIZE;
+ return this.Super('getCurrentCursor', arguments);
},
dragStart: function(){
@@ -208,12 +219,14 @@
}
} else if (newState === isc.OBStandardView.STATE_MIN) {
- // the height is set to the height of the tabbar
- this.setHeight(this.tabBar.getHeight());
for (i = 0; i < this.tabs.length; i++) {
tab = this.tabs[i];
this.getTabPane(tab).hide();
}
+
+ // the height is set to the height of the tabbar
+ this.setHeight(this.tabBar.getHeight());
+
this.state = newState;
} else if (newState === isc.OBStandardView.STATE_BOTTOM_MAX) {
// the top part in each layout is set to 0%, and the bottom to max
@@ -236,10 +249,12 @@
for (i = 0; i < this.tabs.length; i++) {
tab = this.tabs[i];
pane = this.getTabPane(tab);
+ pane.setHeight('100%');
this.makeTabVisible(tab);
- pane.members[0].setHeight('*');
if (pane.members[1]) {
pane.members[1].setState(isc.OBStandardView.STATE_MIN);
+ } else {
+ pane.members[0].setHeight('100%');
}
}
} else if (newState === isc.OBStandardView.STATE_MID) {
@@ -253,8 +268,8 @@
for (i = 0; i < this.tabs.length; i++) {
tab = this.tabs[i];
pane = this.getTabPane(tab);
+ this.makeTabVisible(tab);
pane.setHalfSplit();
- this.makeTabVisible(tab);
}
}
@@ -269,23 +284,23 @@
makeTabVisible: function(tab){
if (tab === this.getSelectedTab()) {
pane = this.getTabPane(tab);
- pane.show();
- if (pane.doRefreshContents) {
+ if (pane.refreshContents) {
pane.doRefreshContents();
}
+ pane.show();
if (pane.members[0]) {
pane.members[0].show();
}
if (pane.members[1]) {
pane.members[1].show();
}
- this.selectTab(tab);
+// this.selectTab(tab);
}
},
tabSelected: function(tabNum, tabPane, ID, tab){
if (tabPane.refreshContents) {
- tabPane.doRefreshContents();
+ tabPane.doRefreshContents(true);
}
},
diff -r 67117d6c25f3 -r 4569470336c6
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Tue Jan 25 23:48:58 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Tue Jan 25 23:52:34 2011 +0100
@@ -128,7 +128,7 @@
// The id of the record to initially show.
targetRecordId: null,
- // ** {{{ targetEntity }}} **
+ // ** {{{ entity }}} **
// The entity to show.
entity: null,
@@ -233,14 +233,9 @@
if (this.isRootView) {
if (this.childTabSet) {
- this.members[0].setHeight('50%');
- this.members[1].setHeight('50%');
this.childTabSet.setState(isc.OBStandardView.STATE_IN_MID);
- this.childTabSet.selectTab(this.childTabSet.tabs[0]);
-
+ this.childTabSet.selectTab(this.childTabSet.tabs[0]);
OB.TestRegistry.register('org.openbravo.client.application.ChildTabSet_' +
this.tabId, this.viewForm);
- } else {
- this.members[0].setHeight('100%');
}
}
},
@@ -442,7 +437,6 @@
// ** {{{ createMainParts }}} **
// Creates the main layout components of this view.
createMainParts: function(){
- var formContainerLayout;
var me = this;
if (this.tabId && this.tabId.length > 0) {
this.formGridLayout = isc.HLayout.create({
@@ -500,44 +494,45 @@
});
// to make sure that the form gets the correct scrollbars
- formContainerLayout = isc.VLayout.create({
+ this.formContainerLayout = isc.VLayout.create({
canFocus: true,
width: '100%',
height: '*',
overflow: 'auto'
});
- formContainerLayout.addMember(this.viewForm);
+ this.formContainerLayout.addMember(this.viewForm);
this.statusBarFormLayout.addMember(this.statusBar);
- this.statusBarFormLayout.addMember(formContainerLayout);
+ this.statusBarFormLayout.addMember(this.formContainerLayout);
this.formGridLayout.addMember(this.statusBarFormLayout);
// wrap the messagebar and the formgridlayout in a VLayout
- var gridFormMessageLayout = isc.VLayout.create({
+ this.gridFormMessageLayout = isc.VLayout.create({
canFocus: true,
height: '100%',
width: '100%',
overflow: 'auto'
});
- gridFormMessageLayout.addMember(this.messageBar);
- gridFormMessageLayout.addMember(this.formGridLayout);
+ this.gridFormMessageLayout.addMember(this.messageBar);
+ this.gridFormMessageLayout.addMember(this.formGridLayout);
// and place the active bar to the left of the form/grid/messagebar
- var activeGridFormMessageLayout = isc.HLayout.create({
+ this.activeGridFormMessageLayout = isc.HLayout.create({
canFocus: true,
- height: '100%',
+ height: (this.hasChildTabs ? '50%' : '100%'),
width: '100%',
overflow: 'hidden'
});
- activeGridFormMessageLayout.addMember(this.activeBar);
- activeGridFormMessageLayout.addMember(gridFormMessageLayout);
+ this.activeGridFormMessageLayout.addMember(this.activeBar);
+ this.activeGridFormMessageLayout.addMember(this.gridFormMessageLayout);
- this.addMember(activeGridFormMessageLayout);
+ this.addMember(this.activeGridFormMessageLayout);
}
if (this.hasChildTabs) {
this.childTabSet = isc.OBStandardViewTabSet.create({
+ height: '*',
parentContainer: this,
parentTabSet: this.parentTabSet
});
@@ -682,9 +677,10 @@
if (!this.refreshContents && !doRefreshWhenVisible) {
return;
}
+
// can be used by others to see that we are refreshing content
this.refreshContents = true;
-
+
// clear all our selections..
this.viewGrid.deselectAllRecords();
@@ -1313,29 +1309,20 @@
setTopMaximum: function(){
this.setHeight('100%');
if (this.members[1]) {
- this.members[0].setHeight('*');
this.members[1].setState(isc.OBStandardView.STATE_MIN);
- this.members[1].show();
- this.members[0].show();
this.convertToPercentageHeights();
} else {
this.members[0].setHeight('100%');
- this.members[0].show();
}
+ this.members[0].show();
this.state = isc.OBStandardView.STATE_TOP_MAX;
this.setMaximizeRestoreButtonState();
},
setBottomMaximum: function(){
- this.setHeight('100%');
if (this.members[1]) {
this.members[0].hide();
- this.members[0].setHeight(0);
this.members[1].setHeight('100%');
- this.members[1].show();
- } else {
- this.members[0].setHeight('100%');
- this.members[0].show();
}
this.state = isc.OBStandardView.STATE_BOTTOM_MAX;
this.setMaximizeRestoreButtonState();
@@ -1347,27 +1334,20 @@
if (this.members[1]) {
// divide the space between the first and second level
if (this.members[1].draggedHeight) {
- this.members[0].setHeight('*');
this.members[1].setHeight(this.members[1].draggedHeight);
- this.members[0].show();
- this.members[1].show();
this.convertToPercentageHeights();
- this.members[1].setState(isc.OBStandardView.STATE_IN_MID);
} else {
// NOTE: noticed that when resizing multiple members in a layout, that
it
// makes a difference what the order of resizing is, first resize the
// one which will be larger, then the one which will be smaller.
- // also do the STATE_IN_MID before resizing
this.members[1].setHeight('50%');
this.members[0].setHeight('50%');
- this.members[1].show();
- this.members[0].show();
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits