Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
19281b73
Commit
19281b73
authored
Jul 27, 2016
by
Nick Stenning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the "create a free account" link on the sidebar CTA
parent
9469c27a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
app-controller.js
h/static/scripts/app-controller.js
+2
-0
app-controller-test.js
h/static/scripts/test/app-controller-test.js
+6
-0
app.html
h/templates/client/app.html
+1
-1
No files found.
h/static/scripts/app-controller.js
View file @
19281b73
...
@@ -52,6 +52,8 @@ module.exports = function AppController(
...
@@ -52,6 +52,8 @@ module.exports = function AppController(
// the stream page or an individual annotation page.
// the stream page or an individual annotation page.
$scope
.
isSidebar
=
$window
.
top
!==
$window
;
$scope
.
isSidebar
=
$window
.
top
!==
$window
;
$scope
.
serviceUrl
=
settings
.
serviceUrl
;
$scope
.
sortKey
=
function
()
{
$scope
.
sortKey
=
function
()
{
return
annotationUI
.
getState
().
sortKey
;
return
annotationUI
.
getState
().
sortKey
;
};
};
...
...
h/static/scripts/test/app-controller-test.js
View file @
19281b73
...
@@ -95,6 +95,7 @@ describe('AppController', function () {
...
@@ -95,6 +95,7 @@ describe('AppController', function () {
fakeSettings
=
{
fakeSettings
=
{
firstRun
:
false
,
firstRun
:
false
,
serviceUrl
:
'http://fake.service.com/'
,
};
};
$provide
.
value
(
'annotationUI'
,
fakeAnnotationUI
);
$provide
.
value
(
'annotationUI'
,
fakeAnnotationUI
);
...
@@ -185,6 +186,11 @@ describe('AppController', function () {
...
@@ -185,6 +186,11 @@ describe('AppController', function () {
});
});
});
});
it
(
'exposes the serviceUrl on the scope'
,
function
()
{
createController
();
assert
.
equal
(
$scope
.
serviceUrl
,
'http://fake.service.com/'
);
});
it
(
'does not show login form for logged in users'
,
function
()
{
it
(
'does not show login form for logged in users'
,
function
()
{
createController
();
createController
();
assert
.
isFalse
(
$scope
.
accountDialog
.
visible
);
assert
.
isFalse
(
$scope
.
accountDialog
.
visible
);
...
...
h/templates/client/app.html
View file @
19281b73
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<div
class=
"create-account-banner"
ng-if=
"isSidebar && auth.status === 'logged-out'"
ng-cloak
>
<div
class=
"create-account-banner"
ng-if=
"isSidebar && auth.status === 'logged-out'"
ng-cloak
>
To annotate this document
To annotate this document
<a
href=
"{{
register_url }}
"
target=
"_blank"
>
<a
href=
"{{
serviceUrl }}register
"
target=
"_blank"
>
create a free account
create a free account
</a>
</a>
or
<a
href=
""
ng-click=
"login()"
>
log in
</a>
or
<a
href=
""
ng-click=
"login()"
>
log in
</a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment