From ec86aadf4bba405d3156c218e043985226971009 Mon Sep 17 00:00:00 2001
From: Renaud Le Gac <legac@cppm.in2p3.fr>
Date: Tue, 2 Sep 2014 17:13:25 +0200
Subject: [PATCH] Add the context menu to export the grid content to CSV /
 LaTeX / PDF files

---
 static/plugin_dbui/locale/dbui-lang-fr.js     |   7 +
 .../plugin_dbui/resources/css/kde-oxygen.css  |  39 ++++--
 .../oxygen/{ => 16x16}/application-exit.png   | Bin
 .../icons/oxygen/16x16/application-pdf.png    | Bin 0 -> 685 bytes
 .../oxygen/{ => 16x16}/archive-insert.png     | Bin
 .../oxygen/{ => 16x16}/archive-remove.png     | Bin
 .../icons/oxygen/{ => 16x16}/arrow-down.png   | Bin
 .../icons/oxygen/{ => 16x16}/dialog-close.png | Bin
 .../oxygen/{ => 16x16}/document-export.png    | Bin
 .../oxygen/{ => 16x16}/document-import.png    | Bin
 .../icons/oxygen/{ => 16x16}/document-new.png | Bin
 .../{ => 16x16}/document-open-folder.png      | Bin
 .../icons/oxygen/{ => 16x16}/edit-copy.png    | Bin
 .../icons/oxygen/{ => 16x16}/edit-cut.png     | Bin
 .../icons/oxygen/{ => 16x16}/edit-delete.png  | Bin
 .../icons/oxygen/{ => 16x16}/edit-rename.png  | Bin
 .../{ => 16x16}/edit-text-frame-update.png    | Bin
 .../oxygen/{ => 16x16}/folder-yellow.png      | Bin
 .../icons/oxygen/{ => 16x16}/folder.png       | Bin
 .../icons/oxygen/{ => 16x16}/go-down.png      | Bin
 .../icons/oxygen/{ => 16x16}/go-up.png        | Bin
 .../icons/oxygen/{ => 16x16}/tab-close.png    | Bin
 .../resources/icons/oxygen/16x16/text-csv.png | Bin 0 -> 705 bytes
 .../icons/oxygen/{ => 16x16}/text-field.png   | Bin
 .../icons/oxygen/16x16/text-x-tex.png         | Bin 0 -> 717 bytes
 .../oxygen/{ => 16x16}/user-identity.png      | Bin
 .../icons/oxygen/{ => 16x16}/vcs_update.png   | Bin
 .../oxygen/{ => 16x16}/view-form-table.png    | Bin
 .../icons/oxygen/{ => 16x16}/view-form.png    | Bin
 .../icons/oxygen/{ => 16x16}/view-refresh.png | Bin
 .../icons/oxygen/{ => 16x16}/window-close.png | Bin
 static/plugin_dbui/src/grid/plugin/Export.js  | 130 +++++++++++++++++-
 views/reports/report_4.html                   |   5 -
 33 files changed, 162 insertions(+), 19 deletions(-)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/application-exit.png (100%)
 create mode 100644 static/plugin_dbui/resources/icons/oxygen/16x16/application-pdf.png
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/archive-insert.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/archive-remove.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/arrow-down.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/dialog-close.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/document-export.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/document-import.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/document-new.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/document-open-folder.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/edit-copy.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/edit-cut.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/edit-delete.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/edit-rename.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/edit-text-frame-update.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/folder-yellow.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/folder.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/go-down.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/go-up.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/tab-close.png (100%)
 create mode 100644 static/plugin_dbui/resources/icons/oxygen/16x16/text-csv.png
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/text-field.png (100%)
 create mode 100644 static/plugin_dbui/resources/icons/oxygen/16x16/text-x-tex.png
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/user-identity.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/vcs_update.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/view-form-table.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/view-form.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/view-refresh.png (100%)
 rename static/plugin_dbui/resources/icons/oxygen/{ => 16x16}/window-close.png (100%)

