diff options
-rwxr-xr-x | src/main/webapp/WEB-INF/tags/common/head.tagx | 2 | ||||
-rwxr-xr-x | src/main/webapp/WEB-INF/urlrewrite.xml | 4 | ||||
-rw-r--r-- | src/main/webapp/apps/app.js | 8 | ||||
-rw-r--r-- | src/main/webapp/apps/core/navbar.html | 21 | ||||
-rwxr-xr-x | src/main/webapp/apps/frontPageApp/frontPage.html | 4 | ||||
-rwxr-xr-x | src/main/webapp/apps/frontPageApp/frontPageApp.js | 2 | ||||
-rwxr-xr-x | src/main/webapp/apps/personApp/person.html | 2 | ||||
-rwxr-xr-x | src/main/webapp/apps/personApp/personApp.js | 4 | ||||
-rw-r--r-- | src/main/webapp/index.jspx | 5 |
9 files changed, 41 insertions, 11 deletions
diff --git a/src/main/webapp/WEB-INF/tags/common/head.tagx b/src/main/webapp/WEB-INF/tags/common/head.tagx index 0ad2ba2..0f288fb 100755 --- a/src/main/webapp/WEB-INF/tags/common/head.tagx +++ b/src/main/webapp/WEB-INF/tags/common/head.tagx @@ -9,7 +9,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title><c:if test="${not empty title }">${title } - </c:if>Yeah</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <link type="text/css" rel="stylesheet" href="/external/bootstrap-2.2.2/css/bootstrap.css"/> + <link type="text/css" rel="stylesheet" href="/external/bootstrap-2.2.2/css/bootstrap-responsive.css"/> <link type="text/css" rel="stylesheet" href="/external/angular-ui/ng-grid-1.5.0/ng-grid.css"/> <link type="text/css" rel="stylesheet" href="/apps/app.css"/> diff --git a/src/main/webapp/WEB-INF/urlrewrite.xml b/src/main/webapp/WEB-INF/urlrewrite.xml index a649f8b..a4834c9 100755 --- a/src/main/webapp/WEB-INF/urlrewrite.xml +++ b/src/main/webapp/WEB-INF/urlrewrite.xml @@ -16,13 +16,13 @@ </rule> <rule match-type="regex"> - <from>^/person/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$</from> + <from>^/person/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/?$</from> <set type="parameter" name="uuid">$1</set> <to type="forward">/person/person.jspx</to> </rule> <rule match-type="regex"> - <from>^/person/([-_0-9A-Za-z]{22})$</from> + <from>^/person/([-_0-9A-Za-z]{22})/?$</from> <set type="parameter" name="uuid">$1</set> <to type="forward">/person/person.jspx</to> </rule> diff --git a/src/main/webapp/apps/app.js b/src/main/webapp/apps/app.js index e69de29..c1ea158 100644 --- a/src/main/webapp/apps/app.js +++ b/src/main/webapp/apps/app.js @@ -0,0 +1,8 @@ +var directives = angular.module('core.directives', []); + +directives.directive('navbar', function () { + return { + restrict: 'E', + templateUrl: '/apps/core/navbar.html' + }; +}); diff --git a/src/main/webapp/apps/core/navbar.html b/src/main/webapp/apps/core/navbar.html new file mode 100644 index 0000000..fa0074c --- /dev/null +++ b/src/main/webapp/apps/core/navbar.html @@ -0,0 +1,21 @@ +<div class="navbar"> + <div class="navbar-inner"> + <div class="container"> + <span class="brand">Wat</span> + <div class="nav-collapse collapse"> + <ul class="nav"> + <li class=""><a href="/">Home</a></li> + <li class=""><a href="/jenkins">Jenkins</a></li> + <!-- + <li class=""><a href="./getting-started.html">Get started</a></li> + <li class=""><a href="./scaffolding.html">Scaffolding</a></li> + <li class=""><a href="./base-css.html">Base CSS</a></li> + <li class="active"><a href="./components.html">Components</a></li> + <li class=""><a href="./javascript.html">JavaScript</a></li> + <li class=""><a href="./customize.html">Customize</a></li> + --> + </ul> + </div> + </div> + </div> +</div> diff --git a/src/main/webapp/apps/frontPageApp/frontPage.html b/src/main/webapp/apps/frontPageApp/frontPage.html index 5cdea9a..3c433ee 100755 --- a/src/main/webapp/apps/frontPageApp/frontPage.html +++ b/src/main/webapp/apps/frontPageApp/frontPage.html @@ -1,4 +1,6 @@ <div class="container"> + <navbar/> +<!-- <ng-include src="'/apps/core/navbar.html'" /> --> <div class="page-header"> <h1>Newcomers</h1> @@ -12,7 +14,7 @@ </thead> <tbody> <tr ng-repeat="person in persons.rows"> - <td><a href="/person/{{person.uuid}}">{{person.name}}</a></td> + <td><a href="/person/{{person.uuid}}/">{{person.name}}</a></td> <td>{{person.badges.length}}</td> </tr> </tbody> diff --git a/src/main/webapp/apps/frontPageApp/frontPageApp.js b/src/main/webapp/apps/frontPageApp/frontPageApp.js index 21bc91f..624c484 100755 --- a/src/main/webapp/apps/frontPageApp/frontPageApp.js +++ b/src/main/webapp/apps/frontPageApp/frontPageApp.js @@ -1,6 +1,6 @@ 'use strict'; -var frontPageApp = angular.module('frontPageApp', ['ngGrid', 'person', 'pagingTableService']).config(function ($routeProvider, $locationProvider) { +var frontPageApp = angular.module('frontPageApp', ['ngGrid', 'person', 'pagingTableService', 'core.directives']).config(function ($routeProvider, $locationProvider) { $routeProvider. when('/', {controller: FrontPageCtrl, templateUrl: '/apps/frontPageApp/frontPage.html?noCache=' + noCache}); }); diff --git a/src/main/webapp/apps/personApp/person.html b/src/main/webapp/apps/personApp/person.html index 056545f..3544221 100755 --- a/src/main/webapp/apps/personApp/person.html +++ b/src/main/webapp/apps/personApp/person.html @@ -1,5 +1,7 @@ <div class="container"> + <navbar/> + <div class="page-header"> <h1>{{person.name}}</h1> </div> diff --git a/src/main/webapp/apps/personApp/personApp.js b/src/main/webapp/apps/personApp/personApp.js index e8ef1d5..363e498 100755 --- a/src/main/webapp/apps/personApp/personApp.js +++ b/src/main/webapp/apps/personApp/personApp.js @@ -1,6 +1,6 @@ 'use strict'; -var personApp = angular.module('personApp', ['person', 'build', 'pagingTableService']).config(function ($routeProvider, $locationProvider) { +var personApp = angular.module('personApp', ['person', 'build', 'pagingTableService', 'core.directives']).config(function ($routeProvider, $locationProvider) { $routeProvider. when('/', {controller: PersonCtrl, templateUrl: '/apps/personApp/person.html?noCache=' + noCache}); }); @@ -20,7 +20,7 @@ function PersonCtrl($scope, $routeParams, Person, Build, PagingTableService) { console.log("$scope.builds.length=" + builds.rows.length); if (builds.rows.length == 0) { - queryBuilds(builds); + $scope.builds.first(); } break; } diff --git a/src/main/webapp/index.jspx b/src/main/webapp/index.jspx index 731f35e..adeb687 100644 --- a/src/main/webapp/index.jspx +++ b/src/main/webapp/index.jspx @@ -11,11 +11,6 @@ <body> -<!-- -<div id="content"> - <div class="container" ng-view=""><!– –></div> -</div> ---> <div id="content" ng-view=""><!-- --></div> <common:footer/> |