Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
origin-web-common
Overview
Overview
Details
Activity
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
Java-于龙
origin-web-common
Commits
f4e951e9
Commit
f4e951e9
authored
Sep 06, 2017
by
Sam Padgett
Committed by
GitHub
Sep 06, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #174 from benjaminapetersen/bpeterse/notification-id
Improve notification id
parents
9843de79
637141a4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
origin-web-common-ui.js
dist/origin-web-common-ui.js
+1
-1
origin-web-common.js
dist/origin-web-common.js
+1
-1
origin-web-common.min.js
dist/origin-web-common.min.js
+1
-1
notificationsService.js
src/ui-services/notificationsService.js
+1
-1
No files found.
dist/origin-web-common-ui.js
View file @
f4e951e9
...
...
@@ -2149,7 +2149,7 @@ angular.module('openshiftCommonUI').provider('NotificationsService', function()
};
var
addNotification
=
function
(
notification
)
{
notification
.
id
=
notification
.
id
||
_
.
uniqueId
(
'notification-'
);
notification
.
id
=
notification
.
id
||
_
.
uniqueId
(
'notification-'
)
+
Date
.
now
()
;
notification
.
timestamp
=
new
Date
().
toISOString
();
if
(
isNotificationPermanentlyHidden
(
notification
)
||
isNotificationVisible
(
notification
))
{
return
;
...
...
dist/origin-web-common.js
View file @
f4e951e9
...
...
@@ -5720,7 +5720,7 @@ angular.module('openshiftCommonUI').provider('NotificationsService', function()
};
var
addNotification
=
function
(
notification
)
{
notification
.
id
=
notification
.
id
||
_
.
uniqueId
(
'notification-'
);
notification
.
id
=
notification
.
id
||
_
.
uniqueId
(
'notification-'
)
+
Date
.
now
()
;
notification
.
timestamp
=
new
Date
().
toISOString
();
if
(
isNotificationPermanentlyHidden
(
notification
)
||
isNotificationVisible
(
notification
))
{
return
;
...
...
dist/origin-web-common.min.js
View file @
f4e951e9
...
...
@@ -2415,7 +2415,7 @@ this.dismissDelay = 8e3, this.autoDismissTypes = [ "info", "success" ], this.$ge
var
notifications
=
[],
dismissDelay
=
this
.
dismissDelay
,
autoDismissTypes
=
this
.
autoDismissTypes
,
notificationHiddenKey
=
function
(
notificationID
,
namespace
)
{
return
namespace
?
"hide/notification/"
+
namespace
+
"/"
+
notificationID
:
"hide/notification/"
+
notificationID
;
},
addNotification
=
function
(
notification
)
{
notification
.
id
=
notification
.
id
||
_
.
uniqueId
(
"notification-"
),
notification
.
timestamp
=
new
Date
().
toISOString
(),
isNotificationPermanentlyHidden
(
notification
)
||
isNotificationVisible
(
notification
)
||
(
notifications
.
push
(
notification
),
$rootScope
.
$emit
(
"NotificationsService.onNotificationAdded"
,
notification
));
notification
.
id
=
notification
.
id
||
_
.
uniqueId
(
"notification-"
)
+
Date
.
now
()
,
notification
.
timestamp
=
new
Date
().
toISOString
(),
isNotificationPermanentlyHidden
(
notification
)
||
isNotificationVisible
(
notification
)
||
(
notifications
.
push
(
notification
),
$rootScope
.
$emit
(
"NotificationsService.onNotificationAdded"
,
notification
));
},
hideNotification
=
function
(
notificationID
)
{
notificationID
&&
_
.
each
(
notifications
,
function
(
notification
)
{
notification
.
id
===
notificationID
&&
(
notification
.
hidden
=
!
0
);
...
...
src/ui-services/notificationsService.js
View file @
f4e951e9
...
...
@@ -18,7 +18,7 @@ angular.module('openshiftCommonUI').provider('NotificationsService', function()
};
var
addNotification
=
function
(
notification
)
{
notification
.
id
=
notification
.
id
||
_
.
uniqueId
(
'notification-'
);
notification
.
id
=
notification
.
id
||
_
.
uniqueId
(
'notification-'
)
+
Date
.
now
()
;
notification
.
timestamp
=
new
Date
().
toISOString
();
if
(
isNotificationPermanentlyHidden
(
notification
)
||
isNotificationVisible
(
notification
))
{
return
;
...
...
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