luci2: convert route config to GridSection
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 13 Feb 2015 22:52:00 +0000 (23:52 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 13 Feb 2015 22:52:00 +0000 (23:52 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
luci2/htdocs/luci2/view/network.routes.js

index c60fcf9cb5d645cab485b32f33b5c698da71bcaa..b323c6ea1fe89b571c8304c45ce56d7d3593efbd 100644 (file)
@@ -10,7 +10,7 @@ L.ui.view.extend({
                        readonly:    !self.options.acls.network
                });
 
-               var s4 = m.section(L.cbi.TableSection, 'route', {
+               var s4 = m.section(L.cbi.GridSection, 'route', {
                        caption:     L.tr('Static IPv4 Routes'),
                        anonymous:   true,
                        addremove:   true,
@@ -28,20 +28,23 @@ L.ui.view.extend({
 
                s4.option(L.cbi.InputValue, 'target', {
                        caption:     L.tr('Target'),
-                       datatype:    'ip4addr'
+                       datatype:    'ip4addr',
+                       width:       2
                });
 
                s4.option(L.cbi.InputValue, 'netmask', {
                        caption:     L.tr('IPv4-Netmask'),
                        datatype:    'ip4addr',
                        placeholder: '255.255.255.255',
-                       optional:    true
+                       optional:    true,
+                       width:       2
                });
 
                s4.option(L.cbi.InputValue, 'gateway', {
                        caption:     L.tr('IPv4-Gateway'),
                        datatype:    'ip4addr',
-                       optional:    true
+                       optional:    true,
+                       width:       2
                });
 
                s4.option(L.cbi.InputValue, 'metric', {
@@ -59,7 +62,7 @@ L.ui.view.extend({
                });
 
 
-               var s6 = m.section(L.cbi.TableSection, 'route6', {
+               var s6 = m.section(L.cbi.GridSection, 'route6', {
                        caption:     L.tr('Static IPv6 Routes'),
                        anonymous:   true,
                        addremove:   true,
@@ -77,13 +80,15 @@ L.ui.view.extend({
 
                s6.option(L.cbi.InputValue, 'target', {
                        caption:     L.tr('Target'),
-                       datatype:    'ip6addr'
+                       datatype:    'ip6addr',
+                       width:       3
                });
 
                s6.option(L.cbi.InputValue, 'gateway', {
                        caption:     L.tr('IPv6-Gateway'),
                        datatype:    'ip6addr',
-                       optional:    true
+                       optional:    true,
+                       width:       3
                });
 
                s6.option(L.cbi.InputValue, 'metric', {