Other fixes on navegation.
parent
f65c0d7a47
commit
eb3fc22626
|
@ -48,7 +48,6 @@ class MainTaigaController extends taiga.Controller
|
||||||
## Global Page Directive
|
## Global Page Directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
|
|
||||||
MainTaigaDirective = ($log, $compile, $rootscope) ->
|
MainTaigaDirective = ($log, $compile, $rootscope) ->
|
||||||
template = _.template("""
|
template = _.template("""
|
||||||
<h1 class="logo"><a href="" title="Home"><img src="/images/logo.png" alt="Taiga"/></a></h1>
|
<h1 class="logo"><a href="" title="Home"><img src="/images/logo.png" alt="Taiga"/></a></h1>
|
||||||
|
@ -113,6 +112,8 @@ MainTaigaDirective = ($log, $compile, $rootscope) ->
|
||||||
menuDom.empty()
|
menuDom.empty()
|
||||||
menuDom.append(dom)
|
menuDom.append(dom)
|
||||||
|
|
||||||
|
$el.find("nav.menu").removeClass("hidden")
|
||||||
|
|
||||||
sectionName = targetScope.section
|
sectionName = targetScope.section
|
||||||
menuDom.find("a.active").removeClass("active")
|
menuDom.find("a.active").removeClass("active")
|
||||||
menuDom.find("[data-name=#{sectionName}] > a").addClass("active")
|
menuDom.find("[data-name=#{sectionName}] > a").addClass("active")
|
||||||
|
@ -131,11 +132,18 @@ MainTaigaDirective = ($log, $compile, $rootscope) ->
|
||||||
$el.toggleClass("closed-project-nav")
|
$el.toggleClass("closed-project-nav")
|
||||||
$el.toggleClass("open-project-nav")
|
$el.toggleClass("open-project-nav")
|
||||||
|
|
||||||
link = ($scope, $el, $attrs, $ctrl) ->
|
linkMenuNav = ($scope, $el, $attrs, $ctrl) ->
|
||||||
|
$el.find("nav.menu").addClass("hidden")
|
||||||
|
|
||||||
$scope.$on "$viewContentLoaded", (ctx) ->
|
$scope.$on "$viewContentLoaded", (ctx) ->
|
||||||
|
if ctx.targetScope.$$childHead is null
|
||||||
|
$log.error "No scope found for render menu."
|
||||||
|
else
|
||||||
renderMainMenu($el, ctx.targetScope.$$childHead)
|
renderMainMenu($el, ctx.targetScope.$$childHead)
|
||||||
|
|
||||||
|
link = ($scope, $el, $attrs, $ctrl) ->
|
||||||
linkProjecsNav($scope, $el, $attrs, $ctrl)
|
linkProjecsNav($scope, $el, $attrs, $ctrl)
|
||||||
|
linkMenuNav($scope, $el, $attrs, $ctrl)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
controller: MainTaigaController
|
controller: MainTaigaController
|
||||||
|
|
|
@ -216,7 +216,6 @@ IssuesDirective = ($log, $location) ->
|
||||||
$ctrl.selectFilter("page", pagenum)
|
$ctrl.selectFilter("page", pagenum)
|
||||||
$ctrl.loadIssues()
|
$ctrl.loadIssues()
|
||||||
|
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
## Issues Filters
|
## Issues Filters
|
||||||
#########################
|
#########################
|
||||||
|
|
Loading…
Reference in New Issue