details:   /erp/devel/pi/rev/7f3e03aa0b1c
changeset: 12385:7f3e03aa0b1c
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Tue May 24 19:07:34 2011 +0200
summary:   Fixes issue 16947: OPTIMIZE-15: Splitter bar does not work in all 
states

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-tab.js
 |  42 ++++++++-
 1 files changed, 35 insertions(+), 7 deletions(-)

diffs (111 lines):

diff -r 5b76fe654308 -r 7f3e03aa0b1c 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-tab.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-tab.js
        Tue May 24 18:21:46 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-tab.js
        Tue May 24 19:07:34 2011 +0200
@@ -229,6 +229,23 @@
 
     dblClickWaiting: false,
 
+    click: function() {
+      if (this.itemClicked) {
+        delete this.itemClicked;
+        return false;
+      }
+      this.tabSet.doHandleClick();
+    },
+
+    doubleClick: function() {
+      if (this.itemClicked || this.itemDoubleClicked) {
+        delete this.itemClicked;
+        delete this.itemDoubleClicked;
+        return false;
+      }
+      this.tabSet.doHandleDoubleClick();
+    },
+    
     canDrag: false,
     dragAppearance: 'none',
     dragStartDistance: 1,
@@ -236,6 +253,11 @@
 
     itemClick: function(item, itemNum){
       var me = this, tab = item;
+      this.itemClicked = true;
+      if (this.tabSet.ignoreItemClick) {
+        delete this.tabSet.ignoreItemClick;
+        return false;
+      }
       me.dblClickWaiting = true;
       isc.Timer.setTimeout(function(){
         // if no double click happened then do the single click
@@ -244,12 +266,12 @@
           me.tabSet.doHandleClick();
         }
       }, OB.Constants.DBL_CLICK_DELAY);
-
+      return false;
     },
 
     itemDoubleClick: function(item, itemNum){
-      var tab = item;
       this.dblClickWaiting = false;
+      this.itemDoubleClicked = true;
       this.tabSet.doHandleDoubleClick();
     },
 
@@ -261,31 +283,34 @@
     },
 
     mouseDown: function() {
-      if (this.state === isc.OBStandardView.STATE_IN_MID) {
+      if (this.tabSet.state === isc.OBStandardView.STATE_IN_MID) {
         this.setCursor(isc.Canvas.MOVE);
       }
     },
 
     mouseUp: function() {
-      if (this.state === isc.OBStandardView.STATE_IN_MID) {
+      if (this.tabSet.state === isc.OBStandardView.STATE_IN_MID) {
         this.setCursor(isc.Canvas.ROW_RESIZE);
       }
     },
 
     mouseOut: function() {
-      if (this.state === isc.OBStandardView.STATE_IN_MID) {
+      if (this.tabSet.state === isc.OBStandardView.STATE_IN_MID) {
         this.setCursor(isc.Canvas.ROW_RESIZE);
       }
     },
 
     mouseOver: function() {
-      if (this.state === isc.OBStandardView.STATE_IN_MID) {
+      if (this.tabSet.state === isc.OBStandardView.STATE_IN_MID) {
         this.setCursor(isc.Canvas.ROW_RESIZE);
       }
+      if (this.tabSet.state === isc.OBStandardView.STATE_TOP_MAX) {
+        this.setCursor(isc.Canvas.HAND);
+      }
     },
 
     getCurrentCursor: function() {
-      if (this.state === isc.OBStandardView.STATE_IN_MID) {
+      if (this.tabSet.state === isc.OBStandardView.STATE_IN_MID) {
         if (isc.EventHandler.leftButtonDown()) {
           return isc.Canvas.MOVE;
         }
@@ -340,6 +365,8 @@
       }
     } else if (this.state === isc.OBStandardView.STATE_BOTTOM_MAX) {
       this.setState(isc.OBStandardView.STATE_MID);
+    } else if (this.state === isc.OBStandardView.STATE_TOP_MAX) {
+      this.doHandleDoubleClick();
     }
   },
 
@@ -491,6 +518,7 @@
     if (tabPane.refreshContents) {
       tabPane.doRefreshContents(true, true);
     }
+    this.ignoreItemClick = true;
   },
 
   initWidget: function(){

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to