Merge pull request #484 from LuttyYang/master
authorHannu Nyman <hannu.nyman@iki.fi>
Sat, 26 Sep 2015 15:29:12 +0000 (18:29 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 26 Sep 2015 15:29:12 +0000 (18:29 +0300)
luci-theme-material: add button select and input theme

applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua
applications/luci-app-firewall/po/pl/firewall.po
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua
documentation/SubmitPatchesHowTo:.md [deleted file]
modules/luci-base/po/pl/base.po
modules/luci-base/root/etc/config/luci
modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/ipkg.lua
modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua
modules/luci-mod-rpc/luasrc/controller/rpc.lua

index 46b3744..6c90476 100644 (file)
@@ -60,7 +60,7 @@ s:tab("advanced", translate("Advanced Settings"))
 name = s:taboption("general", Value, "name", translate("Name"))
 name.optional = false
 name.forcewrite = true
-name.datatype = "uciname"
+name.datatype = "and(uciname,maxlength(14))"
 
 function name.write(self, section, value)
        if zone:name() ~= value then
@@ -76,15 +76,6 @@ function name.write(self, section, value)
        }
 end
 
-function name.validate(self, value)
-       -- fw3 defines 14 as the maximum length of zone name
-       if #value > 14 then
-               return nil, translate("Zone name is too long")
-       else
-               return value
-       end
-end
-
 p = {
        s:taboption("general", ListValue, "input", translate("Input")),
        s:taboption("general", ListValue, "output", translate("Output")),
index 18be74d..2ccd25c 100644 (file)
@@ -301,7 +301,7 @@ msgid "Restrict Masquerading to given destination subnets"
 msgstr "Ogranicz maskaradę do wskazanych sieci docelowych"
 
 msgid "Restrict Masquerading to given source subnets"
-msgstr "Ogranicz maskaradÄ\99 do wskazanych sieci Å¼ródłowych"
+msgstr "Ogranicz maskaradÄ\99 do wskazanych sieci Åºródłowych"
 
 # Wstawiłem rodzinę gdyż gdzieś wcześniej było tak opisane ale klasa pasuje mi tu bardziej.
 # Obsy - niestety ale "rodzina". W gui dotyczy to wyboru IPv4/IPv6, więc "rodzina" a nie klasa.
@@ -317,7 +317,7 @@ msgid ""
 "Rewrite matched traffic to the given source port. May be left empty to only "
 "rewrite the IP address."
 msgstr ""
-"Przepisz dopasowany ruch do danego portu Å¼ródłowego. Można zostawić puste "
+"Przepisz dopasowany ruch do danego portu Åºródłowego. Można zostawić puste "
 "aby przepisać tylko adres IP"
 
 msgid "Rewrite to source %s"
@@ -339,7 +339,7 @@ msgid "Source MAC address"
 msgstr "Źródłowy adres MAC"
 
 msgid "Source NAT"
-msgstr "NAT Å¼ródłowy"
+msgstr "NAT Åºródłowy"
 
 # http://www.digipedia.pl/def/doc/id/677604507/name/SNAT/
 msgid ""
@@ -348,7 +348,7 @@ msgid ""
 "multiple WAN addresses to internal subnets."
 msgstr ""
 "SNAT używany jest wtedy, gdy zmieniane są adresy pakietów połączenia "
-"wychodzÄ\85cego, czyli pakiety Å¼ródłowe. Wykonywany jest zawsze po routowaniu "
+"wychodzÄ\85cego, czyli pakiety Åºródłowe. Wykonywany jest zawsze po routowaniu "
 "(POSTROUTING), a więc w chwili, gdy pakiety są gotowe opuścić host. "
 "IPmasquerading jest formą SNAT."
 
index 6dc81bc..8b04ab8 100644 (file)
@@ -44,9 +44,6 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                y_max = "100",
                number_format = "%5.1lf%%",
                data = {
-                       sources = {
-                               percent = { "percent" }
-                       },
                        instances = {
                                percent = "charge"
                        },
@@ -77,9 +74,6 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                vlabel = "Minutes",
                number_format = "%.1lfm",
                data = {
-                       sources = {
-                               timeleft = { "timeleft" }
-                       },
                        instances = {
                                timeleft = { "battery" }
                        },
diff --git a/documentation/SubmitPatchesHowTo:.md b/documentation/SubmitPatchesHowTo:.md
deleted file mode 100644 (file)
index cdd1552..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# Checkout svn
-       
-       svn co http://svn.luci.subsignal.org/luci/trunk
-       
-and change to that directory:
-       
-       cd trunk
-       
-# Make your changes
-
-Edit the files you want to change. If you add some new files you need to add them to the svn tree:
-       
-       svn add <dir/files>
-       
-Where <dir/files> are the directories/files you have added. Its possible to specify multiple files/directories here.
-
-# Use svn diff to generate a patch with your changes
-
-To check if your changes look ok first do:
-       
-       svn diff <dir/files>
-       
-and check the output. Again you can specify multiple dirs/directories here.
-
-If everything looks like expected save the patch:
-       
-       svn diff <dir/files> > ./mypatch.patch
-       
-
-# Submit patches
-
-Use the [Ticket system](http://luci.subsignal.org/trac/newticket) to submit your patch.
-
index baa7ab8..e1ec57f 100644 (file)
@@ -42,13 +42,13 @@ msgid "-- match by label --"
 msgstr ""
 
 msgid "1 Minute Load:"
-msgstr "Obciążenie w ciągu 1 minuty:"
+msgstr "Obciążenie 1 min.:"
 
 msgid "15 Minute Load:"
-msgstr "Obciążenie w ciągu 15 minut:"
+msgstr "Obciążenie 15 min.:"
 
 msgid "5 Minute Load:"
-msgstr "Obciążenie w ciągu 5 minut:"
+msgstr "Obciążenie 5 min.:"
 
 msgid "<abbr title=\"Basic Service Set Identifier\">BSSID</abbr>"
 msgstr "<abbr title=\"Basic Service Set Identifier\">BSSID</abbr>"
@@ -1838,7 +1838,7 @@ msgid "Out"
 msgstr "Wychodzące"
 
 msgid "Outbound:"
-msgstr "Wychodzące:"
+msgstr "Wychodzący:"
 
 msgid "Outdoor Channels"
 msgstr "Kanały zewnętrzne"
index c503a8f..baa3ac5 100644 (file)
@@ -1,6 +1,6 @@
 config core main
        option lang auto
-       option mediaurlbase /luci-static/openwrt.org
+       option mediaurlbase /luci-static/bootstrap
        option resourcebase /luci-static/resources
        
 config extern flash_keep
index b01b5db..7c6d7e1 100644 (file)
@@ -11,6 +11,7 @@ f = SimpleForm("ipkgconf", translate("OPKG-Configuration"), translate("General o
 f:append(Template("admin_system/ipkg"))
 
 t = f:field(TextValue, "lines")
+t.wrap = "off"
 t.rows = 10
 function t.cfgvalue()
        return nixio.fs.readfile(ipkgfile) or ""
@@ -28,6 +29,7 @@ g = SimpleForm("distfeedconf", translate("Distribution feeds"),
        translate("Build/distribution specific feed definitions. This file will NOT be preserved in any sysupgrade."))
 
 d = g:field(TextValue, "lines2")
+d.wrap = "off"
 d.rows = 10
 function d.cfgvalue()
        return nixio.fs.readfile(distfeeds) or ""
@@ -45,6 +47,7 @@ h = SimpleForm("customfeedconf", translate("Custom feeds"),
        translate("Custom feed definitions, e.g. private feeds. This file can be preserved in a sysupgrade."))
 
 c = h:field(TextValue, "lines3")
+c.wrap = "off"
 c.rows = 10
 function c.cfgvalue()
        return nixio.fs.readfile(customfeeds) or ""
index 6f78643..60caadb 100644 (file)
@@ -84,11 +84,13 @@ function action_flashops()
                                        fp = io.open(image_tmp, "w")
                                end
                        end
-                       if chunk then
-                               fp:write(chunk)
-                       end
-                       if eof then
-                               fp:close()
+                       if fp then
+                               if chunk then
+                                       fp:write(chunk)
+                               end
+                               if eof then
+                                       fp:close()
+                               end
                        end
                end
        )
index 129ca43..759bb74 100644 (file)
@@ -49,10 +49,10 @@ function rpc_auth()
        server.challenge = function(user, pass)
                local sid, token, secret
 
-               require "luci.config"
+               local config = require "luci.config"
 
                if sys.user.checkpasswd(user, pass) then
-                       local sdat = util.ubus("session", "create", { timeout = luci.config.sauth.sessiontime })
+                       local sdat = util.ubus("session", "create", { timeout = config.sauth.sessiontime })
                        if sdat then
                                sid = sdat.ubus_rpc_session
                                token = sys.uniqueid(16)