Commit 61005b1b authored by Robert Knight's avatar Robert Knight

Convert `<share-dialog>` to a component

parent 57e12ba0
......@@ -147,6 +147,7 @@ module.exports = angular.module('h', [
.component('loginForm', require('./directive/login-form').component)
.component('publishAnnotationBtn', require('./directive/publish-annotation-btn'))
.component('searchStatusBar', require('./directive/search-status-bar'))
.component('shareDialog', require('./directive/share-dialog'))
.component('timestamp', require('./directive/timestamp'))
.directive('excerpt', require('./directive/excerpt').directive)
......@@ -157,7 +158,6 @@ module.exports = angular.module('h', [
.directive('hOnTouch', require('./directive/h-on-touch'))
.directive('hTooltip', require('./directive/h-tooltip'))
.directive('markdown', require('./directive/markdown'))
.directive('shareDialog', require('./directive/share-dialog'))
.directive('sidebarTutorial', require('./directive/sidebar-tutorial').directive)
.directive('searchInput', require('./directive/search-input'))
.directive('selectionTabs', require('./directive/selection-tabs'))
......
......@@ -28,15 +28,11 @@ function ShareDialogController($scope, $element, annotationUI) {
updateViaLink);
}
module.exports = function () {
return {
restrict: 'E',
bindToController: true,
controller: ShareDialogController,
controllerAs: 'vm',
scope: {
onClose: '&',
},
template: require('../templates/share_dialog.html'),
};
module.exports = {
controller: ShareDialogController,
controllerAs: 'vm',
bindings: {
onClose: '&',
},
template: require('../templates/share_dialog.html'),
};
......@@ -11,7 +11,7 @@ describe('shareDialog', function () {
fakeAnnotationUI = { frames: sinon.stub().returns([]) };
angular.module('h', [])
.directive('shareDialog', require('../share-dialog'))
.component('shareDialog', require('../share-dialog'))
.value('annotationUI', fakeAnnotationUI)
.value('urlEncodeFilter', function (val) { return val; });
angular.mock.module('h');
......
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