luci2: append markup for uci change indicator when rendering main menu
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 31 Jan 2014 22:00:39 +0000 (22:00 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 31 Jan 2014 22:00:39 +0000 (22:00 +0000)
luci2/htdocs/luci2/luci2.js

index fd2c67165328e8d9dde906f5aeab68eb1520cb7d..6f40b777bafe88952af5cd0dfb8a20dde116ef24 100644 (file)
@@ -3684,6 +3684,18 @@ function LuCI2()
                        }
                }),
 
+               _render_change_indicator: function()
+               {
+                       return $('<ul />')
+                               .addClass('nav navbar-nav navbar-right')
+                               .append($('<li />')
+                                       .append($('<a />')
+                                               .attr('id', 'changes')
+                                               .attr('href', '#')
+                                               .append($('<span />')
+                                                       .addClass('label label-info'))));
+               },
+
                renderMainMenu: _luci2.rpc.declare({
                        object: 'luci2.ui',
                        method: 'menu',
@@ -3694,7 +3706,8 @@ function LuCI2()
 
                                $('#mainmenu')
                                        .empty()
-                                       .append(_luci2.globals.mainMenu.render(0, 1));
+                                       .append(_luci2.globals.mainMenu.render(0, 1))
+                                       .append(_luci2.ui._render_change_indicator());
                        }
                }),