diff --git a/static/plugin_dbui/locale/dbui-lang-fr.js b/static/plugin_dbui/locale/dbui-lang-fr.js
index e41af98d..73581d72 100644
--- a/static/plugin_dbui/locale/dbui-lang-fr.js
+++ b/static/plugin_dbui/locale/dbui-lang-fr.js
@@ -63,6 +63,13 @@ Ext.define('App.local.fr.grid.button.ExpertMenu', {
     textReset   : 'Reset'
 });
 
+Ext.define('App.local.fr.grid.plugin.Export', {
+    override: 'App.grid.plugin.Export',
+    textToCSV   : 'Exporter en CSV...',
+    textToLaTeX : 'Exporter en LaTeX...',
+    textToPDF   : 'Exporter en PDF...'
+});
+
 Ext.define('App.local.fr.grid.plugin.Paging', {
     override: 'App.grid.plugin.Paging',
     textPlus   : 'Plus',
diff --git a/static/plugin_dbui/resources/css/kde-oxygen.css b/static/plugin_dbui/resources/css/kde-oxygen.css
index da0abe8a..bc782f9e 100644
--- a/static/plugin_dbui/resources/css/kde-oxygen.css
+++ b/static/plugin_dbui/resources/css/kde-oxygen.css
@@ -5,61 +5,76 @@
  */
 
 .xaction-create {
-     background-image: url(../icons/oxygen/document-new.png);
+     background-image: url(../icons/oxygen/16x16/document-new.png);
      background-repeat: no-repeat;
 }
 
 .xaction-duplicate {
-     background-image: url(../icons/oxygen/edit-copy.png);
+     background-image: url(../icons/oxygen/16x16/edit-copy.png);
      background-repeat: no-repeat;
 }
 
 .xaction-destroy {
-     background-image: url(../icons/oxygen/edit-delete.png);
+     background-image: url(../icons/oxygen/16x16/edit-delete.png);
      background-repeat: no-repeat;
 }
 
 .xaction-download {
-     background-image: url(../icons/oxygen/go-down.png);
+     background-image: url(../icons/oxygen/16x16/go-down.png);
      background-repeat: no-repeat;
 }
 
 .xaction-export {
-     background-image: url(../icons/oxygen/document-export.png);
+     background-image: url(../icons/oxygen/16x16/document-export.png);
      background-repeat: no-repeat;
 }
 
 .xaction-go-down {
-     background-image: url(../icons/oxygen/go-down.png);
+     background-image: url(../icons/oxygen/16x16/go-down.png);
      background-repeat: no-repeat;
 }
 
 .xaction-go-up {
-     background-image: url(../icons/oxygen/go-up.png);
+     background-image: url(../icons/oxygen/16x16/go-up.png);
      background-repeat: no-repeat;
 }
 
 .xaction-import {
-     background-image: url(../icons/oxygen/document-import.png);
+     background-image: url(../icons/oxygen/16x16/document-import.png);
      background-repeat: no-repeat;
 }
 
 .xaction-update {
-     background-image: url(../icons/oxygen/edit-text-frame-update.png);
+     background-image: url(../icons/oxygen/16x16/edit-text-frame-update.png);
      background-repeat: no-repeat;
 }
 
 .xaction-view {
-     background-image: url(../icons/oxygen/view-form.png);
+     background-image: url(../icons/oxygen/16x16/view-form.png);
      background-repeat: no-repeat;
 }
 
 .xapplication-exit {
-     background-image: url(../icons/oxygen/application-exit.png);
+     background-image: url(../icons/oxygen/16x16/application-exit.png);
+     background-repeat: no-repeat;
+}
+
+.xminetype-csv {
+     background-image: url(../icons/oxygen/16x16/text-csv.png);
+     background-repeat: no-repeat;
+}
+
+.xminetype-tex {
+     background-image: url(../icons/oxygen/16x16/text-x-tex.png);
+     background-repeat: no-repeat;
+}
+
+.xminetype-pdf {
+     background-image: url(../icons/oxygen/16x16/application-pdf.png);
      background-repeat: no-repeat;
 }
 
 .xuser-identity {
-     background-image: url(../icons/oxygen/user-identity.png);
+     background-image: url(../icons/oxygen/16x16/user-identity.png);
      background-repeat: no-repeat;
 }
diff --git a/static/plugin_dbui/resources/icons/oxygen/application-exit.png b/static/plugin_dbui/resources/icons/oxygen/16x16/application-exit.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/application-exit.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/application-exit.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/16x16/application-pdf.png b/static/plugin_dbui/resources/icons/oxygen/16x16/application-pdf.png
new file mode 100644
index 0000000000000000000000000000000000000000..ad6a39f3f2385bec3a40b9e03484f636a5c3bfc8
GIT binary patch
literal 685
zcmV;e0#f~nP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L02{9W02{9XUK)`c00007bV*G`2ipMw
z5*z@?BqG`X00J#ZL_t(I%Z-!0OIuMG#((FW8>80N7)e1W)#_k_AFUnS1aa)<qH%Tc
zUuYeKLWgRh6uRqd1PQoEFu3U|h;}Pnhu%bzn-8n;CfB?jB$8+>eaFLjp67So^S%n8
zx3{+|m&=U-7XMd%Fc>`bJg-<kn39GnJC2mk&g5SOyr&`20JzyK>12`@v$JIP_IRc>
zCKyDNLIFxC1n3Ee?=<>8TP>d_x4%#C%nTQ)6v`Nk)@Wl;TBCKdr0LCCDPArvavF<a
z`97vvZ4xM@K%~i_+0GcKR2bXZ;xduodV3qovakXHtUv%`S!m08+~5w?_j$FxPJ4GZ
z?&v6fB7y1bL@9Mk@tA=&24f6bYc%j=VuHxY3Etr$PBhBp?k=^qw)%B>NKhARO)Zll
z(AS43MaSA2-KiA$-CceT4Df4yo;OOh(`s<)-&Hw2Mh_2DxVqwSbCY5`PBoV!vb-#z
zp&@k^kN<AeO^b+Jm&@XLo>V+fa;vM7KRS{h{r!#eQ_H)qyqlQ#FfuZtTM{6G0Dlq*
z$~!xBEG+@xx~^m#N6jxRd@7YnUv1m2J?Mb|H;zMkd>m_Pis#8BU4w%F;%2jIE*ATe
zNvA*CwtaIycUnZGT&ajNHz&D`4Jp~SoS&b|!NEbTSS-rxX!Kh+9B#WWtP|93V_crC
ztl;}TDiQ&pr>93vPELMLJI+Vfbt|o!PAC+5S|}9Ww%QHgA`}W87Yc=HtG)gUes>uC
TL**xU00000NkvXXu0mjf1qvsY

literal 0
HcmV?d00001

diff --git a/static/plugin_dbui/resources/icons/oxygen/archive-insert.png b/static/plugin_dbui/resources/icons/oxygen/16x16/archive-insert.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/archive-insert.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/archive-insert.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/archive-remove.png b/static/plugin_dbui/resources/icons/oxygen/16x16/archive-remove.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/archive-remove.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/archive-remove.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/arrow-down.png b/static/plugin_dbui/resources/icons/oxygen/16x16/arrow-down.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/arrow-down.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/arrow-down.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/dialog-close.png b/static/plugin_dbui/resources/icons/oxygen/16x16/dialog-close.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/dialog-close.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/dialog-close.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/document-export.png b/static/plugin_dbui/resources/icons/oxygen/16x16/document-export.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/document-export.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/document-export.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/document-import.png b/static/plugin_dbui/resources/icons/oxygen/16x16/document-import.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/document-import.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/document-import.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/document-new.png b/static/plugin_dbui/resources/icons/oxygen/16x16/document-new.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/document-new.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/document-new.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/document-open-folder.png b/static/plugin_dbui/resources/icons/oxygen/16x16/document-open-folder.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/document-open-folder.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/document-open-folder.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/edit-copy.png b/static/plugin_dbui/resources/icons/oxygen/16x16/edit-copy.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/edit-copy.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/edit-copy.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/edit-cut.png b/static/plugin_dbui/resources/icons/oxygen/16x16/edit-cut.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/edit-cut.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/edit-cut.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/edit-delete.png b/static/plugin_dbui/resources/icons/oxygen/16x16/edit-delete.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/edit-delete.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/edit-delete.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/edit-rename.png b/static/plugin_dbui/resources/icons/oxygen/16x16/edit-rename.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/edit-rename.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/edit-rename.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/edit-text-frame-update.png b/static/plugin_dbui/resources/icons/oxygen/16x16/edit-text-frame-update.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/edit-text-frame-update.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/edit-text-frame-update.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/folder-yellow.png b/static/plugin_dbui/resources/icons/oxygen/16x16/folder-yellow.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/folder-yellow.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/folder-yellow.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/folder.png b/static/plugin_dbui/resources/icons/oxygen/16x16/folder.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/folder.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/folder.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/go-down.png b/static/plugin_dbui/resources/icons/oxygen/16x16/go-down.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/go-down.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/go-down.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/go-up.png b/static/plugin_dbui/resources/icons/oxygen/16x16/go-up.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/go-up.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/go-up.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/tab-close.png b/static/plugin_dbui/resources/icons/oxygen/16x16/tab-close.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/tab-close.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/tab-close.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/16x16/text-csv.png b/static/plugin_dbui/resources/icons/oxygen/16x16/text-csv.png
new file mode 100644
index 0000000000000000000000000000000000000000..4f9e1981e72948a74f66e07c6e6c570f58dcc563
GIT binary patch
literal 705
zcmV;y0zUnTP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L02{9W02{9XUK)`c00007bV*G`2ipM!
z01+=nn}LS_00KctL_t(I%axPgOH*MO$3O2mb8EKdiRH}*y;)tPauk}nSf)V`K~Z+)
zzu-;LMbu3ZL`0bjV#f>rjIN?Ww2Qn@!mWjscp-H$ZJsr)v9q&1T};Q83iZIl`||KU
z&-cg6qX0soP#~Af^#C6JEnJ_^_o-AW{oE~_mH!Oj5)Fttz_W=7&cx$5r4oKmg-5CL
zXi|G13hwp2rs%fdZw=Oav_@VxZ{EOD{mr>pAN{djJPK}ItmPpcz8M$zZVcn~sCrM6
z=ILaDnIpHUEP((=4-1J`3Z=jwfaCeM6kVN4TWF6d!!>0kxjrTG=5sAaEfJ9|5fO=<
z?h+9Z*L7uaaZ!NFdn8OJU(nLPNeMupcK5c`PNkZVRRe<=fNN8r?^Ig@@b!5&ny-y;
zI7~L1WpZ*7uh)xdnpc3AO&(auB=`GGPM(OMlwv8BW^myn03#zKXqtv;nxxa|gBi@t
zy`!t^6acAIik|Ln-p|jI%jF1%!#Iv3vB5!gti3%7EHn+UEQ@F~imvMb<nwv5*(_sY
zW4nOzYkOP8<MF#?*L{-7WU5Ujj*pL1EEehP?4+ZkgL1iy<2V4=wk=<lmsS73z=KWO
zewxW-s(XIHvMhW)U)}9$wTj>G2ax>crn)*h`gmh~{o&f$TIE0wW@l#s&@>HA(`eCk
z=`l@Z_Vy-zY;4@IZQI#zyM{zWR##W+%i_AO6bc1dSy_=tB$5aQgTDP5JphJbd{9aa
n{Vi!HwhY5a7Yc>)egpmhh%+siFILRU00000NkvXXu0mjf%kDo~

literal 0
HcmV?d00001

diff --git a/static/plugin_dbui/resources/icons/oxygen/text-field.png b/static/plugin_dbui/resources/icons/oxygen/16x16/text-field.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/text-field.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/text-field.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/16x16/text-x-tex.png b/static/plugin_dbui/resources/icons/oxygen/16x16/text-x-tex.png
new file mode 100644
index 0000000000000000000000000000000000000000..1bd3a794195e9cecb5cc5776b1bce35ca26b5ba4
GIT binary patch
literal 717
zcmV;;0y6!HP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L02{9W02{9XUK)`c00007bV*G`2ipMw
z5*RjP@^VK200K=(L_t(I%av2VPg7ACJ@@tXH<AK7sa>g59J-kp2r(F&R~ChZ$S90R
zqAaF~gNcLw4KO&-RKhL`17RXY1{Xp?XkOosK5F{#_1)g%03{VL(X-s-=AQ36-}%lJ
z05CE#GT=DQJpelX4Kf~&9|l2i*1LGf{{(<1=<65(0LQW*gt*Zzo=707>u9&zh{fYb
z4-8y!wEl<bbQ*($gGi-Ph(@E(G!1$*imy96csw(MWGaP?jSXyXZ(ngDmuI$6D7@I)
z+r!J{Weg7wLn(!9Hj6|efxFo(bX`ZoG?B~YFgZDiN~Q7{z>h1_W@l#+b~@PI-9<j1
z$J0^?D=RDTeIF4`!>iR*Oixc^YisLPS09n23_~t1E>d;7EE@(%ve|6%=;(+C2M6?h
zp9>2MJrhf~zP5<2LkIz(X=wXC*4Niz+cxs~JWftdkjv#zEEci0wsyOMTCK*ZsVUa$
zb(YIzlB8*x+~414*y+%+EIN+!cLj!Fz%UG)o}S|S;UTJ<n`qcJzSL@1T3UjX60ul}
zh4FC#pngNauk&*TLBOt*BuObHtJP|MepJ(S`Cww=_1M^$hQCEucDqnvh#&}Xc6O0g
z*L7*u>*D$Re5KWDeK<ZoRyPVz2!MnT0wf`&L^7EK0J^p<p3Tj@Z<yx0hGlhooIe$i
zz-19C1*H^5M@QLewM400{@5_hx325TeoC)^0&uZH0E&bn0RTfoL!wwLelkt-jpuot
z>*ERl$Ye5iJkPs-{cl|2XC{;R=6POtn_s^HUlM07Ix$f<00000NkvXXu0mjfhTk+y

literal 0
HcmV?d00001

diff --git a/static/plugin_dbui/resources/icons/oxygen/user-identity.png b/static/plugin_dbui/resources/icons/oxygen/16x16/user-identity.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/user-identity.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/user-identity.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/vcs_update.png b/static/plugin_dbui/resources/icons/oxygen/16x16/vcs_update.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/vcs_update.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/vcs_update.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/view-form-table.png b/static/plugin_dbui/resources/icons/oxygen/16x16/view-form-table.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/view-form-table.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/view-form-table.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/view-form.png b/static/plugin_dbui/resources/icons/oxygen/16x16/view-form.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/view-form.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/view-form.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/view-refresh.png b/static/plugin_dbui/resources/icons/oxygen/16x16/view-refresh.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/view-refresh.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/view-refresh.png
diff --git a/static/plugin_dbui/resources/icons/oxygen/window-close.png b/static/plugin_dbui/resources/icons/oxygen/16x16/window-close.png
similarity index 100%
rename from static/plugin_dbui/resources/icons/oxygen/window-close.png
rename to static/plugin_dbui/resources/icons/oxygen/16x16/window-close.png
diff --git a/static/plugin_dbui/src/grid/plugin/Export.js b/static/plugin_dbui/src/grid/plugin/Export.js
index d660ca85..89e1f00e 100644
--- a/static/plugin_dbui/src/grid/plugin/Export.js
+++ b/static/plugin_dbui/src/grid/plugin/Export.js
@@ -1,6 +1,10 @@
 /**
- * The plugin to export the content of the grid into a file.
- * Several format are available: CSV, latex, pdf, ...
+ * The plugin export the content of the grid, as display on the screen,
+ * into a file. Several formats are available: CSV, LaTex and PDF.
+ *
+ * A context menu gives access to the different possibilities.
+ *
+ * @since 0.6.1.7
  *
  */
 Ext.define('App.grid.plugin.Export', {
@@ -8,10 +12,33 @@ Ext.define('App.grid.plugin.Export', {
     extend: 'Ext.AbstractPlugin',
     alias: 'plugin.pGridExport',
 
+    /**
+     * @cfg {String}
+     * The CSV delimiter for stirng.
+     */
     delimiter: '"',
+
+    /**
+     * @cfg {String}
+     * The new line separator used in the CSV file.
+     */
     newLine: '\n',
+
+    /**
+     * @cfg {String}
+     * The CSV field separator.
+     *
+     */
     separator: ',',
 
+    // private properties for internationalization
+    textToCSV: 'Export to CSV...',
+    textToLaTeX: 'Export to LaTeX...',
+    textToPDF: 'Export to PDF...',
+
+    // private short cut
+    menu: null,
+
     // Pre-defined configuration
     pluginId: 'gridExport',
 
@@ -25,8 +52,36 @@ Ext.define('App.grid.plugin.Export', {
 
         "use strict";
 
+        // keep track of the grid
         this.setCmp(grid);
 
+        // the context menu
+        this.menu = Ext.create('Ext.menu.Menu', {
+            items : [{
+                text: this.textToCSV,
+                iconCls: 'xminetype-csv',
+                handler: this.toCSV,
+                scope: this
+            }, {
+                text: this.textToLaTeX,
+                iconCls: 'xminetype-tex',
+                handler: this.toLaTeX,
+                scope: this
+            }, {
+                text: this.textToPDF,
+                iconCls: 'xminetype-pdf',
+                handler: this.toPDF,
+                scope: this
+            }]
+        });
+
+        grid.on({
+            'containercontextmenu': this.onContainerContextMenu,
+            'headercontextmenu': this.onHeaderContextMenu,
+            'itemcontextmenu': this.onItemContextMenu,
+            scope: this
+        });
+
     },
 
     // private
@@ -41,10 +96,61 @@ Ext.define('App.grid.plugin.Export', {
         return value;
     },
 
+    /**
+     * Show the context menu when right clicking in an empty grid.
+     *
+     * @param {App.grid.Panel} grid
+     * @param {Ext.EventObject} event
+     * @param {Object} eOpts
+     *
+     */
+    onContainerContextMenu: function (grid, event, eOpts) {
+
+        "use strict";
+
+        event.stopEvent();
+        this.menu.showAt(event.getXY());
+    },
+
+    /**
+     * Inhibit the context menu when right clicking in the grid header.
+     *
+     * @param {Ext.grid.header.Container} gridheader
+     * @param {Ext.grid.column.Column} column
+     * @param {Ext.EventObject} event
+     * @param {HTMLElement} html
+     * @param {Object} eOpts
+     *
+     */
+    onHeaderContextMenu: function (gridheader, colum, event, html, eOpts) {
+
+        "use strict";
+        event.stopEvent();
+    },
+
+    /**
+     * Show the context menu when right clicking in the non-empty grid.
+     *
+     * @param {Ext.view.View} view
+     * @param {Ext.data.Model} record
+     * @param {HTMLElement} item
+     * @param {Ext.EventObject} event
+     * @param {Object} eOpts
+     *
+     */
+    onItemContextMenu: function (view, record, item, index, event, eOpts) {
+
+        "use strict";
+
+        event.stopEvent();
+        this.menu.showAt(event.getXY());
+    },
+
     /**
      * Export the content of the grid as a CSV file.
      * The method scan the HTML to find the rendered headers, rows
      * and cells content.
+     *
      * Hidden columns and rows are ignored.
      */
     toCSV: function () {
@@ -120,5 +226,25 @@ Ext.define('App.grid.plugin.Export', {
         });
         link.dom.click();
         link.destroy();
+    },
+
+    /**
+     * Export the content of the grid as a LaTex file.
+     *
+     */
+    toLaTeX: function () {
+
+       "use strict";
+
+    },
+
+    /**
+     * Export the content of the grid as a PDF file.
+     *
+     */
+    toPDF: function () {
+
+       "use strict";
+
     }
 });
\ No newline at end of file
diff --git a/views/reports/report_4.html b/views/reports/report_4.html
index e0af6328..95887ef0 100644
--- a/views/reports/report_4.html
+++ b/views/reports/report_4.html
@@ -1,4 +1,3 @@
-Click on a row to launch the export ...
 {{
     #--------------------------------------------------------------------------
     #
@@ -45,8 +44,4 @@ Click on a row to launch the export ...
         renderTo: 'grid-{{=divgrid}}'
     });
 
-    grid.on('select', function () {
-        this.getPlugin('gridExport').toCSV();
-    }, grid);
-
 </script>
-- 
GitLab