Commit 57e12ba0 authored by Robert Knight's avatar Robert Knight

Convert `<search-status-bar>` to a component

parent 93c6e52e
...@@ -146,6 +146,7 @@ module.exports = angular.module('h', [ ...@@ -146,6 +146,7 @@ module.exports = angular.module('h', [
.component('loginControl', require('./directive/login-control')) .component('loginControl', require('./directive/login-control'))
.component('loginForm', require('./directive/login-form').component) .component('loginForm', require('./directive/login-form').component)
.component('publishAnnotationBtn', require('./directive/publish-annotation-btn')) .component('publishAnnotationBtn', require('./directive/publish-annotation-btn'))
.component('searchStatusBar', require('./directive/search-status-bar'))
.component('timestamp', require('./directive/timestamp')) .component('timestamp', require('./directive/timestamp'))
.directive('excerpt', require('./directive/excerpt').directive) .directive('excerpt', require('./directive/excerpt').directive)
...@@ -156,7 +157,6 @@ module.exports = angular.module('h', [ ...@@ -156,7 +157,6 @@ module.exports = angular.module('h', [
.directive('hOnTouch', require('./directive/h-on-touch')) .directive('hOnTouch', require('./directive/h-on-touch'))
.directive('hTooltip', require('./directive/h-tooltip')) .directive('hTooltip', require('./directive/h-tooltip'))
.directive('markdown', require('./directive/markdown')) .directive('markdown', require('./directive/markdown'))
.directive('searchStatusBar', require('./directive/search-status-bar'))
.directive('shareDialog', require('./directive/share-dialog')) .directive('shareDialog', require('./directive/share-dialog'))
.directive('sidebarTutorial', require('./directive/sidebar-tutorial').directive) .directive('sidebarTutorial', require('./directive/sidebar-tutorial').directive)
.directive('searchInput', require('./directive/search-input')) .directive('searchInput', require('./directive/search-input'))
......
...@@ -2,27 +2,22 @@ ...@@ -2,27 +2,22 @@
var uiConstants = require('../ui-constants'); var uiConstants = require('../ui-constants');
// @ngInject module.exports = {
module.exports = function () { controllerAs: 'vm',
return { controller: function () {
bindToController: true, this.TAB_ANNOTATIONS = uiConstants.TAB_ANNOTATIONS;
controllerAs: 'vm', this.TAB_NOTES = uiConstants.TAB_NOTES;
controller: function () { this.TAB_ORPHANS = uiConstants.TAB_ORPHANS;
this.TAB_ANNOTATIONS = uiConstants.TAB_ANNOTATIONS; },
this.TAB_NOTES = uiConstants.TAB_NOTES; bindings: {
this.TAB_ORPHANS = uiConstants.TAB_ORPHANS; filterActive: '<',
}, filterMatchCount: '<',
restrict: 'E', onClearSelection: '&',
scope: { searchQuery: '<',
filterActive: '<', selectedTab: '<',
filterMatchCount: '<', selectionCount: '<',
onClearSelection: '&', totalAnnotations: '<',
searchQuery: '<', totalNotes: '<',
selectedTab: '<', },
selectionCount: '<', template: require('../templates/search_status_bar.html'),
totalAnnotations: '<',
totalNotes: '<',
},
template: require('../templates/search_status_bar.html'),
};
}; };
...@@ -7,7 +7,7 @@ var util = require('./util'); ...@@ -7,7 +7,7 @@ var util = require('./util');
describe('searchStatusBar', function () { describe('searchStatusBar', function () {
before(function () { before(function () {
angular.module('app', []) angular.module('app', [])
.directive('searchStatusBar', require('../search-status-bar')); .component('searchStatusBar', require('../search-status-bar'));
}); });
beforeEach(function () { beforeEach(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment