changeset 1259:bfdd875cdb5f

Add tooltip to DynamicGrid
author Evi Huber <ehuber@bfs.de>
date Fri, 25 Nov 2016 13:21:24 +0100
parents 835042fa1a1d
children 96f9417c105e
files app/view/widget/DynamicGrid.js resources/i18n/Lada_de-DE.properties
diffstat 2 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/widget/DynamicGrid.js	Fri Nov 25 10:45:45 2016 +0100
+++ b/app/view/widget/DynamicGrid.js	Fri Nov 25 13:21:24 2016 +0100
@@ -34,7 +34,6 @@
      */
     setStore: function(store){
         var i18n = Lada.getApplication().bundle;
-
         this.reconfigure(store);
         var ptbar = this.down('pagingtoolbar');
         if (ptbar) {
@@ -73,6 +72,17 @@
     generateColumnsAndFields: function(cols) {
         var resultColumns = [];
         var fields = [];
+        var i18n = Lada.getApplication().bundle;
+        switch(this.xtype) {
+            case 'probelistgrid':
+                var tooltiptext = i18n.getMsg('probe')+' '+i18n.getMsg('open');
+                break;
+            case 'messunglistgrid':
+                var tooltiptext = i18n.getMsg('messung')+' '+i18n.getMsg('open');
+                break;
+            case 'messprogrammelistgrid':
+                var tooltiptext = i18n.getMsg('messprogramm')+' '+i18n.getMsg('open');
+        }
 
         fields.push(new Ext.data.Field({
             name: 'owner'
@@ -92,7 +102,7 @@
             text: 'RW',
             dataIndex: 'readonly',
             sortable: false,
-            tooltip: 'Probe öffnen',
+            tooltip: tooltiptext,
             width: 30,
             getClass: function (val, meta, rec) {
                 if (rec.get('readonly') === false &&
@@ -113,6 +123,7 @@
             },
             handler: function(grid, rowIndex, colIndex) {
                 var rec = grid.getStore().getAt(rowIndex);
+                var tooltext = rec.proxy.url;
                 grid.fireEvent('itemdblclick', grid, rec);
              }
         });
--- a/resources/i18n/Lada_de-DE.properties	Fri Nov 25 10:45:45 2016 +0100
+++ b/resources/i18n/Lada_de-DE.properties	Fri Nov 25 13:21:24 2016 +0100
@@ -61,6 +61,7 @@
 
 probe:Probe
 messung:Messung
+messprogramm:Messprogramm
 name:Name
 mprId:Mpr-Id
 mstId:Messstelle
@@ -340,3 +341,8 @@
 
 statusSetzen:Status setzen
 statusSetzen.win.title:Status setzen
+
+##
+# Action
+##
+open:öffnen

http://lada.wald.intevation.org