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
8becd820
Commit
8becd820
authored
Dec 07, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
selected user popover
icons for menu items
parent
685aef41
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
142 additions
and
137 deletions
+142
-137
crud_controller.js
app/components/crud/crud_controller.js
+3
-1
dashboard_controller.js
app/components/dashboard/dashboard_controller.js
+1
-14
index.html
app/index.html
+6
-6
main.html
app/main.html
+6
-6
directives.js
app/shared/directives.js
+27
-5
selected-user.html
app/shared/templates/directives/selected-user.html
+8
-41
selectedUserPopover.html
app/shared/templates/directives/selectedUserPopover.html
+24
-0
sidebar.html
app/shared/templates/directives/sidebar.html
+8
-5
interceptors.js
app/zetalib/interceptors.js
+4
-2
app.js
dist/app.js
+3
-3
components.js
dist/bower_components/components.js
+1
-1
index.html
dist/index.html
+6
-6
templates.js
dist/templates.js
+45
-47
No files found.
app/components/crud/crud_controller.js
View file @
8becd820
...
@@ -16,7 +16,7 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
...
@@ -16,7 +16,7 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
* Crud Utility is a service to provide functionality for Crud controllers
* Crud Utility is a service to provide functionality for Crud controllers
* @returns {object}
* @returns {object}
*/
*/
.
service
(
'CrudUtility'
,
function
(
$log
)
{
.
service
(
'CrudUtility'
,
function
(
$log
,
$rootScope
)
{
return
{
return
{
/**
/**
* @name generateParam
* @name generateParam
...
@@ -50,6 +50,8 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
...
@@ -50,6 +50,8 @@ angular.module('ulakbus.crud', ['ui.bootstrap', 'schemaForm', 'formService'])
if
(
scope
.
param_id
)
{
if
(
scope
.
param_id
)
{
scope
.
form_params
.
filters
.
push
({
field
:
scope
.
param
,
values
:
[
scope
.
param_id
],
type
:
'check'
});
scope
.
form_params
.
filters
.
push
({
field
:
scope
.
param
,
values
:
[
scope
.
param_id
],
type
:
'check'
});
// do not use selected user, get and broadcast data of user in param_id
$rootScope
.
$broadcast
(
'selectedUserTrigger'
,
[
scope
.
param
,
scope
.
param_id
]);
}
}
scope
.
model
=
scope
.
form_params
.
model
;
scope
.
model
=
scope
.
form_params
.
model
;
...
...
app/components/dashboard/dashboard_controller.js
View file @
8becd820
...
@@ -51,25 +51,12 @@ angular.module('ulakbus.dashboard', ['ngRoute'])
...
@@ -51,25 +51,12 @@ angular.module('ulakbus.dashboard', ['ngRoute'])
};
};
$scope
.
select
=
function
(
who
,
type
)
{
$scope
.
select
=
function
(
who
,
type
)
{
$rootScope
.
selectedUser
=
{
name
:
who
[
0
],
tcno
:
who
[
1
],
key
:
who
[
2
]};
$rootScope
.
$broadcast
(
'selectedUser'
,
{
name
:
who
[
0
],
tcno
:
who
[
1
],
key
:
who
[
2
]});
// get 'who's related transactions and manipulate sidebar menu
// get 'who's related transactions and manipulate sidebar menu
$rootScope
.
$broadcast
(
"menuitems"
,
type
);
$rootScope
.
$broadcast
(
"menuitems"
,
type
);
// save selected user and type to cookie
// its a development issue and will be deleted todo: remove at production
//$cookies.put("selectedUserName", who[0]);
//$cookies.put("selectedUserTcNo", who[1]);
//$cookies.put("selectedUserKey", who[2]);
//$cookies.put("selectedUserType", type);
};
};
// if selected user in cookie, set selectedUser
//if ($cookies.getAll()["selectedUser"]) {
// $rootScope.selectedUser = {name: $cookies.get("selectedUserName"), tcno: $cookies.get("selectedUserTcNo"), key: $cookies.get("selectedUserKey")};
//}
$scope
.
$on
(
"notifications"
,
function
(
event
,
data
)
{
$scope
.
$on
(
"notifications"
,
function
(
event
,
data
)
{
$scope
.
notifications
=
data
;
$scope
.
notifications
=
data
;
});
});
...
...
app/index.html
View file @
8becd820
...
@@ -30,12 +30,12 @@
...
@@ -30,12 +30,12 @@
<nav
class=
"navbar navbar-default navbar-static-top"
role=
"navigation"
style=
"margin-bottom: 0"
ng-if=
"$root.loggedInUser"
>
<nav
class=
"navbar navbar-default navbar-static-top"
role=
"navigation"
style=
"margin-bottom: 0"
ng-if=
"$root.loggedInUser"
>
<collapse-menu></collapse-menu>
<collapse-menu></collapse-menu>
<
ul
class=
"header-menu"
>
<
!--<ul class="header-menu">--
>
<
li><a
href=
""
>
Mesajlar
</a></li
>
<
!--<li><a href="">Mesajlar</a></li>--
>
<
li><a
href=
""
>
Görevler
</a></li
>
<
!--<li><a href="">Görevler</a></li>--
>
<
li><a
href=
""
>
Raporlar
</a></li
>
<
!--<li><a href="">Raporlar</a></li>--
>
<
li><a
href=
""
>
Ayarlar
</a></li
>
<
!--<li><a href="">Ayarlar</a></li>--
>
<
/ul
>
<
!--</ul>--
>
<div
class=
"navbar-header"
>
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<span
class=
"sr-only"
>
Toggle navigation
</span>
<span
class=
"sr-only"
>
Toggle navigation
</span>
...
...
app/main.html
View file @
8becd820
...
@@ -37,12 +37,12 @@
...
@@ -37,12 +37,12 @@
<nav
class=
"navbar navbar-default navbar-static-top"
role=
"navigation"
style=
"margin-bottom: 0"
ng-if=
"$root.loggedInUser"
>
<nav
class=
"navbar navbar-default navbar-static-top"
role=
"navigation"
style=
"margin-bottom: 0"
ng-if=
"$root.loggedInUser"
>
<collapse-menu></collapse-menu>
<collapse-menu></collapse-menu>
<
ul
class=
"header-menu"
>
<
!--<ul class="header-menu">--
>
<
li><a
href=
""
>
Mesajlar
</a></li
>
<
!--<li><a href="">Mesajlar</a></li>--
>
<
li><a
href=
""
>
Görevler
</a></li
>
<
!--<li><a href="">Görevler</a></li>--
>
<
li><a
href=
""
>
Raporlar
</a></li
>
<
!--<li><a href="">Raporlar</a></li>--
>
<
li><a
href=
""
>
Ayarlar
</a></li
>
<
!--<li><a href="">Ayarlar</a></li>--
>
<
/ul
>
<
!--</ul>--
>
<div
class=
"navbar-header"
>
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<span
class=
"sr-only"
>
Toggle navigation
</span>
<span
class=
"sr-only"
>
Toggle navigation
</span>
...
...
app/shared/directives.js
View file @
8becd820
...
@@ -97,7 +97,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
...
@@ -97,7 +97,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
"x-schema-form"
:
{
placeholder
:
"Arama kriteri giriniz..."
}
"x-schema-form"
:
{
placeholder
:
"Arama kriteri giriniz..."
}
}
}
},
},
required
:
[
'searchbox'
]
required
:
[]
};
};
$scope
.
searchModel
=
{
searchbox
:
''
};
$scope
.
searchModel
=
{
searchbox
:
''
};
...
@@ -255,13 +255,31 @@ app.directive('logout', function ($http, $location, RESTURL) {
...
@@ -255,13 +255,31 @@ app.directive('logout', function ($http, $location, RESTURL) {
* selected user directive
* selected user directive
*/
*/
.
directive
(
'selectedUser'
,
function
()
{
.
directive
(
'selectedUser'
,
function
(
$http
,
RESTURL
)
{
return
{
return
{
templateUrl
:
'shared/templates/directives/selected-user.html'
,
templateUrl
:
'shared/templates/directives/selected-user.html'
,
restrict
:
'E'
,
restrict
:
'E'
,
replace
:
fals
e
,
replace
:
tru
e
,
link
:
function
(
$scope
,
$rootScope
)
{
link
:
function
(
$scope
,
$rootScope
)
{
$scope
.
selectedUser
=
$rootScope
.
selectedUser
;
$scope
.
$on
(
'selectedUser'
,
function
(
$event
,
data
)
{
$scope
.
selectedUser
=
data
;
$scope
.
dynamicPopover
=
{
content
:
''
,
name
:
data
.
name
,
tcno
:
data
.
tcno
,
key
:
data
.
key
,
templateUrl
:
'shared/templates/directives/selectedUserPopover.html'
,
title
:
'İşlem Yapılan Kişi'
};
});
$scope
.
$on
(
'selectedUserTrigger'
,
function
(
$event
,
data
)
{
var
postToApi
=
{
model
:
'Personel'
,
cmd
:
'show'
,
id
:
data
[
1
]};
//postToApi[data[0]]=data[1];
$http
.
get
(
RESTURL
.
url
+
'ara/personel/'
+
data
[
1
]).
success
(
function
(
data
)
{
}
);
})
}
}
};
};
})
})
...
@@ -324,7 +342,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
...
@@ -324,7 +342,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
//}
//}
$timeout
(
function
()
{
$timeout
(
function
()
{
sidebarmenu
.
metisMenu
()
sidebarmenu
.
metisMenu
()
;
});
});
});
});
...
@@ -340,6 +358,10 @@ app.directive('logout', function ($http, $location, RESTURL) {
...
@@ -340,6 +358,10 @@ app.directive('logout', function ($http, $location, RESTURL) {
});
});
});
});
$scope
.
$on
(
'selectedUser'
,
function
(
$event
,
data
)
{
$scope
.
selectedUser
=
data
;
});
$scope
.
openSidebar
=
function
()
{
$scope
.
openSidebar
=
function
()
{
if
(
$window
.
innerWidth
>
'768'
)
{
if
(
$window
.
innerWidth
>
'768'
)
{
if
(
$rootScope
.
sidebarPinned
===
0
)
{
if
(
$rootScope
.
sidebarPinned
===
0
)
{
...
...
app/shared/templates/directives/selected-user.html
View file @
8becd820
<a
href=
"#"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"Tooltip on left"
>
İşlem: {{$root.selectedUser.name}}
</a>
<span
uib-popover-template=
"dynamicPopover.templateUrl"
popover-title=
"{{dynamicPopover.title}}"
<!-- sidebar-person-info -->
popover-trigger=
"click"
<!--<div class="tooltip" role="tooltip">-->
popover-placement=
"bottom"
<!--<!–<button class="btn btn-primary close-sidebar-person-info">Profili Kapat</button>–>-->
type=
"button"
<!--<div class="identity">-->
ng-if=
"selectedUser"
<!--<div class="identity-header clearfix">-->
class=
""
>
İşlem yapılan kişi:
<i
class=
"fa fa-fw fa-user"
></i>
<b>
{{selectedUser.name}}
</b>
<i
<!--<img src="../../../img/sample-profile-pic.jpg">-->
class=
"fa fa-caret-down"
></i></span>
<!--<div class="pull-left">-->
\ No newline at end of file
<!--<p class="identity-name">{{$root.selectedUser.name}}</p>-->
<!--<!–<p class="identity-surname">Öğümsöğütlü</p>–>-->
<!--</div>-->
<!--</div>-->
<!--<!– end of identity-header –>-->
<!--<div class="identity-info">-->
<!--<div class="clearfix">-->
<!--<span class="fa fa-phone"></span> <div>539 241 65 08</div>-->
<!--</div>-->
<!--<div class="clearfix">-->
<!--<span class="fa fa-envelope"></span>-->
<!--<div>erkanogum@gmail.com</div>-->
<!--</div>-->
<!--<div class="clearfix">-->
<!--<span class="fa fa-home"></span>-->
<!--<div>İşçi Blokları Mah. 1524. sokak B Blok 6. Kat A Kanat 27 numara</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<!– end of identity –>-->
<!--<div class="person-actions">-->
<!--<ul>-->
<!--<li><a href="#"><span class="fa fa-trash"></span> Action 1</a></li>-->
<!--<li><a href="#"><span class="fa fa-trash"></span> Action 2</a></li>-->
<!--<li><a href="#"><span class="fa fa-trash"></span> Action 3</a></li>-->
<!--<li><a href="#"><span class="fa fa-trash"></span> Action 4</a></li>-->
<!--<li><a href="#"><span class="fa fa-trash"></span> Action 5</a></li>-->
<!--</ul>-->
<!--</div>-->
<!--<!– end of person-actions –>-->
<!--</div>-->
<!-- end of sidebar-person-info -->
\ No newline at end of file
app/shared/templates/directives/selectedUserPopover.html
0 → 100644
View file @
8becd820
<div
style=
"width:400px;"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<img
src=
"img/sample-profile-pic.jpg"
alt=
"{{dynamicPopover.name}}"
class=
"img-thumbnail"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<table
class=
"table table-condensed"
>
<tbody>
<tr>
<td>
Ad:
</td>
<td>
{{dynamicPopover.name}}
</td>
</tr>
<tr>
<td>
TC Kimlik No:
</td>
<td>
{{dynamicPopover.tcno}}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
\ No newline at end of file
app/shared/templates/directives/sidebar.html
View file @
8becd820
...
@@ -15,11 +15,14 @@
...
@@ -15,11 +15,14 @@
<li
ng-repeat=
"(key, item) in menuItems"
ng-class=
"{active: collapseVar == $index+1}"
>
{{dropDown}}
<li
ng-repeat=
"(key, item) in menuItems"
ng-class=
"{active: collapseVar == $index+1}"
>
{{dropDown}}
<a
href=
""
ng-click=
"check($index+1)"
>
<a
href=
""
ng-click=
"check($index+1)"
>
<i
class=
"fa fa-fw
fa-cogs
"
<i
class=
"fa fa-fw"
ng-class=
"{
ng-class=
"{
'other': 'fa fa-fw fa-wrench',
'Admin': 'fa fa-fw fa-terminal',
'ogrenci': 'fa fa-fw fa-university',
'Genel': 'fa fa-fw fa-graduation-cap',
'personel': 'fa fa-fwkey-users'}[item[0].baseCategory]"
></i>
'Alt Kategori': 'fa fa-fw fa-tags',
'Kadro Islemleri': 'fa fa-fw fa-users',
'Seçime Uygun Görevler':'fa fa-fw fa-users'
}[item[0].kategori]"
></i>
<span
class=
"menu-text"
ng-class=
"{hidden: $root.collapsed}"
>
{{ key }}
</span>
<span
class=
"menu-text"
ng-class=
"{hidden: $root.collapsed}"
>
{{ key }}
</span>
<span
class=
"fa arrow"
ng-class=
"{hidden: $root.collapsed}"
></span>
<span
class=
"fa arrow"
ng-class=
"{hidden: $root.collapsed}"
></span>
</a>
</a>
...
@@ -27,7 +30,7 @@
...
@@ -27,7 +30,7 @@
<li
ng-repeat=
"(k, v) in item"
>
<li
ng-repeat=
"(k, v) in item"
>
<!--<a ng-if="v.model" ng-href="#{{v.url}}" ng- -->
<!--<a ng-if="v.model" ng-href="#{{v.url}}" ng- -->
<!--ng-click="breadcrumb([key, v.text], $event)">{{v.text}}</a>-->
<!--ng-click="breadcrumb([key, v.text], $event)">{{v.text}}</a>-->
<a
ng-href=
"#/{{v.wf}}/{{v.model}}?{{v.param}}={{
$root.
selectedUser.key}}"
<a
ng-href=
"#/{{v.wf}}/{{v.model}}?{{v.param}}={{selectedUser.key}}"
ng-click=
"breadcrumb([key, v.text], $event)"
>
{{v.text}}
</a>
ng-click=
"breadcrumb([key, v.text], $event)"
>
{{v.text}}
</a>
</li>
</li>
</ul>
</ul>
...
...
app/zetalib/interceptors.js
View file @
8becd820
...
@@ -83,7 +83,7 @@ app.config(['$httpProvider', function ($httpProvider) {
...
@@ -83,7 +83,7 @@ app.config(['$httpProvider', function ($httpProvider) {
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'<div class="modal-footer">'
+
'<div class="modal-footer">'
+
'<button type="button" class="btn btn-default" data-dismiss="modal">
Close
</button>'
+
'<button type="button" class="btn btn-default" data-dismiss="modal">
Kapat
</button>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
...
@@ -91,7 +91,9 @@ app.config(['$httpProvider', function ($httpProvider) {
...
@@ -91,7 +91,9 @@ app.config(['$httpProvider', function ($httpProvider) {
};
};
if
(
rejection
.
status
===
-
1
)
{
if
(
rejection
.
status
===
-
1
)
{
rejection
.
data
=
{
title
:
"error"
,
description
:
'connection failed'
};
rejection
.
status
=
'Sunucu hatası'
rejection
.
data
=
{
title
:
""
,
description
:
'Sunucu bağlantısında bir hata oluştu.'
+
'Lütfen yetkili personelle iletişime geçiniz.'
};
errorModal
();
errorModal
();
}
}
...
...
dist/app.js
View file @
8becd820
This diff is collapsed.
Click to expand it.
dist/bower_components/components.js
View file @
8becd820
This diff is collapsed.
Click to expand it.
dist/index.html
View file @
8becd820
...
@@ -23,12 +23,12 @@
...
@@ -23,12 +23,12 @@
<nav
class=
"navbar navbar-default navbar-static-top"
role=
"navigation"
style=
"margin-bottom: 0"
ng-if=
"$root.loggedInUser"
>
<nav
class=
"navbar navbar-default navbar-static-top"
role=
"navigation"
style=
"margin-bottom: 0"
ng-if=
"$root.loggedInUser"
>
<collapse-menu></collapse-menu>
<collapse-menu></collapse-menu>
<
ul
class=
"header-menu"
>
<
!--<ul class="header-menu">--
>
<
li><a
href=
""
>
Mesajlar
</a></li
>
<
!--<li><a href="">Mesajlar</a></li>--
>
<
li><a
href=
""
>
Görevler
</a></li
>
<
!--<li><a href="">Görevler</a></li>--
>
<
li><a
href=
""
>
Raporlar
</a></li
>
<
!--<li><a href="">Raporlar</a></li>--
>
<
li><a
href=
""
>
Ayarlar
</a></li
>
<
!--<li><a href="">Ayarlar</a></li>--
>
<
/ul
>
<
!--</ul>--
>
<div
class=
"navbar-header"
>
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".navbar-collapse"
>
<span
class=
"sr-only"
>
Toggle navigation
</span>
<span
class=
"sr-only"
>
Toggle navigation
</span>
...
...
dist/templates.js
View file @
8becd820
This diff is collapsed.
Click to expand it.
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