Commit ab1ad3bd authored by Ciro Santilli's avatar Ciro Santilli

Only run namespace select js when needed

Only needed in admin/projects.
parent c3b81e5f
...@@ -81,7 +81,11 @@ class Dispatcher ...@@ -81,7 +81,11 @@ class Dispatcher
shortcut_handler = true shortcut_handler = true
switch path.first() switch path.first()
when 'admin' then new Admin() when 'admin'
new Admin()
switch path[1]
when 'projects'
new NamespaceSelect()
when 'dashboard' when 'dashboard'
shortcut_handler = new ShortcutsDashboardNavigation() shortcut_handler = new ShortcutsDashboardNavigation()
when 'projects' when 'projects'
......
$ -> class @NamespaceSelect
constructor: ->
namespaceFormatResult = (namespace) -> namespaceFormatResult = (namespace) ->
markup = "<div class='namespace-result'>" markup = "<div class='namespace-result'>"
markup += "<span class='namespace-kind'>" + namespace.kind + "</span>" markup += "<span class='namespace-kind'>" + namespace.kind + "</span>"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment