GUAC-586: Associate CSS class names with page definitions.

This commit is contained in:
Michael Jumper
2015-08-28 17:48:23 -07:00
parent 6f0079d778
commit cff2b7a857
2 changed files with 12 additions and 2 deletions

View File

@@ -22,7 +22,7 @@
-->
<!-- Navigation links -->
<li ng-repeat="page in pages">
<li ng-repeat="page in pages" class="{{page.className}}">
<a class="home" ng-click="navigateToPage(page)"
ng-class="{current: isCurrentPage(page)}" href="#{{page.url}}">
{{page.name | translate}}

View File

@@ -35,8 +35,11 @@ angular.module('navigation').factory('PageDefinition', [function definePageDefin
*
* @param {String} url
* The URL of the page.
*
* @param {String} [className='']
* The CSS class name to associate with this page, if any.
*/
var PageDefinition = function PageDefinition(name, url) {
var PageDefinition = function PageDefinition(name, url, className) {
/**
* The the name of the page, which should be a translation table key.
@@ -52,6 +55,13 @@ angular.module('navigation').factory('PageDefinition', [function definePageDefin
*/
this.url = url;
/**
* The CSS class name to associate with this page, if any.
*
* @type String
*/
this.className = className || '';
};
return PageDefinition;