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
0b7f305c
Commit
0b7f305c
authored
Apr 04, 2016
by
bahadircyildiz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX rref #5246, fixes GH-94. outsideClick problem on notification dropdown elements were solved.
parent
e4bc77a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
directives.js
app/shared/directives.js
+9
-1
header-notification.html
app/shared/templates/directives/header-notification.html
+6
-6
No files found.
app/shared/directives.js
View file @
0b7f305c
...
...
@@ -51,6 +51,8 @@ angular.module('ulakbus')
* Group notifications
* @param notifications
*/
//test entries for notifications
$scope
.
testmessage
=
function
(){
$scope
.
notifications
[
1
].
push
({
title
:
"Kemange mage kako"
,
...
...
@@ -122,9 +124,15 @@ angular.module('ulakbus')
* @param items
* @todo: do it in detail page of notification
*/
$scope
.
markAsRead
=
function
(
item
,
group
,
index
)
{
$scope
.
markAsRead
=
function
(
event
,
item
,
group
,
index
)
{
//Added event parameter to stop propagate, so that behaviour of outsideClick won't be interrupted.
event
.
stopPropagation
();
WSOps
.
doSend
(
angular
.
toJson
({
data
:
{
view
:
'notify'
,
id
:
item
.
id
}}));
$scope
.
notifications
[
group
].
splice
(
index
,
1
);
$event
.
preventDefault
();
$event
.
stopPropagation
();
return
false
;
};
// if markasread triggered outside the directive
...
...
app/shared/templates/directives/header-notification.html
View file @
0b7f305c
...
...
@@ -30,7 +30,7 @@
</ul>
<!– /.dropdown-messages –>
</li>-->
<li
uib-dropdown
auto-close=
"
disabled
"
>
<li
uib-dropdown
auto-close=
"
outsideClick
"
>
<a
uib-dropdown-toggle
>
<div
class=
"badge"
ng-show=
"notifications[2].length > 0"
>
{{notifications[2].length}}
</div>
<i
class=
"fa fa-envelope fa-fw"
tooltip-placement=
"bottom"
uib-tooltip=
"Mesajlar"
></i>
<i
...
...
@@ -48,7 +48,7 @@
</div>
<div>
{{notify.body}}...
</div>
</div>
<span
ng-click=
"markAsRead(notify, 2, $index)"
class=
"pull-right fa fa-times"
></span>
<span
ng-click=
"markAsRead(
$event,
notify, 2, $index)"
class=
"pull-right fa fa-times"
></span>
</a>
</li>
<li
class=
"divider"
></li>
...
...
@@ -62,7 +62,7 @@
<!-- /.dropdown-messages -->
</li>
<!-- /.dropdown -->
<li
uib-dropdown
auto-close=
"
disabled
"
>
<li
uib-dropdown
auto-close=
"
outsideClick
"
>
<a
uib-dropdown-toggle
>
<div
class=
"badge"
ng-if=
"notifications[1].length > 0"
>
{{notifications[1].length}}
</div>
<i
class=
"fa fa-tasks fa-fw"
tooltip-placement=
"bottom"
uib-tooltip=
"Görevler"
></i>
<i
...
...
@@ -75,7 +75,7 @@
<p>
<strong>
{{notify.title}}
</strong>
<span
class=
"pull-right text-muted"
>
{{notify.body}}
</span>
<span
ng-click=
"markAsRead(notify, 1, $index)"
class=
"pull-right fa fa-times"
></span>
<span
ng-click=
"markAsRead(
$event,
notify, 1, $index)"
class=
"pull-right fa fa-times"
></span>
</p>
<!-- todo: progress bar will be used in future developments-->
<!--<div class="progress progress-striped active">-->
...
...
@@ -98,7 +98,7 @@
<!-- /.dropdown-tasks -->
</li>
<!-- /.dropdown -->
<li
uib-dropdown
auto-close=
"
disabled
"
>
<li
uib-dropdown
auto-close=
"
outsideClick
"
>
<a
uib-dropdown-toggle
>
<div
class=
"badge"
ng-if=
"notifications[3].length > 0"
>
{{notifications[3].length}}
</div>
<i
class=
"fa fa-bell fa-fw"
tooltip-placement=
"bottom"
uib-tooltip=
"Duyurular"
></i>
<i
...
...
@@ -110,7 +110,7 @@
<div>
<i
class=
"fa fa-comment fa-fw"
></i>
New Comment
<span
class=
"pull-right text-muted small"
>
4 minutes ago
</span>
<span
ng-click=
"markAsRead(notify, 3, $index)"
class=
"pull-right fa fa-times"
></span>
<span
ng-click=
"markAsRead(
$event,
notify, 3, $index)"
class=
"pull-right fa fa-times"
></span>
</div>
</a>
</li>
...
...
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