diff gnv/src/main/webapp/scripts/viewport.jsp @ 1016:3665834344a8

Issue317: Provide a Comboboy with given WMS instead of an Textfield gnv/trunk@1244 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 29 Jun 2010 15:41:10 +0000
parents e2c4e9886dc3
children cce6596560e6
line wrap: on
line diff
--- a/gnv/src/main/webapp/scripts/viewport.jsp	Tue Jun 29 06:25:28 2010 +0000
+++ b/gnv/src/main/webapp/scripts/viewport.jsp	Tue Jun 29 15:41:10 2010 +0000
@@ -146,13 +146,27 @@
         contentEl: 'cap'
         
     });
-
-    var capfield = new Ext.form.TextField({
+    
+    var capstore = new Ext.data.SimpleStore({
+        fields: ['name','url'],
+        data : [['<bean:message key="gnviewer.mapclient.wms.local.service.name"/>','<%=mapService.getURL()%>'],<jsp:include page="/WEB-INF/config/reachable-servers.conf" />]
+    });
+    capfield = new Ext.form.ComboBox({
         id: 'capfield',
-        region: 'east',
-        width: '100%',
-        renderTo: 'urlinput'
+        store: capstore,
+        displayField:'name',
+        width: 245,
+        valueField: 'url',
+        mode: 'local',
+        triggerAction: 'all',
+        selectOnFocus: true,
+        renderTo: 'urlinput',
+        editable: false,
+        value: '<%=mapService.getURL()%>'
+        
     });
+    
+
 
     var capbutton = new Ext.Button({
         id: 'capbutton',

http://dive4elements.wald.intevation.org