Skip to content

Commit

Permalink
fix(secondaryNavigation): Minor fixes
Browse files Browse the repository at this point in the history
- changed default target behaviour in breadcrumbs to nothing (open in
same frame/window)
- made the glyphicon color override more specific
- fixed application title bug
- removed old function from app.js
  • Loading branch information
atruskie committed Apr 1, 2016
1 parent d752b5d commit 0c8bc2f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
23 changes: 1 addition & 22 deletions src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,27 +375,6 @@ angular.module("baw",
};
UserProfile.listen(eventCallbacks);

// helper function for printing scope objects
/*baw.exports.print = $rootScope.print = function () {
var seen = [];
var badKeys = ["$digest", "$$watchers", "$$childHead", "$$childTail", "$$listeners", "$$nextSibling",
"$$prevSibling", "$root", "this", "$parent"];
var str = JSON.stringify(this,
function (key, val) {
if (badKeys.indexOf(key) >= 0) {
return "[Can't do that]";
}
if (typeof val === "object") {
if (seen.indexOf(val) >= 0) {
return "";
}
seen.push(val);
}
return val;
}, 4);
return str;
};*/


// http://www.yearofmoo.com/2012/10/more-angularjs-magic-to-supercharge-your-webapp.html#apply-digest-and-phase
$rootScope.$safeApply = function ($scope, fn) {
Expand Down Expand Up @@ -438,7 +417,7 @@ angular.module("baw",
// https://docs.angularjs.org/api/ngRoute/service/$route
$rootScope.$on("$routeChangeSuccess", function (event, current, previous, rejection) {

let title = $route.current && ( "|" + $route.current.title) || "";
let title = $route.current && ( " | " + $route.current.title) || "";
document.title = appEnvironment.brand.title + title;
$rootScope.fullWidth = $route.current.$$route.fullWidth;
});
Expand Down
2 changes: 1 addition & 1 deletion src/app/navigation/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ left-nav-bar, right-nav-bar {
}

right-nav-bar {
.fa, .glyphicon {
a>.fa, a>.glyphicon {
color: $text-color
}
}
2 changes: 1 addition & 1 deletion src/app/navigation/navigation.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<li ng-repeat="breadcrumb in $ctrl.crumbs"
ng-class="{ active: $last }">
<a ng-if="!$last"
target="{{ breadcrumb.target || 'self' }}"
target="{{ breadcrumb.target || '' }}"
ng-href="{{ breadcrumb.path }}">
{{ breadcrumb.title }}
</a>
Expand Down

0 comments on commit 0c8bc2f

Please sign in to comment.