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
4ec688a8
Commit
4ec688a8
authored
Sep 16, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/#143/Formsets'
parents
3dc0b101
e4ab66b6
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
331 additions
and
197 deletions
+331
-197
app.js
app/app.js
+1
-0
app_routes.js
app/app_routes.js
+4
-4
crud_controller.js
app/components/crud/crud_controller.js
+0
-2
list.html
app/components/crud/templates/list.html
+25
-3
index.html
app/index.html
+1
-0
directives.js
app/shared/directives.js
+10
-6
add.html
app/shared/templates/add.html
+17
-29
header-breadcrumb.html
app/shared/templates/directives/header-breadcrumb.html
+6
-0
header-notification.html
app/shared/templates/directives/header-notification.html
+3
-4
header-sub-menu-buttons.html
app/shared/templates/directives/header-sub-menu-buttons.html
+0
-3
header-sub-menu.html
app/shared/templates/directives/header-sub-menu.html
+3
-8
sidebar.html
app/shared/templates/directives/sidebar.html
+2
-2
foreignKey.html
app/shared/templates/foreignKey.html
+1
-1
nodeTable.html
app/shared/templates/nodeTable.html
+25
-0
form_service.js
app/zetalib/forms/form_service.js
+135
-75
interceptors.js
app/zetalib/interceptors.js
+3
-2
app.js
dist/app.js
+2
-2
components.js
dist/bower_components/components.js
+1
-1
templates.js
dist/templates.js
+91
-55
index.html
index.html
+1
-0
No files found.
app/app.js
View file @
4ec688a8
...
@@ -32,6 +32,7 @@ var app = angular.module(
...
@@ -32,6 +32,7 @@ var app = angular.module(
*/
*/
constant
(
"RESTURL"
,
(
function
()
{
constant
(
"RESTURL"
,
(
function
()
{
return
{
url
:
"http://"
+
window
.
location
.
hostname
+
":9001/"
};
return
{
url
:
"http://"
+
window
.
location
.
hostname
+
":9001/"
};
//return {url: "http://api.ulakbus.net/"};
})()).
})()).
/**
/**
* USER_ROLES and AUTH_EVENTS are constant for auth functions
* USER_ROLES and AUTH_EVENTS are constant for auth functions
...
...
app/app_routes.js
View file @
4ec688a8
...
@@ -10,19 +10,19 @@ app.config(['$routeProvider', function ($routeProvider) {
...
@@ -10,19 +10,19 @@ app.config(['$routeProvider', function ($routeProvider) {
templateUrl
:
'components/dashboard/dashboard.html'
,
templateUrl
:
'components/dashboard/dashboard.html'
,
controller
:
'DashCtrl'
controller
:
'DashCtrl'
})
})
.
when
(
'/
crud/
:model/add'
,
{
.
when
(
'/:model/add'
,
{
templateUrl
:
'components/crud/templates/add.html'
,
templateUrl
:
'components/crud/templates/add.html'
,
controller
:
'CRUDAddEditCtrl'
controller
:
'CRUDAddEditCtrl'
})
})
.
when
(
'/
crud/
:model/edit/:id'
,
{
.
when
(
'/:model/edit/:id'
,
{
templateUrl
:
'components/crud/templates/add.html'
,
templateUrl
:
'components/crud/templates/add.html'
,
controller
:
'CRUDAddEditCtrl'
controller
:
'CRUDAddEditCtrl'
})
})
.
when
(
'/
crud/
:model'
,
{
.
when
(
'/:model'
,
{
templateUrl
:
'components/crud/templates/list.html'
,
templateUrl
:
'components/crud/templates/list.html'
,
controller
:
'CRUDListCtrl'
controller
:
'CRUDListCtrl'
})
})
.
when
(
'/
crud/
:model/:id'
,
{
.
when
(
'/:model/:id'
,
{
templateUrl
:
'components/crud/templates/show.html'
,
templateUrl
:
'components/crud/templates/show.html'
,
controller
:
'CRUDShowCtrl'
controller
:
'CRUDShowCtrl'
})
})
...
...
app/components/crud/crud_controller.js
View file @
4ec688a8
...
@@ -33,8 +33,6 @@ crud.controller('CRUDAddEditCtrl', function ($scope, $rootScope, $location, $htt
...
@@ -33,8 +33,6 @@ crud.controller('CRUDAddEditCtrl', function ($scope, $rootScope, $location, $htt
$scope
.
onSubmit
=
function
(
form
)
{
$scope
.
onSubmit
=
function
(
form
)
{
$scope
.
$broadcast
(
'schemaFormValidate'
);
$scope
.
$broadcast
(
'schemaFormValidate'
);
debugger
;
if
(
form
.
$valid
)
{
if
(
form
.
$valid
)
{
Generator
.
submit
(
$scope
)
Generator
.
submit
(
$scope
)
.
success
(
function
(
data
){
.
success
(
function
(
data
){
...
...
app/components/crud/templates/list.html
View file @
4ec688a8
...
@@ -3,7 +3,12 @@
...
@@ -3,7 +3,12 @@
<table
class=
"table table-bordered"
style=
"background-color:#fff;"
>
<table
class=
"table table-bordered"
style=
"background-color:#fff;"
>
<thead>
<thead>
<tr>
<tr>
<th
colspan=
"2"
>
#
</th>
<th
colspan=
"2"
>
<label>
<input
type=
"checkbox"
style=
"zoom:1.5; margin:5px 0 0 8px;"
>
Hepsini Seç
</label>
</th>
<th
ng-repeat=
"(key,value) in objects[0].data"
>
{{ key }}
</th>
<th
ng-repeat=
"(key,value) in objects[0].data"
>
{{ key }}
</th>
<th>
action
</th>
<th>
action
</th>
</tr>
</tr>
...
@@ -18,10 +23,27 @@
...
@@ -18,10 +23,27 @@
<th
scope=
"row"
style=
"text-align:center"
>
1
</th>
<th
scope=
"row"
style=
"text-align:center"
>
1
</th>
<td
ng-repeat=
"(key,value) in object.data"
>
{{value}}
</td>
<td
ng-repeat=
"(key,value) in object.data"
>
{{value}}
</td>
<td>
<td>
<a
ng-href=
"#/
crud/
{{model}}/edit/{{object.key}}"
>
Edit
</a><br>
<a
ng-href=
"#/{{model}}/edit/{{object.key}}"
>
Edit
</a><br>
<a
ng-href=
"#/
crud/
{{model}}/{{object.key}}"
>
Show
</a>
<a
ng-href=
"#/{{model}}/{{object.key}}"
>
Show
</a>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-default dropdown-toggle"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
İşlemler
<span
class=
"caret"
></span>
</button>
<ul
class=
"dropdown-menu"
>
<li><a
href=
""
>
İşlem 1
</a></li>
<li><a
href=
""
>
İşlem 2
</a></li>
<li><a
href=
""
>
İşlem 3
</a></li>
<li
role=
"separator"
class=
"divider"
></li>
<li><a
href=
""
>
İşlem 4
</a></li>
</ul>
</div>
<hr>
</div>
</div>
\ No newline at end of file
app/index.html
View file @
4ec688a8
...
@@ -64,6 +64,7 @@
...
@@ -64,6 +64,7 @@
<script
src=
"bower_components/angular/angular.min.js"
></script>
<script
src=
"bower_components/angular/angular.min.js"
></script>
<script
src=
"bower_components/jquery/dist/jquery.min.js"
></script>
<script
src=
"bower_components/jquery/dist/jquery.min.js"
></script>
<script
src=
"bower_components/bootstrap/dist/js/bootstrap.min.js"
></script>
<script
src=
"bower_components/angular-route/angular-route.min.js"
></script>
<script
src=
"bower_components/angular-route/angular-route.min.js"
></script>
<script
src=
"bower_components/angular-cookies/angular-cookies.min.js"
></script>
<script
src=
"bower_components/angular-cookies/angular-cookies.min.js"
></script>
<script
src=
"bower_components/angular-resource/angular-resource.min.js"
></script>
<script
src=
"bower_components/angular-resource/angular-resource.min.js"
></script>
...
...
app/shared/directives.js
View file @
4ec688a8
...
@@ -45,19 +45,23 @@ app.directive('headerSubMenu', function () {
...
@@ -45,19 +45,23 @@ app.directive('headerSubMenu', function () {
// todo: double make it but single not solve this!
// todo: double make it but single not solve this!
angular
.
element
(
$
(
'#submitbutton'
)).
triggerHandler
(
'click'
);
angular
.
element
(
$
(
'#submitbutton'
)).
triggerHandler
(
'click'
);
angular
.
element
(
$
(
'#submitbutton'
)).
triggerHandler
(
'click'
);
angular
.
element
(
$
(
'#submitbutton'
)).
triggerHandler
(
'click'
);
//$scope.$broadcast('schemaFormValidate');
//$scope.onSubmit(angular.element($('#submitbutton')).scope().formgenerated);
}
}
}
}
}
}
});
});
// todo: unused delete
app
.
directive
(
'headerBreadcrumb'
,
function
(
$location
)
{
app
.
directive
(
'headerSubMenuButtons'
,
function
()
{
return
{
return
{
templateUrl
:
'shared/templates/directives/header-
sub-menu-buttons
.html'
,
templateUrl
:
'shared/templates/directives/header-
breadcrumb
.html'
,
restrict
:
'E'
,
restrict
:
'E'
,
replace
:
true
replace
:
true
,
link
:
function
(
$scope
){
$scope
.
$watch
(
'$routeUpdate'
,
function
(){
// todo: create actual links
//debugger;
$scope
.
links
=
$location
.
path
().
split
(
'/'
);
});
}
}
}
});
});
...
...
app/shared/templates/add.html
View file @
4ec688a8
<h1>
{{ schema.title }}
</h1>
<h1>
{{ schema.title }}
</h1>
<form
id=
"formgenerated"
name=
"formgenerated"
sf-schema=
"schema"
sf-form=
"form"
sf-model=
"model"
></form>
<form
id=
"formgenerated"
name=
"formgenerated"
sf-schema=
"schema"
sf-form=
"form"
sf-model=
"model"
></form>
<div
ng-repeat=
"node in listnodes"
>
<div
ng-repeat=
"node in Node"
>
<h3>
{{ node.title }}
<span
ng-if=
"node.lengthModels < 1"
>
<a
href=
"javascript:void(0);"
modal-for-nodes=
"{{node.title}},Node"
>
<i
class=
"fa fa-plus-circle fa-fw"
></i>
</a>
</span>
</h3>
<ng-include
src=
"'shared/templates/nodeTable.html'"
ng-if=
"node.lengthModels > 0"
></ng-include>
<hr>
</div>
<div
ng-repeat=
"node in ListNode"
>
<h3>
{{ node.title }}
<h3>
{{ node.title }}
<span>
<span>
<a
href=
"javascript:void(0);"
add-modal-for-list-node=
{{node.title}}
>
<a
href=
"javascript:void(0);"
modal-for-nodes=
"{{node.title}},ListNode"
>
<i
class=
"fa fa-plus-circle fa-fw"
></i>
<i
class=
"fa fa-plus-circle fa-fw"
></i>
</a>
</a>
</span>
</span>
</h3>
</h3>
<table
class=
"table table-bordered"
style=
"background-color:#fff;"
>
<ng-include
src=
"'shared/templates/nodeTable.html'"
ng-if=
"node.lengthModels > 0"
></ng-include>
<thead>
<hr>
<tr>
<th
colspan=
"2"
>
#
</th>
<th
ng-repeat=
"(key,value) in node.fields"
>
{{ value.title }}
</th>
<th>
action
</th>
</tr>
</thead>
<tbody>
<tr>
<td
width=
"60"
>
<label>
<input
type=
"checkbox"
style=
"zoom:1.5; margin:5px 0 0 8px;"
>
</label>
</td>
<th
scope=
"row"
style=
"text-align:center"
>
1
</th>
<td
ng-repeat=
"(key,value) in node.models"
>
{{ value.value }}
</td>
<td>
<a
ng-href=
"#/crud/{{model}}/edit/{{object.key}}"
>
Edit
</a><br>
<a
ng-href=
"#/crud/{{model}}/{{object.key}}"
>
Show
</a>
<a
ng-href=
"#/crud/{{model}}/{{object.key}}"
>
Delete
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<button
id=
"submitbutton"
type=
"button"
class=
"btn btn-primary"
ng-click=
"onSubmit(formgenerated)"
>
Kaydet
</button>
<button
id=
"submitbutton"
type=
"button"
class=
"btn btn-primary"
ng-click=
"onSubmit(formgenerated)"
>
Kaydet
</button>
<button
type=
"button"
class=
"btn btn-warning"
>
Düzenle
</button>
<!-- todo: make it conditional -->
<!-- <button type="button" class="btn btn-warning">Düzenle</button> todo: make it conditional -->
<button
type=
"button"
class=
"btn btn-danger"
>
İptal
</button>
<!-- todo: turn back to previous page -->
<!-- <button type="button" class="btn btn-danger">İptal</button> todo: turn back to previous page -->
\ No newline at end of file
\ No newline at end of file
app/shared/templates/directives/header-breadcrumb.html
0 → 100644
View file @
4ec688a8
<ul
class=
"breadcrumb"
>
<li
ng-repeat=
"link in links"
ng-class=
"{'active':$last}"
>
<a
href=
"#"
ng-if=
"!$last"
>
{{link}}
</a>
<span
ng-if=
"$last"
>
{{link}}
</span>
</li>
</ul>
\ No newline at end of file
app/shared/templates/directives/header-notification.html
View file @
4ec688a8
...
@@ -194,13 +194,12 @@
...
@@ -194,13 +194,12 @@
<i
class=
"fa fa-user fa-fw"
></i>
<i
class=
"fa fa-caret-down"
></i>
<i
class=
"fa fa-user fa-fw"
></i>
<i
class=
"fa fa-caret-down"
></i>
</a>
</a>
<ul
class=
"dropdown-menu dropdown-user"
>
<ul
class=
"dropdown-menu dropdown-user"
>
<li><a
href=
"#"
><i
class=
"fa fa-user fa-fw"
></i>
User Profile
</a>
<li><a
href=
"#"
><i
class=
"fa fa-user fa-fw"
></i>
Profil
</a>
</li>
</li>
<li><a
href=
"#"
><i
class=
"fa fa-gear fa-fw"
></i>
Settings
</a>
<li><a
href=
"#"
><i
class=
"fa fa-gear fa-fw"
></i>
Ayarlar
</a>
</li>
</li>
<li><a
href=
"http://www.strapui.com/"
><i
class=
"fa fa-eye fa-fw"
></i>
Premium Angular Themes
</a></li>
<li
class=
"divider"
></li>
<li
class=
"divider"
></li>
<li><a
ui-sref=
"login"
href=
"javascript:void(0);"
logout
><i
class=
"fa fa-sign-out fa-fw"
></i>
Logout
</a>
<li><a
ui-sref=
"login"
href=
"javascript:void(0);"
logout
><i
class=
"fa fa-sign-out fa-fw"
></i>
Çıkış
</a>
</li>
</li>
</ul>
</ul>
<!-- /.dropdown-user -->
<!-- /.dropdown-user -->
...
...
app/shared/templates/directives/header-sub-menu-buttons.html
deleted
100644 → 0
View file @
3dc0b101
<button
type=
"button"
class=
"btn btn-primary"
ng-click=
"onSubmit(formgenerated)"
>
Kaydet
</button>
<button
type=
"button"
class=
"btn btn-warning"
>
Düzenle
</button>
<button
type=
"button"
class=
"btn btn-danger"
>
İptal
</button>
\ No newline at end of file
app/shared/templates/directives/header-sub-menu.html
View file @
4ec688a8
<div
class=
"manager-view-header container-fluid"
>
<div
class=
"manager-view-header container-fluid"
>
<ul
class=
"breadcrumb"
>
<header-breadcrumb></header-breadcrumb>
<li><a
href=
"#"
>
Personeller
</a></li>
<li><a
href=
"#"
>
Liste
</a></li>
<li
class=
"active"
>
Tablo
</li>
</ul>
<!--<header-sub-menu-buttons></header-sub-menu-buttons>-->
<div
id=
"header-buttons"
>
<div
id=
"header-buttons"
>
<button
type=
"button"
class=
"btn btn-primary"
ng-click=
"triggerSubmit()"
>
Kaydet
</button>
<button
type=
"button"
class=
"btn btn-primary"
ng-click=
"triggerSubmit()"
>
Kaydet
</button>
<
button
type=
"button"
class=
"btn btn-warning"
>
Düzenle
</button
>
<
!--<button type="button" class="btn btn-warning">Düzenle</button>--
>
<
button
type=
"button"
class=
"btn btn-danger"
>
İptal
</button
>
<
!--<button type="button" class="btn btn-danger">İptal</button>--
>
</div>
</div>
</div>
</div>
\ No newline at end of file
app/shared/templates/directives/sidebar.html
View file @
4ec688a8
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
class=
"fa arrow"
></span></a>
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
collapse=
"collapseVar!={{key}}"
>
<ul
class=
"nav nav-second-level"
collapse=
"collapseVar!={{key}}"
>
<li
ui-sref-active=
"active"
>
<li
ui-sref-active=
"active"
>
<a
href=
"#/
crud/
{{item}}"
>
List
</a>
<a
href=
"#/{{item}}"
>
List
</a>
</li>
</li>
<li
ui-sref-active=
"active"
>
<li
ui-sref-active=
"active"
>
<a
href=
"#/
crud/
{{item}}/add"
>
Add
</a>
<a
href=
"#/{{item}}/add"
>
Add
</a>
</li>
</li>
</ul>
</ul>
<!-- /.nav-second-level -->
<!-- /.nav-second-level -->
...
...
app/shared/templates/foreignKey.html
View file @
4ec688a8
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<div
class=
"help-block"
sf-message=
"form.description"
></div>
<div
class=
"help-block"
sf-message=
"form.description"
></div>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<a
href=
"javascript:void(0);"
add-modal
>
<a
href=
"javascript:void(0);"
add-modal
-for-linked-model
>
<i
class=
"fa fa-plus-circle fa-fw"
></i>
<i
class=
"fa fa-plus-circle fa-fw"
></i>
</a>
</a>
</div>
</div>
...
...
app/shared/templates/nodeTable.html
0 → 100644
View file @
4ec688a8
<table
class=
"table table-bordered"
style=
"background-color:#fff;"
>
<thead>
<tr>
<th
colspan=
"2"
>
#
</th>
<th
ng-repeat=
"(key,value) in node.fields"
>
{{ value.title }}
</th>
<th>
action
</th>
</tr>
</thead>
<tbody>
<tr>
<td
width=
"60"
>
<label>
<input
type=
"checkbox"
style=
"zoom:1.5; margin:5px 0 0 8px;"
>
</label>
</td>
<th
scope=
"row"
style=
"text-align:center"
>
1
</th>
<td
ng-repeat=
"(key,value) in node.models"
>
{{ value.value }}
</td>
<td>
<a
ng-href=
"#/crud/{{model}}/edit/{{object.key}}"
>
Edit
</a><br>
<a
ng-href=
"#/crud/{{model}}/{{object.key}}"
>
Show
</a>
<a
ng-href=
"#/crud/{{model}}/{{object.key}}"
>
Delete
</a>
</td>
</tr>
</tbody>
</table>
\ No newline at end of file
app/zetalib/forms/form_service.js
View file @
4ec688a8
This diff is collapsed.
Click to expand it.
app/zetalib/interceptors.js
View file @
4ec688a8
...
@@ -31,8 +31,9 @@ app.config(['$httpProvider', function ($httpProvider) {
...
@@ -31,8 +31,9 @@ app.config(['$httpProvider', function ($httpProvider) {
$location
.
path
(
"/dashboard"
);
$location
.
path
(
"/dashboard"
);
}
}
}
}
if
(
response
.
data
.
screen
)
{
if
(
response
.
data
.
client_cmd
)
{
$location
.
path
(
response
.
data
.
screen
);
//$location.path(response.data.screen);
console
.
log
(
response
.
data
.
client_cmd
);
}
}
return
response
;
return
response
;
},
},
...
...
dist/app.js
View file @
4ec688a8
This diff is collapsed.
Click to expand it.
dist/bower_components/components.js
View file @
4ec688a8
This diff is collapsed.
Click to expand it.
dist/templates.js
View file @
4ec688a8
This diff is collapsed.
Click to expand it.
index.html
View file @
4ec688a8
...
@@ -72,6 +72,7 @@
...
@@ -72,6 +72,7 @@
<!-- @if NODE_ENV == 'DEVELOPMENT' -->
<!-- @if NODE_ENV == 'DEVELOPMENT' -->
<script
src=
"bower_components/angular/angular.min.js"
></script>
<script
src=
"bower_components/angular/angular.min.js"
></script>
<script
src=
"bower_components/jquery/dist/jquery.min.js"
></script>
<script
src=
"bower_components/jquery/dist/jquery.min.js"
></script>
<script
src=
"bower_components/bootstrap/dist/js/bootstrap.min.js"
></script>
<script
src=
"bower_components/angular-route/angular-route.min.js"
></script>
<script
src=
"bower_components/angular-route/angular-route.min.js"
></script>
<script
src=
"bower_components/angular-cookies/angular-cookies.min.js"
></script>
<script
src=
"bower_components/angular-cookies/angular-cookies.min.js"
></script>
<script
src=
"bower_components/angular-resource/angular-resource.min.js"
></script>
<script
src=
"bower_components/angular-resource/angular-resource.min.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