Skip to content

Commit

Permalink
Make sure project bar always appears on page load
Browse files Browse the repository at this point in the history
  • Loading branch information
spadgett committed Sep 13, 2017
1 parent b947915 commit 1d6b4f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions app/scripts/directives/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ angular.module('openshiftConsole')
});
};

$scope.$on('$routeChangeSuccess', function() {
var onRouteChange = function() {
var currentProjectName = $routeParams.project;
if ($scope.currentProjectName === currentProjectName) {
// The project hasn't changed.
Expand Down Expand Up @@ -353,7 +353,10 @@ angular.module('openshiftConsole')
} else {
_.set($rootScope, 'view.hasProject', false);
}
});
};

onRouteChange();
$scope.$on('$routeChangeSuccess', onRouteChange);

select
.selectpicker({
Expand Down
6 changes: 3 additions & 3 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10142,8 +10142,7 @@ return n(e, !1);
return s.list().then(function(e) {
l = e.by("metadata.name");
});
};
r.$on("$routeChangeSuccess", function() {
}, S = function() {
var e = a.project;
r.currentProjectName !== e && (r.currentProjectName = e, r.chromeless = "chromeless" === a.view, e && !r.chromeless ? (_.set(n, "view.hasProject", !0), r.canIAddToProject = !1, o.getProjectRules(e).then(function() {
r.currentProjectName === e && (r.canIAddToProject = o.canIAddToProject(e));
Expand All @@ -10154,7 +10153,8 @@ name: r.currentProjectName
}
}), r.currentProject = l[r.currentProjectName], b());
})) : _.set(n, "view.hasProject", !1));
}), v.selectpicker({
};
S(), r.$on("$routeChangeSuccess", S), v.selectpicker({
iconBase: "fa",
tickIcon: "fa-check"
}).change(function() {
Expand Down

0 comments on commit 1d6b4f9

Please sign in to comment.