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
5446c79c
Commit
5446c79c
authored
Dec 13, 2014
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move h.auth -> h.account on frontend
parent
11466a79
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
19 deletions
+19
-19
account-controller.coffee
h/static/scripts/account/account-controller.coffee
+1
-1
account.coffee
h/static/scripts/account/account.coffee
+4
-4
auth-controller.coffee
h/static/scripts/account/auth-controller.coffee
+5
-5
app.coffee
h/static/scripts/app.coffee
+1
-1
auth.html
h/templates/client/auth.html
+3
-3
karma.config.js
karma.config.js
+1
-1
account-controller-test.coffee
tests/js/account/account-controller-test.coffee
+2
-2
auth-controller-test.coffee
tests/js/account/auth-controller-test.coffee
+2
-2
No files found.
h/static/scripts/a
uth
/account-controller.coffee
→
h/static/scripts/a
ccount
/account-controller.coffee
View file @
5446c79c
...
@@ -85,5 +85,5 @@ class AccountController
...
@@ -85,5 +85,5 @@ class AccountController
angular
.
module
(
'h.a
uth
'
)
angular
.
module
(
'h.a
ccount
'
)
.
controller
(
'AccountController'
,
AccountController
)
.
controller
(
'AccountController'
,
AccountController
)
h/static/scripts/a
uth/auth
.coffee
→
h/static/scripts/a
ccount/account
.coffee
View file @
5446c79c
...
@@ -22,16 +22,16 @@ class AuthAppController
...
@@ -22,16 +22,16 @@ class AuthAppController
onlogin
=
->
onlogin
=
->
$window
.
location
.
href
=
'/stream'
$window
.
location
.
href
=
'/stream'
$scope
.
a
uth
=
{}
$scope
.
a
ccount
=
{}
$scope
.
model
=
{}
$scope
.
model
=
{}
$scope
.
a
uth
.
tab
=
$location
.
path
().
split
(
'/'
)[
1
]
$scope
.
a
ccount
.
tab
=
$location
.
path
().
split
(
'/'
)[
1
]
$scope
.
$on
'auth'
,
(
event
,
err
,
data
)
->
$scope
.
$on
'auth'
,
(
event
,
err
,
data
)
->
if
data
?
.
userid
if
data
?
.
userid
$timeout
onlogin
,
1000
$timeout
onlogin
,
1000
$scope
.
$watch
'a
uth
.tab'
,
(
tab
,
old
)
->
$scope
.
$watch
'a
ccount
.tab'
,
(
tab
,
old
)
->
unless
tab
is
old
then
$location
.
path
(
"/
#{
tab
}
"
)
unless
tab
is
old
then
$location
.
path
(
"/
#{
tab
}
"
)
# TODO: We should be calling identity.beginProvisioning() here in order to
# TODO: We should be calling identity.beginProvisioning() here in order to
...
@@ -126,6 +126,6 @@ configure = [
...
@@ -126,6 +126,6 @@ configure = [
]
]
angular
.
module
(
'h.a
uth
'
,
imports
,
configure
)
angular
.
module
(
'h.a
ccount
'
,
imports
,
configure
)
.
controller
(
'AuthAppController'
,
AuthAppController
)
.
controller
(
'AuthAppController'
,
AuthAppController
)
.
controller
(
'AuthPageController'
,
AuthPageController
)
.
controller
(
'AuthPageController'
,
AuthPageController
)
h/static/scripts/a
uth
/auth-controller.coffee
→
h/static/scripts/a
ccount
/auth-controller.coffee
View file @
5446c79c
...
@@ -7,12 +7,12 @@ class AuthController
...
@@ -7,12 +7,12 @@ class AuthController
if
data
.
userid
if
data
.
userid
$scope
.
$emit
'auth'
,
null
,
data
$scope
.
$emit
'auth'
,
null
,
data
$scope
.
a
uth
.
tab
=
$scope
.
a
ccount
.
tab
=
switch
$scope
.
a
uth
.
tab
switch
$scope
.
a
ccount
.
tab
when
'register'
then
'login'
when
'register'
then
'login'
when
'forgot_password'
then
'reset_password'
when
'forgot_password'
then
'reset_password'
when
'reset_password'
then
'login'
when
'reset_password'
then
'login'
else
$scope
.
a
uth
.
tab
else
$scope
.
a
ccount
.
tab
angular
.
copy
{},
$scope
.
model
angular
.
copy
{},
$scope
.
model
$scope
.
form
?
.
$setPristine
()
$scope
.
form
?
.
$setPristine
()
...
@@ -30,7 +30,7 @@ class AuthController
...
@@ -30,7 +30,7 @@ class AuthController
angular
.
bind
(
this
,
failure
,
form
)
angular
.
bind
(
this
,
failure
,
form
)
.
$promise
.
finally
->
$scope
.
$broadcast
'formState'
,
form
.
$name
,
''
.
$promise
.
finally
->
$scope
.
$broadcast
'formState'
,
form
.
$name
,
''
$scope
.
a
uth
?=
tab
:
'login'
$scope
.
a
ccount
?=
tab
:
'login'
$scope
.
model
?=
{}
$scope
.
model
?=
{}
$scope
.
$on
'auth'
,
do
->
$scope
.
$on
'auth'
,
do
->
...
@@ -53,5 +53,5 @@ class AuthController
...
@@ -53,5 +53,5 @@ class AuthController
,
300000
,
300000
angular
.
module
(
'h.a
uth
'
)
angular
.
module
(
'h.a
ccount
'
)
.
controller
(
'AuthController'
,
AuthController
)
.
controller
(
'AuthController'
,
AuthController
)
h/static/scripts/app.coffee
View file @
5446c79c
...
@@ -3,7 +3,7 @@ imports = [
...
@@ -3,7 +3,7 @@ imports = [
'ngRoute'
'ngRoute'
'ngSanitize'
'ngSanitize'
'ngTagsInput'
'ngTagsInput'
'h.a
uth
'
'h.a
ccount
'
'h.helpers'
'h.helpers'
'h.identity'
'h.identity'
'h.streamer'
'h.streamer'
...
...
h/templates/client/auth.html
View file @
5446c79c
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
tab-reveal=
"['forgot_password', 'reset_password']"
tab-reveal=
"['forgot_password', 'reset_password']"
ng-controller=
"AuthController as vm"
ng-controller=
"AuthController as vm"
ng-form=
"form"
ng-form=
"form"
ng-model=
"a
uth
.tab"
ng-model=
"a
ccount
.tab"
ng-submit=
"vm.submit(form[a
uth
.tab])"
>
ng-submit=
"vm.submit(form[a
ccount
.tab])"
>
<!-- Login -->
<!-- Login -->
<form
data-title=
"Sign in"
<form
data-title=
"Sign in"
data-value=
"login"
data-value=
"login"
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<div
class=
"form-actions"
>
<div
class=
"form-actions"
>
<div
class=
"form-actions-message"
>
<div
class=
"form-actions-message"
>
<a
href=
""
ng-click=
"a
uth
.tab = 'forgot_password'"
<a
href=
""
ng-click=
"a
ccount
.tab = 'forgot_password'"
>
Forgot your password?
</a>
>
Forgot your password?
</a>
</div>
</div>
<div
class=
"form-actions-buttons"
>
<div
class=
"form-actions-buttons"
>
...
...
karma.config.js
View file @
5446c79c
...
@@ -44,7 +44,7 @@ module.exports = function(config) {
...
@@ -44,7 +44,7 @@ module.exports = function(config) {
'h/static/scripts/plugin/discovery.js'
,
'h/static/scripts/plugin/discovery.js'
,
'h/static/scripts/plugin/threading.js'
,
'h/static/scripts/plugin/threading.js'
,
'h/static/scripts/app.js'
,
'h/static/scripts/app.js'
,
'h/static/scripts/a
uth
.js'
,
'h/static/scripts/a
ccount
.js'
,
'h/static/scripts/helpers.js'
,
'h/static/scripts/helpers.js'
,
'h/static/scripts/session.js'
,
'h/static/scripts/session.js'
,
'h/static/scripts/hypothesis.js'
,
'h/static/scripts/hypothesis.js'
,
...
...
tests/js/a
uth
/account-controller-test.coffee
→
tests/js/a
ccount
/account-controller-test.coffee
View file @
5446c79c
...
@@ -2,7 +2,7 @@ assert = chai.assert
...
@@ -2,7 +2,7 @@ assert = chai.assert
sinon
.
assert
.
expose
assert
,
prefix
:
null
sinon
.
assert
.
expose
assert
,
prefix
:
null
sandbox
=
sinon
.
sandbox
.
create
()
sandbox
=
sinon
.
sandbox
.
create
()
describe
'h.a
uth
.AccountController'
,
->
describe
'h.a
ccount
.AccountController'
,
->
$scope
=
null
$scope
=
null
fakeFlash
=
null
fakeFlash
=
null
fakeSession
=
null
fakeSession
=
null
...
@@ -13,7 +13,7 @@ describe 'h.auth.AccountController', ->
...
@@ -13,7 +13,7 @@ describe 'h.auth.AccountController', ->
profilePromise
=
null
profilePromise
=
null
createController
=
null
createController
=
null
beforeEach
module
(
'h.a
uth
'
)
beforeEach
module
(
'h.a
ccount
'
)
beforeEach
module
(
$provide
,
$filterProvider
)
->
beforeEach
module
(
$provide
,
$filterProvider
)
->
fakeSession
=
{}
fakeSession
=
{}
...
...
tests/js/a
uth
/auth-controller-test.coffee
→
tests/js/a
ccount
/auth-controller-test.coffee
View file @
5446c79c
...
@@ -19,8 +19,8 @@ class MockSession
...
@@ -19,8 +19,8 @@ class MockSession
mockFlash
=
sandbox
.
spy
()
mockFlash
=
sandbox
.
spy
()
mockFormHelpers
=
applyValidationErrors
:
sandbox
.
spy
()
mockFormHelpers
=
applyValidationErrors
:
sandbox
.
spy
()
describe
'h.a
uth
'
,
->
describe
'h.a
ccount
'
,
->
beforeEach
module
(
'h.a
uth
'
)
beforeEach
module
(
'h.a
ccount
'
)
beforeEach
module
(
'h.templates'
)
beforeEach
module
(
'h.templates'
)
beforeEach
module
(
$provide
)
->
beforeEach
module
(
$provide
)
->
...
...
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