Unverified Commit 259a52db authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #793 from hypothesis/fix-login-link-inside-sidebar-content

Fix "Log in" links in sidebar content area not opening login prompt.
parents 47b0fcba 1a335585
...@@ -355,6 +355,7 @@ module.exports = { ...@@ -355,6 +355,7 @@ module.exports = {
bindings: { bindings: {
auth: '<', auth: '<',
search: '<', search: '<',
onLogin: '&',
}, },
template: require('../templates/sidebar-content.html'), template: require('../templates/sidebar-content.html'),
}; };
...@@ -82,7 +82,7 @@ function configureRoutes($routeProvider) { ...@@ -82,7 +82,7 @@ function configureRoutes($routeProvider) {
resolve: resolve, resolve: resolve,
}); });
$routeProvider.otherwise({ $routeProvider.otherwise({
template: '<sidebar-content search="vm.search" auth="vm.auth"></sidebar-content>', template: '<sidebar-content search="vm.search" auth="vm.auth" on-login="vm.login()"></sidebar-content>',
reloadOnSearch: false, reloadOnSearch: false,
resolve: resolve, resolve: resolve,
}); });
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
This annotation is not available. This annotation is not available.
<br> <br>
You may need to You may need to
<a class="loggedout-message__link" href="" ng-click="vm.login()">log in</a> <a class="loggedout-message__link" href="" ng-click="vm.onLogin()">log in</a>
to see it. to see it.
</span> </span>
<span ng-if="vm.auth.status === 'logged-in'"> <span ng-if="vm.auth.status === 'logged-in'">
...@@ -47,5 +47,5 @@ ...@@ -47,5 +47,5 @@
thread="vm.rootThread"> thread="vm.rootThread">
</thread-list> </thread-list>
<loggedout-message ng-if="vm.shouldShowLoggedOutMessage()" on-login="vm.login()"> <loggedout-message ng-if="vm.shouldShowLoggedOutMessage()" on-login="vm.onLogin()">
</loggedout-message> </loggedout-message>
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