details:   /erp/devel/pi/rev/0f62c097a4e2
changeset: 10738:0f62c097a4e2
user:      Iván Perdomo <ivan.perdomo <at> openbravo.com>
date:      Thu Feb 17 12:04:42 2011 +0100
summary:   Create One is show as default behavior when having zero records

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
 |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 573e41b7af81 -r 0f62c097a4e2 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
  Thu Feb 17 11:51:50 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
  Thu Feb 17 12:04:42 2011 +0100
@@ -402,7 +402,7 @@
       this.noDataEmptyMessage = OB.I18N.getLabel('OBUIAPP_GridNoRecords') +
       ' <span onclick="window[\'' +
       this.ID +
-      '\'].createNew();" class="OBLabelLink">' +
+      '\'].view.newRow();" class="OBLabelLink">' +
       OB.I18N.getLabel('OBUIAPP_GridCreateOne') +
       '</span>';
     }
@@ -737,7 +737,11 @@
     } else {
       selectedValues = this.view.parentView.viewGrid.getSelectedRecords();
       if (selectedValues.length === 0) {
-        this.emptyMessage = OB.I18N.getLabel('OBUIAPP_NoParentSelected');
+        this.emptyMessage = OB.I18N.getLabel('OBUIAPP_GridNoRecords') +
+                            ' <span onclick="window[\'' +
+                            this.ID + '\'].view.newRow();" 
class="OBLabelLink">' +
+                            OB.I18N.getLabel('OBUIAPP_GridCreateOne') +
+                            '</span>';
       } else if (selectedValues.length === 1 && selectedValues[0]._new) {
         this.emptyMessage = OB.I18N.getLabel('OBUIAPP_ParentIsNew');
       } else if (selectedValues.length > 1) {

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to