Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
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
ulakbus
ulakbus-ui
Commits
059f199d
Commit
059f199d
authored
Jul 09, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
location replace
clear wf for login
parent
0fee5ee8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
auth_controller.js
app/components/auth/auth_controller.js
+2
-6
interceptors.js
app/zetalib/interceptors.js
+4
-5
No files found.
app/components/auth/auth_controller.js
View file @
059f199d
...
@@ -8,14 +8,10 @@
...
@@ -8,14 +8,10 @@
'use strict'
;
'use strict'
;
var
auth
=
angular
.
module
(
'zaerp.auth'
,
[
'ngRoute'
,
'schemaForm'
,
'ngCookies'
,
'general'
]);
var
auth
=
angular
.
module
(
'zaerp.auth'
,
[
'ngRoute'
,
'schemaForm'
,
'ngCookies'
,
'general'
]);
auth
.
controller
(
'LoginCtrl'
,
function
(
$scope
,
$
rootScope
,
$
q
,
$timeout
,
$routeParams
,
Generator
,
LoginService
)
{
auth
.
controller
(
'LoginCtrl'
,
function
(
$scope
,
$q
,
$timeout
,
$routeParams
,
Generator
,
LoginService
)
{
$scope
.
url
=
'simple_login'
;
$scope
.
url
=
'simple_login'
;
var
form_params
=
{};
var
form_params
=
{};
if
(
$rootScope
.
loginwfclear
){
form_params
[
'clear_wf'
]
=
1
;
form_params
[
'clear_wf'
]
=
1
;
}
else
{
$rootScope
.
loginwfclear
=
1
}
// todo: change simple login when api ready
// todo: change simple login when api ready
Generator
.
get_form
(
$scope
.
url
,
form_params
).
then
(
function
(
data
){
Generator
.
get_form
(
$scope
.
url
,
form_params
).
then
(
function
(
data
){
var
d
=
data
.
data
.
forms
;
var
d
=
data
.
data
.
forms
;
...
...
app/zetalib/interceptors.js
View file @
059f199d
...
@@ -26,11 +26,10 @@ app.config(['$httpProvider', function ($httpProvider) {
...
@@ -26,11 +26,10 @@ app.config(['$httpProvider', function ($httpProvider) {
//Will only be called for HTTP up to 300
//Will only be called for HTTP up to 300
if
(
response
.
data
.
is_login
===
true
){
if
(
response
.
data
.
is_login
===
true
){
$rootScope
.
loggedInUser
=
response
.
data
.
is_login
;
$rootScope
.
loggedInUser
=
response
.
data
.
is_login
;
if
(
$location
.
path
()
===
"/login"
){
$location
.
replace
();
$location
.
path
(
'/dashboard'
);
//if($location.path()==="/login"){
}
else
{
// $location.path("/dashboard");
$location
.
replace
();
//}
}
}
}
if
(
response
.
data
.
screen
)
{
if
(
response
.
data
.
screen
)
{
$location
.
path
(
response
.
data
.
screen
);
$location
.
path
(
response
.
data
.
screen
);
...
...
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