[OBCQL] Add export to csv option on menu.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Thu, 16 Dec 2010 13:56:46 +0100
changeset 9209 b037e6cfeb18
parent 9208 838075395d42
child 9210 5291494cf8d4
[OBCQL] Add export to csv option on menu.
modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBKMO_WIDGET_CLASS_MENU.xml
modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBKMO_WIDGET_CLASS_MENU.xml	Thu Dec 16 13:56:46 2010 +0100
@@ -0,0 +1,25 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<data>
+<!--B950C8583040434A9D09BF859DC34CCE--><OBKMO_WIDGET_CLASS_MENU>
+<!--B950C8583040434A9D09BF859DC34CCE-->  <OBKMO_WIDGET_CLASS_MENU_ID><![CDATA[B950C8583040434A9D09BF859DC34CCE]]></OBKMO_WIDGET_CLASS_MENU_ID>
+<!--B950C8583040434A9D09BF859DC34CCE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B950C8583040434A9D09BF859DC34CCE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B950C8583040434A9D09BF859DC34CCE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B950C8583040434A9D09BF859DC34CCE-->  <OBKMO_WIDGET_CLASS_ID><![CDATA[2A32CF26F3F64FE39C7F94E9D82497D1]]></OBKMO_WIDGET_CLASS_ID>
+<!--B950C8583040434A9D09BF859DC34CCE-->  <ISSEPARATOR><![CDATA[N]]></ISSEPARATOR>
+<!--B950C8583040434A9D09BF859DC34CCE-->  <ACTION><![CDATA[exportGrid]]></ACTION>
+<!--B950C8583040434A9D09BF859DC34CCE-->  <SEQUENCE><![CDATA[20]]></SEQUENCE>
+<!--B950C8583040434A9D09BF859DC34CCE-->  <TITLE><![CDATA[Export as CSV]]></TITLE>
+<!--B950C8583040434A9D09BF859DC34CCE--></OBKMO_WIDGET_CLASS_MENU>
+
+<!--E92960850FF24E5396ADDD5B3351D232--><OBKMO_WIDGET_CLASS_MENU>
+<!--E92960850FF24E5396ADDD5B3351D232-->  <OBKMO_WIDGET_CLASS_MENU_ID><![CDATA[E92960850FF24E5396ADDD5B3351D232]]></OBKMO_WIDGET_CLASS_MENU_ID>
+<!--E92960850FF24E5396ADDD5B3351D232-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E92960850FF24E5396ADDD5B3351D232-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E92960850FF24E5396ADDD5B3351D232-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E92960850FF24E5396ADDD5B3351D232-->  <OBKMO_WIDGET_CLASS_ID><![CDATA[2A32CF26F3F64FE39C7F94E9D82497D1]]></OBKMO_WIDGET_CLASS_ID>
+<!--E92960850FF24E5396ADDD5B3351D232-->  <ISSEPARATOR><![CDATA[Y]]></ISSEPARATOR>
+<!--E92960850FF24E5396ADDD5B3351D232-->  <SEQUENCE><![CDATA[10]]></SEQUENCE>
+<!--E92960850FF24E5396ADDD5B3351D232--></OBKMO_WIDGET_CLASS_MENU>
+
+</data>
--- a/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Thu Dec 16 14:01:21 2010 +0100
+++ b/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Thu Dec 16 13:56:46 2010 +0100
@@ -77,7 +77,12 @@
   },
 
   exportGrid: function() {
-    this.grid.exportData();
+    var grid = this.widget.grid;
+    grid.exportData({
+      exportAs: 'csv',
+     // exportFilename: 'Query/List_widget.csv',
+      exportDisplay: 'download'
+    });
   }
   
 });