details:   https://code.openbravo.com/erp/devel/pi/rev/99cab44d0c25
changeset: 15106:99cab44d0c25
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Tue Jan 10 17:33:39 2012 +0100
summary:   related to issue 19382: Multiple selection hides all buttons

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
 |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 82a4638a2c55 -r 99cab44d0c25 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
    Tue Jan 10 16:44:45 2012 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
    Tue Jan 10 17:33:39 2012 +0100
@@ -1158,11 +1158,12 @@
         this.hideShowRightMembers(false);
       }
       
-      var noneOrMultipleRecordsSelected = 
currentContext.viewGrid.getSelectedRecords().length !== 1 && !isNew;
       if (currentContext.viewGrid.getSelectedRecords()) {
         numOfSelRecords = currentContext.viewGrid.getSelectedRecords().length;
       }
 
+      var noneOrMultipleRecordsSelected = numOfSelRecords !== 1 && !isNew;
+
       if (currentValues && !noSetSession && !currentContext.isShowingForm && 
!isNew && !hideAllButtons) {
         if(this.view.tabId===currentContext.tabId){
           currentTabCalled = true;     
@@ -1184,7 +1185,7 @@
         allProperties = currentContext.getContextInfo(false, true, false, 
true);
         
OB.RemoteCallManager.call('org.openbravo.client.application.window.FormInitializationComponent',
 allProperties, requestParams, callbackHandler(currentContext, me));
       } else {
-        doRefresh(buttonsByContext[currentContext], currentValues || {}, 
hideAllButtons, noneOrMultipleRecordsSelected, this);
+        doRefresh(buttonsByContext[currentContext], currentValues || {}, 
hideAllButtons || noneOrMultipleRecordsSelected, numOfSelRecords !== 1,this);
       }
     }
 

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to