Rename navbar to topbar
This commit is contained in:
parent
a638ec445e
commit
8cc9dafdd2
@ -3,7 +3,7 @@
|
|||||||
angular.module('adagios', [
|
angular.module('adagios', [
|
||||||
'ngRoute',
|
'ngRoute',
|
||||||
'adagios.sidebar',
|
'adagios.sidebar',
|
||||||
'adagios.navbar',
|
'adagios.topbar',
|
||||||
'adagios.tactical'
|
'adagios.tactical'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
<!-- Sidebar -->>
|
<!-- Sidebar -->>
|
||||||
<script src="sidebar/sidebar.js"></script>
|
<script src="sidebar/sidebar.js"></script>
|
||||||
<link rel="stylesheet" href="sidebar/sidebar.css">
|
<link rel="stylesheet" href="sidebar/sidebar.css">
|
||||||
<!-- Navbar -->
|
<!-- Topbar -->
|
||||||
<script src="navbar/navbar.js"></script>
|
<script src="topbar/topbar.js"></script>
|
||||||
<link rel="stylesheet" href="navbar/navbar.css">
|
<link rel="stylesheet" href="topbar/topbar.css">
|
||||||
<!-- Tactical -->
|
<!-- Tactical -->
|
||||||
<script src="tactical/tactical.js"></script>
|
<script src="tactical/tactical.js"></script>
|
||||||
<link rel="stylesheet" href="tactical/tactical.css">
|
<link rel="stylesheet" href="tactical/tactical.css">
|
||||||
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
<sidebar></sidebar>
|
<sidebar></sidebar>
|
||||||
|
|
||||||
<navbar></navbar>
|
<topbar></topbar>
|
||||||
|
|
||||||
|
|
||||||
<div ng-view id="page" class="content"></div>
|
<div ng-view id="page" class="content"></div>
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
angular.module('adagios.navbar', ['adagios.live'])
|
|
||||||
|
|
||||||
.controller('NavBarCtrl', ['$scope', '$http', 'GetProblems', function ($scope, $http, GetProblems) {
|
|
||||||
$scope.notifications = GetProblems;
|
|
||||||
}])
|
|
||||||
|
|
||||||
.directive('navbar', function () {
|
|
||||||
return {
|
|
||||||
restrict: 'E',
|
|
||||||
templateUrl: "navbar/navbar.html"
|
|
||||||
};
|
|
||||||
});
|
|
@ -1,4 +1,4 @@
|
|||||||
nav#navbar {
|
nav#topbar {
|
||||||
top: 0%;
|
top: 0%;
|
||||||
margin-left: 300px;
|
margin-left: 300px;
|
||||||
background-color: #353d48;
|
background-color: #353d48;
|
||||||
@ -10,22 +10,22 @@ nav#navbar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
nav#navbar div.container-fluid{
|
nav#topbar div.container-fluid{
|
||||||
padding-left: 0px;
|
padding-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav#navbar .navbar-brand{ padding: 0px 30px;font-size: 1.5em;line-height: 80px; }
|
nav#topbar .navbar-brand{ padding: 0px 30px;font-size: 1.5em;line-height: 80px; }
|
||||||
nav#navbar .navbar-nav > li > a { padding: 0px 30px; line-height: 80px; font-size: 1.5em; }
|
nav#topbar .navbar-nav > li > a { padding: 0px 30px; line-height: 80px; font-size: 1.5em; }
|
||||||
nav#navbar .navbar-nav > li > form div {
|
nav#topbar .navbar-nav > li > form div {
|
||||||
line-height: 55px;
|
line-height: 55px;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
}
|
}
|
||||||
nav#navbar .navbar-nav > li > form input {
|
nav#topbar .navbar-nav > li > form input {
|
||||||
height: 60px;
|
height: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
nav#navbar div.navbar-collapse {
|
nav#topbar div.navbar-collapse {
|
||||||
padding-left: 0px;
|
padding-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,12 +52,12 @@ a#toggle-sidebar i {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
nav#navbar li {
|
nav#topbar li {
|
||||||
border-color: #252b37;
|
border-color: #252b37;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav#navbar li a#search {
|
nav#topbar li a#search {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
<nav ng-app="adagios.navbar" id="navbar" class="navbar navbar-default navbar-inverse" role="navigation" ng-controller="NavBarCtrl">
|
<nav ng-app="adagios.topbar" id="topbar" class="navbar navbar-default navbar-inverse" role="navigation" ng-controller="TopBarCtrl">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<!-- Brand and toggle get grouped for better mobile display -->
|
<!-- Brand and toggle get grouped for better mobile display -->
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-topbar-collapse-1">
|
||||||
<span class="sr-only">Toggle navigation</span>
|
<span class="sr-only">Toggle navigation</span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
<div class="collapse navbar-collapse" id="bs-example-topbar-collapse-1">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li>
|
<li>
|
||||||
<a href="#" id="toggle-sidebar">
|
<a href="#" id="toggle-sidebar">
|
||||||
@ -36,4 +36,3 @@
|
|||||||
</div><!-- /.navbar-collapse -->
|
</div><!-- /.navbar-collapse -->
|
||||||
</div><!-- /.container-fluid -->
|
</div><!-- /.container-fluid -->
|
||||||
</nav>
|
</nav>
|
||||||
|
|
14
app/topbar/topbar.js
Normal file
14
app/topbar/topbar.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
angular.module('adagios.topbar', ['adagios.live'])
|
||||||
|
|
||||||
|
.controller('TopBarCtrl', ['$scope', '$http', 'GetProblems', function ($scope, $http, GetProblems) {
|
||||||
|
$scope.notifications = GetProblems;
|
||||||
|
}])
|
||||||
|
|
||||||
|
.directive('topbar', function () {
|
||||||
|
return {
|
||||||
|
restrict: 'E',
|
||||||
|
templateUrl: "topbar/topbar.html"
|
||||||
|
};
|
||||||
|
});
|
@ -1,12 +1,12 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
describe('Navbar module', function () {
|
describe('Topbar module', function () {
|
||||||
var $compile,
|
var $compile,
|
||||||
$rootScope,
|
$rootScope,
|
||||||
$controller,
|
$controller,
|
||||||
$httpBackend;
|
$httpBackend;
|
||||||
|
|
||||||
beforeEach(module('adagios.navbar'));
|
beforeEach(module('adagios.topbar'));
|
||||||
|
|
||||||
beforeEach(inject(function (_$compile_, _$rootScope_, _$controller_, _$httpBackend_) {
|
beforeEach(inject(function (_$compile_, _$rootScope_, _$controller_, _$httpBackend_) {
|
||||||
$compile = _$compile_;
|
$compile = _$compile_;
|
||||||
@ -14,24 +14,24 @@ describe('Navbar module', function () {
|
|||||||
$controller = _$controller_;
|
$controller = _$controller_;
|
||||||
$httpBackend = _$httpBackend_;
|
$httpBackend = _$httpBackend_;
|
||||||
|
|
||||||
$httpBackend.expectGET('navbar/navbar.html').respond('<a>{{ notifications }}</a>');
|
$httpBackend.expectGET('topbar/topbar.html').respond('<a>{{ notifications }}</a>');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('NavBarCtrl', function () {
|
describe('TopBarCtrl', function () {
|
||||||
|
|
||||||
it('should be defined', function () {
|
it('should be defined', function () {
|
||||||
var scope = $rootScope.$new(),
|
var scope = $rootScope.$new(),
|
||||||
navbar = $controller('NavBarCtrl', { $scope : scope });
|
topbar = $controller('TopBarCtrl', { $scope : scope });
|
||||||
|
|
||||||
expect(navbar).toBeDefined();
|
expect(topbar).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Navbar directive', function () {
|
describe('Topbar directive', function () {
|
||||||
|
|
||||||
it('should insert the number of warnings', function () {
|
it('should insert the number of warnings', function () {
|
||||||
var element = $compile('<navbar></navbar>')($rootScope);
|
var element = $compile('<topbar></topbar>')($rootScope);
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
$rootScope.notifications = 44;
|
$rootScope.notifications = 44;
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
Loading…
x
Reference in New Issue
Block a user