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
6c8f81fb
Commit
6c8f81fb
authored
Jul 08, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
date type conflict string olarak workaround
console loglar temizlendi
parent
70570604
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
54 deletions
+59
-54
app.js
app/app.js
+1
-2
app_routes.js
app/app_routes.js
+12
-13
staff_controller.js
app/components/staff/staff_controller.js
+8
-7
add.html
app/components/staff/templates/add.html
+1
-2
edit.html
app/components/staff/templates/edit.html
+1
-2
index.html
app/index.html
+28
-21
interceptors.js
app/zetalib/interceptors.js
+1
-1
bower.json
bower.json
+7
-6
No files found.
app/app.js
View file @
6c8f81fb
...
@@ -77,10 +77,8 @@ var app = angular.module(
...
@@ -77,10 +77,8 @@ var app = angular.module(
$scope
.
location
=
$location
;
$scope
.
location
=
$location
;
$scope
.
$watch
(
'location.path()'
,
function
(
newPath
)
{
$scope
.
$watch
(
'location.path()'
,
function
(
newPath
)
{
if
(
path
===
newPath
)
{
if
(
path
===
newPath
)
{
console
.
log
(
path
,
newPath
);
$element
.
addClass
(
clazz
);
$element
.
addClass
(
clazz
);
}
else
{
}
else
{
console
.
log
(
path
,
newPath
);
$element
.
removeClass
(
clazz
);
$element
.
removeClass
(
clazz
);
}
}
});
});
...
@@ -97,6 +95,7 @@ var app = angular.module(
...
@@ -97,6 +95,7 @@ var app = angular.module(
$element
.
on
(
'click'
,
function
(){
$element
.
on
(
'click'
,
function
(){
$http
.
post
(
'http://127.0.0.1:9001/logout'
,
{}).
then
(
function
()
{
$http
.
post
(
'http://127.0.0.1:9001/logout'
,
{}).
then
(
function
()
{
$rootScope
.
loggedInUser
=
false
;
$rootScope
.
loggedInUser
=
false
;
console
.
log
(
$rootScope
.
loggedInUser
);
$location
.
path
(
"/login"
);
$location
.
path
(
"/login"
);
});
});
});
});
...
...
app/app_routes.js
View file @
6c8f81fb
...
@@ -167,19 +167,18 @@ app.config(['$routeProvider', function ($routeProvider) {
...
@@ -167,19 +167,18 @@ app.config(['$routeProvider', function ($routeProvider) {
*
*
*/
*/
//var sessionId = $cookies.get('session');
//$rootScope.loggedInUser ? $rootScope.loggedInUser : false;
//$rootScope.loggedInUser = sessionId ? true : false;
//$rootScope.$on("$routeChangeStart", function (event, next, current) {
$rootScope
.
$on
(
"$routeChangeStart"
,
function
(
event
,
next
,
current
)
{
// if ($rootScope.loggedInUser == null) {
if
(
$rootScope
.
loggedInUser
==
null
)
{
// // no logged user, redirect to /login
// no logged user, redirect to /login
// console.log($rootScope.loggedInUser);
if
(
next
.
templateUrl
===
"login/login.html"
)
{
// if (next.templateUrl === "login/login.html") {
console
.
log
(
"test log to login"
);
//
}
else
{
// } else {
console
.
log
(
"test log logged"
);
// $location.path("/login");
$location
.
path
(
"/login"
);
// }
}
// }
}
//});
});
}).
config
([
'$httpProvider'
,
function
(
$httpProvider
)
{
}).
config
([
'$httpProvider'
,
function
(
$httpProvider
)
{
// to send cookies CORS
// to send cookies CORS
$httpProvider
.
defaults
.
withCredentials
=
true
;
$httpProvider
.
defaults
.
withCredentials
=
true
;
...
...
app/components/staff/staff_controller.js
View file @
6c8f81fb
...
@@ -42,17 +42,20 @@ var staff = angular.module('zaerp.staff', ['ngRoute', 'schemaForm', 'formService
...
@@ -42,17 +42,20 @@ var staff = angular.module('zaerp.staff', ['ngRoute', 'schemaForm', 'formService
staff
.
controller
(
'StaffAddEditCtrl'
,
function
(
$scope
,
$http
,
$log
,
Generator
,
$routeParams
)
{
staff
.
controller
(
'StaffAddEditCtrl'
,
function
(
$scope
,
$http
,
$log
,
Generator
,
$routeParams
)
{
$scope
.
url
=
'personel_duzenle_basitlestirilmis'
;
$scope
.
url
=
'personel_duzenle_basitlestirilmis'
;
var
form_params
=
{};
var
form_params
=
{};
if
(
$routeParams
.
id
){
if
(
$routeParams
.
id
)
{
form_params
[
'id'
]
=
$routeParams
.
id
;
form_params
[
'id'
]
=
$routeParams
.
id
;
form_params
[
'cmd'
]
=
'edit_object'
;
form_params
[
'cmd'
]
=
'edit_object'
;
}
}
else
{
else
{
form_params
[
'cmd'
]
=
'add_object'
;
form_params
[
'cmd'
]
=
'add_object'
;
}
}
form_params
[
'clear_wf'
]
=
1
;
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
;
console
.
log
(
d
);
$scope
.
schema
=
d
.
schema
;
$scope
.
schema
=
d
.
schema
;
$scope
.
form
=
d
.
form
;
$scope
.
form
=
d
.
form
;
delete
$scope
.
form
[
0
];
//$scope.form.push({"key": "birth_date", "format": "yyyy-mm-dd"});
//$scope.form.push({"key": "birth_date", "format": "yyyy-mm-dd"});
$scope
.
model
=
d
.
model
?
d
.
model
:
{};
$scope
.
model
=
d
.
model
?
d
.
model
:
{};
$scope
.
initialModel
=
angular
.
copy
(
d
.
model
);
$scope
.
initialModel
=
angular
.
copy
(
d
.
model
);
...
@@ -63,8 +66,6 @@ staff.controller('StaffAddEditCtrl', function ($scope, $http, $log, Generator, $
...
@@ -63,8 +66,6 @@ staff.controller('StaffAddEditCtrl', function ($scope, $http, $log, Generator, $
title
:
"Save"
title
:
"Save"
}
}
);
);
console
.
log
(
$scope
);
return
$scope
;
});
});
$scope
.
onSubmit
=
function
(
form
)
{
$scope
.
onSubmit
=
function
(
form
)
{
$scope
.
$broadcast
(
'schemaFormValidate'
);
$scope
.
$broadcast
(
'schemaFormValidate'
);
...
@@ -81,8 +82,8 @@ staff.controller('StaffAddEditCtrl', function ($scope, $http, $log, Generator, $
...
@@ -81,8 +82,8 @@ staff.controller('StaffAddEditCtrl', function ($scope, $http, $log, Generator, $
* Staff List Controller
* Staff List Controller
*/
*/
staff
.
controller
(
'StaffListCtrl'
,
function
(
$scope
,
$http
)
{
staff
.
controller
(
'StaffListCtrl'
,
function
(
$scope
,
$http
,
RESTURL
)
{
$http
.
post
(
'personel_duzenle_basitlestirilmis'
).
then
(
function
(
res
)
{
$http
.
post
(
RESTURL
.
url
+
'personel_duzenle_basitlestirilmis'
).
then
(
function
(
res
)
{
$scope
.
staffs
=
res
.
data
;
$scope
.
staffs
=
res
.
data
;
})
})
});
});
...
@@ -90,8 +91,8 @@ staff.controller('StaffListCtrl', function($scope, $http){
...
@@ -90,8 +91,8 @@ staff.controller('StaffListCtrl', function($scope, $http){
/**
/**
* Staff Show Controller
* Staff Show Controller
*/
*/
staff
.
controller
(
'StaffShowCtrl'
,
function
(
$scope
,
$http
,
$routeParams
)
{
staff
.
controller
(
'StaffShowCtrl'
,
function
(
$scope
,
$http
,
RESTURL
,
$routeParams
)
{
$http
.
post
(
'personel_duzenle_basitlestirilmis'
).
then
(
function
(
res
)
{
$http
.
post
(
RESTURL
.
url
+
'personel_duzenle_basitlestirilmis'
).
then
(
function
(
res
)
{
$scope
.
staff
=
res
.
data
[
0
];
$scope
.
staff
=
res
.
data
[
0
];
})
})
});
});
\ No newline at end of file
app/components/staff/templates/add.html
View file @
6c8f81fb
<div
ng-app=
"zaerp.staff
.add
"
>
<div
ng-app=
"zaerp.staff"
>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<h1>
{{ schema.title }}
</h1>
<h1>
{{ schema.title }}
</h1>
<form
name=
"formgenerated"
sf-schema=
"schema"
sf-form=
"form"
sf-model=
"model"
ng-submit=
"onSubmit(formgenerated)"
></form>
<form
name=
"formgenerated"
sf-schema=
"schema"
sf-form=
"form"
sf-model=
"model"
ng-submit=
"onSubmit(formgenerated)"
></form>
</div>
</div>
</div>
</div>
\ No newline at end of file
app/components/staff/templates/edit.html
View file @
6c8f81fb
<div
ng-app=
"zaerp.staff
.add
"
>
<div
ng-app=
"zaerp.staff"
>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<h1>
{{ schema.title }}
</h1>
<h1>
{{ schema.title }}
</h1>
<form
name=
"formgenerated"
sf-schema=
"schema"
sf-form=
"form"
sf-model=
"model"
ng-submit=
"onSubmit(formgenerated)"
></form>
<form
name=
"formgenerated"
sf-schema=
"schema"
sf-form=
"form"
sf-model=
"model"
ng-submit=
"onSubmit(formgenerated)"
></form>
</div>
</div>
</div>
</div>
\ No newline at end of file
app/index.html
View file @
6c8f81fb
...
@@ -10,11 +10,12 @@
...
@@ -10,11 +10,12 @@
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
ZAERP
</title>
<title>
ULAKBUS
</title>
<meta
name=
"description"
content=
""
>
<meta
name=
"description"
content=
""
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
href=
"bower_components/bootstrap/dist/css/bootstrap.css"
>
<link
rel=
"stylesheet"
href=
"bower_components/bootstrap/dist/css/bootstrap.css"
>
<!--<link rel="stylesheet" href="bower_components/quantumui/dist/css/addon/effect-light.min.css">-->
<!--<link rel="stylesheet" href="bower_components/quantumui/dist/css/addon/effect-light.min.css">-->
<!--<link rel="stylesheet" href="bower_components/quantumui/dist/css/quantumui.min.css">-->
<!--<link rel="stylesheet" href="bower_components/quantumui/dist/css/quantumui.min.css">-->
<link
rel=
"stylesheet"
href=
"app.css"
>
<link
rel=
"stylesheet"
href=
"app.css"
>
...
@@ -24,21 +25,21 @@
...
@@ -24,21 +25,21 @@
<nav
class=
"navbar navbar-inverse navbar-fixed-top"
>
<nav
class=
"navbar navbar-inverse navbar-fixed-top"
>
<div
class=
"container-fluid"
>
<div
class=
"container-fluid"
>
<div
class=
"navbar-header"
>
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle collapsed"
data-toggle=
"collapse"
data-target=
"#navbar"
<button
type=
"button"
class=
"navbar-toggle collapsed"
data-toggle=
"collapse"
data-target=
"#navbar"
aria-expanded=
"false"
aria-controls=
"navbar"
>
aria-expanded=
"false"
aria-controls=
"navbar"
>
<span
class=
"sr-only"
>
Toggle navigation
</span>
<span
class=
"sr-only"
>
Toggle navigation
</span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
</button>
<a
class=
"navbar-brand"
href=
"#"
>
ZAERP
</a>
<a
class=
"navbar-brand"
href=
"#"
>
ULAKBUS
</a>
</div>
</div>
<div
id=
"navbar"
class=
"navbar-collapse collapse"
>
<div
id=
"navbar"
class=
"navbar-collapse collapse"
>
<ul
class=
"nav navbar-nav navbar-right"
>
<ul
class=
"nav navbar-nav navbar-right"
>
<li><a
href=
"#/dashboard"
>
Dashboard
</a></li>
<li><a
href=
"#/dashboard"
>
Dashboard
</a></li>
<li><a
href=
"#/login"
>
Login
</a></li>
<li><a
href=
"#/login"
>
Login
</a></li>
<li><a
href=
"javascript:void(0);"
logout
>
Logout
<li><a
href=
"javascript:void(0);"
logout
>
Logout
</a></li>
</a></li>
</ul>
</ul>
<form
class=
"navbar-form navbar-right"
>
<form
class=
"navbar-form navbar-right"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"Search..."
>
<input
type=
"text"
class=
"form-control"
placeholder=
"Search..."
>
...
@@ -50,15 +51,17 @@
...
@@ -50,15 +51,17 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-3 col-md-2 sidebar"
>
<div
class=
"col-sm-3 col-md-2 sidebar"
>
<ul
class=
"nav nav-sidebar"
>
<ul
class=
"nav nav-sidebar"
>
<
li
active-link=
"active"
><a
href=
"#/students"
>
Students
</a></li
>
<
!--<li active-link="active"><a href="#/students">Students</a></li>--
>
<
li
active-link=
"active"
><a
href=
"#/student/add"
>
New Student
</a></li
>
<
!--<li active-link="active"><a href="#/student/add">New Student</a></li>--
>
<li
active-link=
"active"
><a
href=
"#/staffs"
>
Staffs
</a></li>
<li
active-link=
"active"
><a
href=
"#/staffs"
>
Staffs
</a></li>
<li
active-link=
"active"
><a
href=
"#/staff/add"
>
New Staff
</a></li>
<li
active-link=
"active"
><a
href=
"#/staff/add"
>
New Staff
</a>
<li
active-link=
"active"
><a
href=
"#/input_types"
>
Types
</a></li>
</li>
<!--<li active-link="active"><a href="#/input_types">Types</a></li>-->
</ul>
</ul>
</div>
</div>
<div
class=
"col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"
ng-view
>
<div
class=
"col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"
ng-view
>
</div>
</div>
...
@@ -72,21 +75,25 @@
...
@@ -72,21 +75,25 @@
<!-- In production use:
<!-- In production use:
<script src="//ajax.googleapis.com/ajax/libs/angularjs/x.x.x/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/x.x.x/angular.min.js"></script>
-->
-->
<script
src=
"bower_components/angular/angular.
min.
js"
></script>
<script
src=
"bower_components/angular/angular.js"
></script>
<script
src=
"bower_components/oclazyload/dist/ocLazyLoad.
min.
js"
></script>
<script
src=
"bower_components/oclazyload/dist/ocLazyLoad.js"
></script>
<script
src=
"bower_components/angular-route/angular-route.
min.
js"
></script>
<script
src=
"bower_components/angular-route/angular-route.js"
></script>
<script
src=
"bower_components/angular-cookies/angular-cookies.
min.
js"
></script>
<script
src=
"bower_components/angular-cookies/angular-cookies.js"
></script>
<script
src=
"bower_components/angular-resource/angular-resource.
min.
js"
></script>
<script
src=
"bower_components/angular-resource/angular-resource.js"
></script>
<script
type=
"text/javascript"
src=
"bower_components/angular-sanitize/angular-sanitize.min.js"
></script>
<script
type=
"text/javascript"
src=
"bower_components/angular-sanitize/angular-sanitize.js"
></script>
<script
type=
"text/javascript"
src=
"bower_components/tv4/tv4.js"
></script>
<script
type=
"text/javascript"
src=
"bower_components/tv4/tv4.js"
></script>
<script
type=
"text/javascript"
src=
"bower_components/objectpath/lib/ObjectPath.js"
></script>
<script
type=
"text/javascript"
src=
"bower_components/angular-schema-form/dist/schema-form.min.js"
></script>
<script
type=
"text/javascript"
<script
type=
"text/javascript"
src=
"bower_components/angular-schema-form-datepicker/"
></script>
src=
"bower_components/objectpath/lib/ObjectPath.js"
></script>
<script
type=
"text/javascript"
src=
"bower_components/angular-schema-form/dist/schema-form.js"
></script>
<script
type=
"text/javascript"
src=
"bower_components/angular-schema-form/dist/bootstrap-decorator.js"
></script>
<!--<script type="text/javascript"-->
<!--src="bower_components/angular-schema-form-datepicker/"></script>-->
<script
type=
"text/javascript"
src=
"bower_components/angular-schema-form-datepicker/bootstrap-datepicker.js"
></script>
<script
type=
"text/javascript"
src=
"bower_components/angular-schema-form-datepicker/bootstrap-datepicker.js"
></script>
<script
type=
"text/javascript"
src=
"bower_components/angular-schema-form/dist/bootstrap-decorator.min.js"
></script>
<script
src=
"app.js"
></script>
<script
src=
"app.js"
></script>
<script
src=
"zetalib/interceptors.js"
></script>
<script
src=
"zetalib/interceptors.js"
></script>
...
...
app/zetalib/interceptors.js
View file @
6c8f81fb
...
@@ -17,7 +17,7 @@ app.config(['$httpProvider', function ($httpProvider) {
...
@@ -17,7 +17,7 @@ app.config(['$httpProvider', function ($httpProvider) {
if
(
config
.
method
==
"POST"
){
if
(
config
.
method
==
"POST"
){
console
.
log
(
"post request"
)
console
.
log
(
"post request"
)
}
else
{
}
else
{
console
.
log
(
"get request"
)
}
}
return
config
;
return
config
;
},
},
...
...
bower.json
View file @
6c8f81fb
...
@@ -6,16 +6,17 @@
...
@@ -6,16 +6,17 @@
"license"
:
"GPL"
,
"license"
:
"GPL"
,
"private"
:
false
,
"private"
:
false
,
"dependencies"
:
{
"dependencies"
:
{
"angular"
:
"1.
4.2
"
,
"angular"
:
"1.
3.x
"
,
"angular-mocks"
:
"1.
4.2
"
,
"angular-mocks"
:
"1.
3.x
"
,
"angular-route"
:
"1.
4.2
"
,
"angular-route"
:
"1.
3.x
"
,
"angular-resource"
:
"1.
4.2
"
,
"angular-resource"
:
"1.
3.x
"
,
"angular-cookies"
:
"1.
4.2
"
,
"angular-cookies"
:
"1.
3.x
"
,
"bootstrap"
:
"3.3.4"
,
"bootstrap"
:
"3.3.4"
,
"angular-schema-form"
:
"0.8.3"
,
"angular-schema-form"
:
"0.8.3"
,
"angular-schema-form-datepicker"
:
"0.4.0"
,
"oclazyload"
:
"1.0.1"
"oclazyload"
:
"1.0.1"
},
},
"resolutions"
:
{
"resolutions"
:
{
"angular"
:
"
>= 1.2
"
"angular"
:
"
1.3.17
"
}
}
}
}
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