Signed-off-by: Rafał Miłecki <[email protected]>
---
 luci2/htdocs/luci2/luci2.js | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/luci2/htdocs/luci2/luci2.js b/luci2/htdocs/luci2/luci2.js
index 97e2642..e2b23ea 100644
--- a/luci2/htdocs/luci2/luci2.js
+++ b/luci2/htdocs/luci2/luci2.js
@@ -6301,6 +6301,9 @@ function LuCI2()
                        return s.join('_');
                },
 
+               /*
+                * Creates new value of a given class in the tabless layout
+                */
                option: function(widget, name, options)
                {
                        if (this.tabs.length == 0)
@@ -6323,6 +6326,9 @@ function LuCI2()
                        });
                },
 
+               /*
+                * Creates new value of a given class in a specified tab
+                */
                taboption: function(tabid, widget, name, options)
                {
                        var tab;
@@ -6376,6 +6382,12 @@ function LuCI2()
                        }
                },
 
+               /*
+                * Provides a "list" of packages (AKA configs) needed by this
+                * section.
+                *
+                * @pkg - an object where names of packages have to be set
+                */
                ucipackages: function(pkg)
                {
                        for (var i = 0; i < this.tabs.length; i++)
@@ -7156,6 +7168,10 @@ function LuCI2()
                        });
                },
 
+               /*
+                * Called after fetching data by L.uci. Calls every section's
+                * every "load" handler.
+                */
                _load_cb: function()
                {
                        var deferreds = [ L.deferrable(this.options.prepare()) 
];
@@ -7180,6 +7196,10 @@ function LuCI2()
                        return $.when.apply($, deferreds);
                },
 
+               /*
+                * Builds an array of required packages (AKA configs) and
+                * requests L.uci to fetch them.
+                */
                load: function()
                {
                        var self = this;
@@ -7356,6 +7376,10 @@ function LuCI2()
                        this.target.show();
                },
 
+               /*
+                * Creates new section of a given class, stores it internally
+                * and returns.
+                */
                section: function(widget, uci_type, options)
                {
                        var w = widget ? new widget(uci_type, options) : null;
@@ -7500,6 +7524,9 @@ function LuCI2()
                        return self.insertInto(self.target);
                },
 
+               /*
+                * Builds and renders Map into a DOM node of specified id
+                */
                insertInto: function(id)
                {
                        var self = this;
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to