details:   https://code.openbravo.com/erp/devel/pi/rev/d03d06d3cd71
changeset: 21127:d03d06d3cd71
user:      Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date:      Mon Sep 16 09:16:09 2013 +0530
summary:   Fixes Issue 0024698: When opening a window two request to save the 
view on recent view section are send

Modify recent view list only if needed. If the object at index 0 is going to be 
readded, skip.
This is done to avoid multiple calls to server for setting the Recent View List.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-recent-utilities.js
 |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 641fafa51870 -r d03d06d3cd71 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-recent-utilities.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-recent-utilities.js
 Sun Sep 15 15:32:37 2013 +0530
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-recent-utilities.js
 Mon Sep 16 09:16:09 2013 +0530
@@ -110,6 +110,11 @@
         }
       }
 
+      //if found and the current index is 0, skip
+      if (currentIndex === 0) {
+        return;
+      }
+
       // if found then first remove it, re-add it later
       if (currentIndex > -1) {
         var currentLength = currentRecentValue.length;

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to