Move footer to its own submodule.

pull/2/head
Kevan Ahlquist 2014-11-12 11:04:04 -06:00
parent 07183e20f1
commit 20b7e16ed4
6 changed files with 12 additions and 11 deletions

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('dockerui', ['ngRoute', 'dockerui.services', 'dockerui.filters', 'masthead'])
angular.module('dockerui', ['ngRoute', 'dockerui.services', 'dockerui.filters', 'masthead', 'footer'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/', {templateUrl: 'partials/dashboard.html', controller: 'DashboardController'});
$routeProvider.when('/containers/', {templateUrl: 'partials/containers.html', controller: 'ContainersController'});

View File

@ -0,0 +1,7 @@
angular.module('footer', [])
.controller('FooterController', ['$scope', 'Settings', function($scope, Settings) {
$scope.template = 'app/components/footer/statusbar.html';
$scope.uiVersion = Settings.uiVersion;
$scope.apiVersion = Settings.version;
}]);

View File

@ -1,4 +1,4 @@
angular.module('masthead', [])
.controller('MastheadController', function($scope) {
.controller('MastheadController', ['$scope', function($scope) {
$scope.template = 'app/components/masthead/masthead.html';
});
}]);

View File

@ -119,13 +119,6 @@ function getChart(id) {
return new Chart(ctx);
}
function StatusBarController($scope, Settings) {
$scope.template = 'partials/statusbar.html';
$scope.uiVersion = Settings.uiVersion;
$scope.apiVersion = Settings.version;
}
function SideBarController($scope, Container, Settings) {
$scope.template = 'partials/sidebar.html';
$scope.containers = [];

View File

@ -38,6 +38,7 @@
<script src="app/controllers.js"></script>
<!-- TODO: Add minification build step -->
<script src="app/components/masthead/mastheadController.js"></script>
<script src="app/components/footer/footerController.js"></script>
<script src="app/viewmodel.js"></script>
<!-- Fav and touch icons -->
@ -56,7 +57,7 @@
<div id="view" ng-view></div>
<div class="container-bottom"></div>
<div ng-include="template" ng-controller="StatusBarController"></div>
<div ng-include="template" ng-controller="FooterController"></div>
</div>