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
98abd4fc
Commit
98abd4fc
authored
Jun 16, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restructure application phase 1
parent
79af2b15
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
59 deletions
+3
-59
app.js
app/app.js
+1
-59
index.html
app/index.html
+2
-0
general.js
app/zetalib/general.js
+0
-0
general_test.js
app/zetalib/general_test.js
+0
-0
No files found.
app/app.js
View file @
98abd4fc
...
...
@@ -7,7 +7,7 @@
'use strict'
;
angular
.
module
(
var
app
=
angular
.
module
(
'zaerp'
,
[
'oc.lazyLoad'
,
'ngRoute'
,
...
...
@@ -34,64 +34,6 @@ angular.module(
debug
:
true
});
}]).
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
$routeProvider
.
when
(
'/login'
,
{
templateUrl
:
'login/login.html'
,
controller
:
'LoginCtrl'
,
resolve
:
{
loadMyCtrl
:
[
'$ocLazyLoad'
,
function
(
$ocLazyLoad
)
{
return
$ocLazyLoad
.
load
(
'login/login.js'
);
}],
loadMyService
:
[
'$ocLazyLoad'
,
function
(
$ocLazyLoad
)
{
return
$ocLazyLoad
.
load
(
'login/login_service.js'
);
}]
}
})
.
when
(
'/dashboard'
,
{
templateUrl
:
'dashboard/dashboard.html'
,
controller
:
'DashCtrl'
,
resolve
:
{
loadMyCtrl
:
[
'$ocLazyLoad'
,
function
(
$ocLazyLoad
)
{
return
$ocLazyLoad
.
load
(
'dashboard/dashboard.js'
);
}]
}
})
.
when
(
'/student_add'
,
{
templateUrl
:
'student/student_add_template.html'
,
controller
:
'StudentAddCtrl'
,
resolve
:
{
loadMyCtrl
:
[
'$ocLazyLoad'
,
function
(
$ocLazyLoad
)
{
return
$ocLazyLoad
.
load
(
'student/student_add.js'
);
}],
loadMyService
:
[
'$ocLazyLoad'
,
function
(
$ocLazyLoad
)
{
return
$ocLazyLoad
.
load
(
'forms/form_service.js'
);
}]
}
})
.
otherwise
({
redirectTo
:
'/dashboard'
});
}]).
run
(
function
(
$rootScope
,
$location
,
$cookies
)
{
/**
* todo: below session id is temporary session_id
* the login logic will be finished when backend complete
*
*/
var
sessionId
=
$cookies
.
get
(
'session'
);
$rootScope
.
loggedInUser
=
sessionId
?
true
:
false
;
$rootScope
.
$on
(
"$routeChangeStart"
,
function
(
event
,
next
,
current
)
{
if
(
$rootScope
.
loggedInUser
==
null
)
{
// no logged user, redirect to /login
if
(
next
.
templateUrl
===
"login/login.html"
)
{
console
.
log
(
"test log to login"
);
}
else
{
console
.
log
(
"test log logged"
);
$location
.
path
(
"/login"
);
}
}
});
}).
/**
* RESTURL is the url of rest api to talk
* Based on the environment it changes from dev to prod
...
...
app/index.html
View file @
98abd4fc
...
...
@@ -97,6 +97,8 @@
<script
type=
"text/javascript"
src=
"bower_components/angular-schema-form/dist/bootstrap-decorator.min.js"
></script>
<script
src=
"app.js"
></script>
<script
src=
"app_routes.js"
></script>
<!--<script src="zlib/general.js"></script>-->
<!--<script src="forms/form_generator.js"></script>-->
<!--<script src="test_view_for_generator/testfile.js"></script>-->
...
...
app/zlib/general.js
→
app/z
eta
lib/general.js
View file @
98abd4fc
File moved
app/zlib/general_test.js
→
app/z
eta
lib/general_test.js
View file @
98abd4fc
File moved
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