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
e696a566
Commit
e696a566
authored
Sep 17, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.0.3.1 dist login logout fix
parent
90a47357
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
117 additions
and
87 deletions
+117
-87
Gruntfile.js
Gruntfile.js
+24
-11
app.js
app/app.js
+2
-2
auth_service.js
app/components/auth/auth_service.js
+1
-0
list.html
app/components/crud/templates/list.html
+31
-29
directives.js
app/shared/directives.js
+2
-2
interceptors.js
app/zetalib/interceptors.js
+7
-0
app.js
dist/app.js
+1
-1
components.js
dist/bower_components/components.js
+16
-11
index.html
dist/index.html
+1
-1
templates.js
dist/templates.js
+31
-29
index.html
index.html
+1
-1
No files found.
Gruntfile.js
View file @
e696a566
...
@@ -88,31 +88,44 @@ module.exports = function (grunt) {
...
@@ -88,31 +88,44 @@ module.exports = function (grunt) {
},
},
js
:
{
js
:
{
src
:
[
src
:
[
'app/app.js'
,
//'app/app.js',
'app/app_routes.js'
,
//'app/app_routes.js',
'app/zetalib/**/*service.js'
,
//'app/zetalib/**/*service.js',
'app/zetalib/general.js'
,
//'app/zetalib/general.js',
'app/zetalib/interceptors.js'
,
//'app/zetalib/interceptors.js',
'app/shared/scripts/theme.js'
,
//'app/shared/scripts/theme.js',
'app/shared/directives.js'
,
//'app/shared/directives.js',
'app/components/**/*controller.js'
,
//'app/components/**/*controller.js',
'app/components/**/*service.js'
//'app/components/**/*service.js',
"app/app.js"
,
"app/app_routes.js"
,
"app/zetalib/interceptors.js"
,
"app/zetalib/general.js"
,
"app/zetalib/forms/form_service.js"
,
"app/shared/scripts/theme.js"
,
"app/shared/directives.js"
,
"app/components/auth/auth_controller.js"
,
"app/components/auth/auth_service.js"
,
"app/components/dashboard/dashboard_controller.js"
,
"app/components/crud/crud_controller.js"
,
],
],
dest
:
'dist/app.js'
dest
:
'dist/app.js'
},
},
components
:
{
components
:
{
src
:
[
src
:
[
"app/bower_components/jquery/dist/jquery.min.js"
,
"app/bower_components/bootstrap/dist/js/bootstrap.min.js"
,
"app/bower_components/angular-route/angular-route.min.js"
,
"app/bower_components/angular-route/angular-route.min.js"
,
"app/bower_components/angular-cookies/angular-cookies.min.js"
,
"app/bower_components/angular-cookies/angular-cookies.min.js"
,
"app/bower_components/angular-resource/angular-resource.min.js"
,
"app/bower_components/angular-resource/angular-resource.min.js"
,
"app/bower_components/angular-bootstrap/ui-bootstrap.min.js"
,
"app/bower_components/angular-bootstrap/ui-bootstrap.min.js"
,
"app/bower_components/angular-bootstrap/ui-bootstrap-tpls.
min.
js"
,
"app/bower_components/angular-bootstrap/ui-bootstrap-tpls.js"
,
"app/bower_components/angular-sanitize/angular-sanitize.min.js"
,
"app/bower_components/angular-sanitize/angular-sanitize.min.js"
,
"app/bower_components/tv4/tv4.js"
,
"app/bower_components/tv4/tv4.js"
,
"app/bower_components/objectpath/lib/ObjectPath.js"
,
"app/bower_components/objectpath/lib/ObjectPath.js"
,
"app/bower_components/angular-schema-form/dist/schema-form.min.js"
,
"app/bower_components/angular-schema-form/dist/schema-form.min.js"
,
"app/bower_components/angular-schema-form/dist/bootstrap-decorator.min.js"
,
"app/bower_components/angular-schema-form/dist/bootstrap-decorator.min.js"
,
"app/bower_components/angular-schema-form-datepicker/bootstrap-datepicker.min.js"
,
"app/bower_components/angular-gettext/dist/angular-gettext.min.js"
,
"app/bower_components/angular-gettext/dist/angular-gettext.min.js"
,
"app/bower_components/json3/lib/json3.min.js"
,
"app/bower_components/json3/lib/json3.min.js"
,
"app/bower_components/angular-loading-bar/build/loading-bar.min.js"
,
"app/bower_components/angular-loading-bar/build/loading-bar.min.js"
,
...
...
app/app.js
View file @
e696a566
...
@@ -18,8 +18,8 @@ var app = angular.module(
...
@@ -18,8 +18,8 @@ var app = angular.module(
'formService'
,
'formService'
,
'ulakbus.dashboard'
,
'ulakbus.dashboard'
,
'ulakbus.auth'
,
'ulakbus.auth'
,
'ulakbus.staff'
,
//
'ulakbus.staff',
'ulakbus.student'
,
//
'ulakbus.student',
'ulakbus.crud'
,
'ulakbus.crud'
,
//'ulakbus.version',
//'ulakbus.version',
'schemaForm'
,
'schemaForm'
,
...
...
app/components/auth/auth_service.js
View file @
e696a566
...
@@ -18,6 +18,7 @@ auth.factory('LoginService', function ($http, $rootScope, $location, $log, $cook
...
@@ -18,6 +18,7 @@ auth.factory('LoginService', function ($http, $rootScope, $location, $log, $cook
.
post
(
RESTURL
.
url
+
url
,
credentials
)
.
post
(
RESTURL
.
url
+
url
,
credentials
)
.
success
(
function
(
data
,
status
,
headers
,
config
)
{
.
success
(
function
(
data
,
status
,
headers
,
config
)
{
//$window.sessionStorage.token = data.token;
//$window.sessionStorage.token = data.token;
$rootScope
.
loggedInUser
=
true
;
$rootScope
.
loggedInUser
=
true
;
})
})
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
...
...
app/components/crud/templates/list.html
View file @
e696a566
<div
class=
"starter-template"
>
<div
class=
"starter-template"
>
<h1>
{{model}}
</h1>
<h1>
{{model}}
</h1>
<table
class=
"table table-bordered"
style=
"background-color:#fff;"
>
<div
class=
"tablescroll"
>
<thead>
<table
class=
"table table-bordered"
style=
"background-color:#fff;"
>
<tr>
<thead>
<th
colspan=
"2"
>
<tr>
<label>
<th
colspan=
"2"
>
<input
type=
"checkbox"
style=
"zoom:1.5; margin:5px 0 0 8px;"
>
<label>
Hepsini Seç
<input
type=
"checkbox"
style=
"zoom:1.5; margin:5px 0 0 8px;"
>
</label>
Hepsini Seç
</th>
</label>
<th
ng-repeat=
"(key,value) in objects[0].data"
>
{{ key }}
</th>
</th>
<th>
action
</th>
<th
ng-repeat=
"(key,value) in objects[0].data"
>
{{ key }}
</th>
</tr>
<th>
action
</th>
</thead>
</tr>
<tbody>
</thead>
<tr
ng-repeat=
"object in objects"
>
<tbody>
<td
width=
"60"
>
<tr
ng-repeat=
"object in objects"
>
<label>
<td
width=
"60"
>
<input
type=
"checkbox"
style=
"zoom:1.5; margin:5px 0 0 8px;"
>
<label>
</label>
<input
type=
"checkbox"
style=
"zoom:1.5; margin:5px 0 0 8px;"
>
</td>
</label>
<th
scope=
"row"
style=
"text-align:center"
>
1
</th>
</td>
<td
ng-repeat=
"(key,value) in object.data"
>
{{value}}
</td>
<th
scope=
"row"
style=
"text-align:center"
>
{{$index + 1}}
</th>
<td>
<td
ng-repeat=
"(key,value) in object.data"
>
{{value}}
</td>
<a
ng-href=
"#/{{model}}/edit/{{object.key}}"
>
Edit
</a><br>
<td>
<a
ng-href=
"#/{{model}}/{{object.key}}"
>
Show
</a>
<a
ng-href=
"#/{{model}}/edit/{{object.key}}"
>
Edit
</a><br>
</td>
<a
ng-href=
"#/{{model}}/{{object.key}}"
>
Show
</a>
</tr>
</td>
</tbody>
</tr>
</table>
</tbody>
</table>
</div>
<div
class=
"btn-group"
>
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-default dropdown-toggle"
data-toggle=
"dropdown"
aria-haspopup=
"true"
<button
type=
"button"
class=
"btn btn-default dropdown-toggle"
data-toggle=
"dropdown"
aria-haspopup=
"true"
...
...
app/shared/directives.js
View file @
e696a566
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
/**
/**
* logout directive
* logout directive
*/
*/
app
.
directive
(
'logout'
,
function
(
$http
,
$location
)
{
app
.
directive
(
'logout'
,
function
(
$http
,
$location
,
RESTURL
)
{
return
{
return
{
link
:
function
(
$scope
,
$element
,
$rootScope
)
{
link
:
function
(
$scope
,
$element
,
$rootScope
)
{
$element
.
on
(
'click'
,
function
()
{
$element
.
on
(
'click'
,
function
()
{
$http
.
post
(
'http://'
+
window
.
location
.
hostname
+
':9001/
logout'
,
{}).
then
(
function
()
{
$http
.
post
(
RESTURL
.
url
+
'
logout'
,
{}).
then
(
function
()
{
$rootScope
.
loggedInUser
=
false
;
$rootScope
.
loggedInUser
=
false
;
console
.
log
(
$rootScope
.
loggedInUser
);
console
.
log
(
$rootScope
.
loggedInUser
);
$location
.
path
(
"/login"
);
$location
.
path
(
"/login"
);
...
...
app/zetalib/interceptors.js
View file @
e696a566
...
@@ -50,6 +50,13 @@ app.config(['$httpProvider', function ($httpProvider) {
...
@@ -50,6 +50,13 @@ app.config(['$httpProvider', function ($httpProvider) {
$location
.
path
(
'/login'
);
$location
.
path
(
'/login'
);
}
}
}
}
if
(
rejection
.
status
===
403
)
{
if
(
rejection
.
data
.
is_login
==
true
){
if
(
$location
.
path
()
===
"/login"
){
$location
.
path
(
"/dashboard"
);
}
}
}
return
$q
.
reject
(
rejection
);
return
$q
.
reject
(
rejection
);
}
}
};
};
...
...
dist/app.js
View file @
e696a566
This diff is collapsed.
Click to expand it.
dist/bower_components/components.js
View file @
e696a566
This diff is collapsed.
Click to expand it.
dist/index.html
View file @
e696a566
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
<script
src=
"bower_components/jquery.min.js"
></script>
<script
src=
"bower_components/jquery.min.js"
></script>
<script
src=
"http://ajax.googleapis.com/ajax/libs/angularjs/1.3.1
7
/angular.min.js"
></script>
<script
src=
"http://ajax.googleapis.com/ajax/libs/angularjs/1.3.1
8
/angular.min.js"
></script>
<script
src=
"bower_components/components.js"
></script>
<script
src=
"bower_components/components.js"
></script>
<script
src=
"shared/translations.js"
></script>
<script
src=
"shared/translations.js"
></script>
<script
src=
"templates.js"
></script>
<script
src=
"templates.js"
></script>
...
...
dist/templates.js
View file @
e696a566
...
@@ -40,35 +40,37 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache",
...
@@ -40,35 +40,37 @@ angular.module("components/crud/templates/list.html", []).run(["$templateCache",
$templateCache
.
put
(
"components/crud/templates/list.html"
,
$templateCache
.
put
(
"components/crud/templates/list.html"
,
"<div class=
\"
starter-template
\"
>
\n
"
+
"<div class=
\"
starter-template
\"
>
\n
"
+
" <h1>{{model}}</h1>
\n
"
+
" <h1>{{model}}</h1>
\n
"
+
" <table class=
\"
table table-bordered
\"
style=
\"
background-color:#fff;
\"
>
\n
"
+
" <div class=
\"
tablescroll
\"
>
\n
"
+
" <thead>
\n
"
+
" <table class=
\"
table table-bordered
\"
style=
\"
background-color:#fff;
\"
>
\n
"
+
" <tr>
\n
"
+
" <thead>
\n
"
+
" <th colspan=
\"
2
\"
>
\n
"
+
" <tr>
\n
"
+
" <label>
\n
"
+
" <th colspan=
\"
2
\"
>
\n
"
+
" <input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>
\n
"
+
" <label>
\n
"
+
" Hepsini Seç
\n
"
+
" <input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>
\n
"
+
" </label>
\n
"
+
" Hepsini Seç
\n
"
+
" </th>
\n
"
+
" </label>
\n
"
+
" <th ng-repeat=
\"
(key,value) in objects[0].data
\"
>{{ key }}</th>
\n
"
+
" </th>
\n
"
+
" <th>action</th>
\n
"
+
" <th ng-repeat=
\"
(key,value) in objects[0].data
\"
>{{ key }}</th>
\n
"
+
" </tr>
\n
"
+
" <th>action</th>
\n
"
+
" </thead>
\n
"
+
" </tr>
\n
"
+
" <tbody>
\n
"
+
" </thead>
\n
"
+
" <tr ng-repeat=
\"
object in objects
\"
>
\n
"
+
" <tbody>
\n
"
+
" <td width=
\"
60
\"
>
\n
"
+
" <tr ng-repeat=
\"
object in objects
\"
>
\n
"
+
" <label>
\n
"
+
" <td width=
\"
60
\"
>
\n
"
+
" <input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>
\n
"
+
" <label>
\n
"
+
" </label>
\n
"
+
" <input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>
\n
"
+
" </td>
\n
"
+
" </label>
\n
"
+
" <th scope=
\"
row
\"
style=
\"
text-align:center
\"
>1</th>
\n
"
+
" </td>
\n
"
+
" <td ng-repeat=
\"
(key,value) in object.data
\"
>{{value}}</td>
\n
"
+
" <th scope=
\"
row
\"
style=
\"
text-align:center
\"
>{{$index + 1}}</th>
\n
"
+
" <td>
\n
"
+
" <td ng-repeat=
\"
(key,value) in object.data
\"
>{{value}}</td>
\n
"
+
" <a ng-href=
\"
#/{{model}}/edit/{{object.key}}
\"
>Edit</a><br>
\n
"
+
" <td>
\n
"
+
" <a ng-href=
\"
#/{{model}}/{{object.key}}
\"
>Show</a>
\n
"
+
" <a ng-href=
\"
#/{{model}}/edit/{{object.key}}
\"
>Edit</a><br>
\n
"
+
" </td>
\n
"
+
" <a ng-href=
\"
#/{{model}}/{{object.key}}
\"
>Show</a>
\n
"
+
" </tr>
\n
"
+
" </td>
\n
"
+
" </tbody>
\n
"
+
" </tr>
\n
"
+
" </table>
\n
"
+
" </tbody>
\n
"
+
" </table>
\n
"
+
" </div>
\n
"
+
"
\n
"
+
"
\n
"
+
" <div class=
\"
btn-group
\"
>
\n
"
+
" <div class=
\"
btn-group
\"
>
\n
"
+
" <button type=
\"
button
\"
class=
\"
btn btn-default dropdown-toggle
\"
data-toggle=
\"
dropdown
\"
aria-haspopup=
\"
true
\"\n
"
+
" <button type=
\"
button
\"
class=
\"
btn btn-default dropdown-toggle
\"
data-toggle=
\"
dropdown
\"
aria-haspopup=
\"
true
\"\n
"
+
...
...
index.html
View file @
e696a566
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
<!-- @if NODE_ENV == 'PRODUCTION' -->
<!-- @if NODE_ENV == 'PRODUCTION' -->
<script
src=
"bower_components/jquery.min.js"
></script>
<script
src=
"bower_components/jquery.min.js"
></script>
<script
src=
"http://ajax.googleapis.com/ajax/libs/angularjs/1.3.1
7
/angular.min.js"
></script>
<script
src=
"http://ajax.googleapis.com/ajax/libs/angularjs/1.3.1
8
/angular.min.js"
></script>
<script
src=
"bower_components/components.js"
></script>
<script
src=
"bower_components/components.js"
></script>
<script
src=
"shared/translations.js"
></script>
<script
src=
"shared/translations.js"
></script>
<script
src=
"templates.js"
></script>
<script
src=
"templates.js"
></script>
...
...
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