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
0fee5ee8
Commit
0fee5ee8
authored
Jul 09, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
options request preflight önleme
liste sayfası düzenleme
parent
3533ee66
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
staff_controller.js
app/components/staff/staff_controller.js
+4
-3
list.html
app/components/staff/templates/list.html
+5
-5
interceptors.js
app/zetalib/interceptors.js
+2
-1
No files found.
app/components/staff/staff_controller.js
View file @
0fee5ee8
...
...
@@ -32,8 +32,8 @@ staff.controller('StaffAddEditCtrl', function ($scope, $rootScope, $http, $log,
$rootScope
.
staffwfclear
=
1
}
Generator
.
get_form
(
$scope
.
url
,
form_params
).
then
(
function
(
data
)
{
var
d
=
data
.
data
.
forms
;
Generator
.
get_form
(
$scope
.
url
,
form_params
).
then
(
function
(
object
)
{
var
d
=
object
.
data
.
forms
;
// add form, schema and model to scope object
for
(
var
key
in
d
)
$scope
[
key
]
=
d
[
key
];
...
...
@@ -69,7 +69,8 @@ staff.controller('StaffListCtrl', function ($scope, $rootScope, Generator) {
}
Generator
.
get_form
(
'personel_duzenle_basitlestirilmis'
,
form_params
)
.
then
(
function
(
res
)
{
$scope
.
staffs
=
res
.
data
;
console
.
log
(
res
);
$scope
.
staffs
=
res
.
data
.
employees
;
});
});
...
...
app/components/staff/templates/list.html
View file @
0fee5ee8
<table
class=
"table table-bordered table-responsive"
>
<thead>
<tr>
<
th>
name
</th
>
<th
ng-repeat=
"(key,value) in staffs[0]"
>
{{ key }}
</th>
<
!--<th>{{ staffs[0].key }}</th>--
>
<th
ng-repeat=
"(key,value) in staffs[0]
.data
"
>
{{ key }}
</th>
<th>
action
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"staff in staffs"
>
<
td><a
ng-href=
"#/staff/{{staff.id}}"
>
{{staff.name}}
</a></td
>
<td
ng-repeat=
"(key,value) in staff"
>
{{value}}
</td>
<td><a
ng-href=
"#/staff/edit/{{staff.
id
}}"
>
Edit
</a></td>
<
!--<td><a ng-href="#/staff/{{staff.id}}">{{staff.name}}</a></td>--
>
<td
ng-repeat=
"(key,value) in staff
.data
"
>
{{value}}
</td>
<td><a
ng-href=
"#/staff/edit/{{staff.
key
}}"
>
Edit
</a></td>
</tr>
</tbody>
</table>
\ No newline at end of file
app/zetalib/interceptors.js
View file @
0fee5ee8
...
...
@@ -15,7 +15,8 @@ app.config(['$httpProvider', function ($httpProvider) {
'request'
:
function
(
config
){
// todo: delete console logs
if
(
config
.
method
==
"POST"
){
// to prevent OPTIONS preflight request
config
.
headers
[
"Content-Type"
]
=
"text/plain"
}
else
{
}
...
...
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