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
1db8e559
Commit
1db8e559
authored
Sep 15, 2017
by
Ben Petersen
Committed by
GitHub
Sep 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #183 from benjaminapetersen/bpeterse/notification-config
Add ui config for notifications
parents
66dc55b0
37ed3693
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
4 deletions
+27
-4
origin-web-common-ui.js
dist/origin-web-common-ui.js
+8
-1
origin-web-common.js
dist/origin-web-common.js
+8
-1
origin-web-common.min.js
dist/origin-web-common.min.js
+0
-0
templates.js
dist/scripts/templates.js
+3
-1
toast-notifications.html
src/components/toast-notifications/toast-notifications.html
+3
-1
toastNotifications.js
src/components/toast-notifications/toastNotifications.js
+3
-0
notificationsService.js
src/ui-services/notificationsService.js
+2
-0
No files found.
dist/origin-web-common-ui.js
View file @
1db8e559
...
...
@@ -408,7 +408,9 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
$templateCache
.
put
(
'src/components/toast-notifications/toast-notifications.html'
,
"<div class=
\"
toast-notifications-list-pf
\"
>
\
n"
+
" <div ng-repeat=
\"
(notificationID, notification) in notifications track by notification.trackByID
\"
ng-if=
\"
!notification.hidden || notification.isHover
\"
\
n"
+
" <div
\
n"
+
" ng-repeat=
\"
(notificationID, notification) in notifications track by notification.trackByID
\"
\
n"
+
" ng-if=
\"
!notification.hidden || notification.isHover
\"
\
n"
+
" ng-mouseenter=
\"
setHover(notification, true)
\"
ng-mouseleave=
\"
setHover(notification, false)
\"
>
\
n"
+
" <div class=
\"
toast-pf alert {{notification.type | alertStatus}}
\"
ng-class=
\"
{'alert-dismissable': !hideCloseButton}
\"
>
\
n"
+
" <button ng-if=
\"
!hideCloseButton
\"
type=
\"
button
\"
class=
\"
close
\"
ng-click=
\"
close(notification)
\"
>
\
n"
+
...
...
@@ -1185,6 +1187,9 @@ angular.module('openshiftCommonUI')
// Listen for updates from NotificationsService to show a notification.
var
deregisterNotificationListener
=
$rootScope
.
$on
(
'NotificationsService.onNotificationAdded'
,
function
(
event
,
notification
)
{
if
(
notification
.
skipToast
)
{
return
;
}
$scope
.
$evalAsync
(
function
()
{
$scope
.
notifications
.
push
(
notification
);
if
(
NotificationsService
.
isAutoDismiss
(
notification
))
{
...
...
@@ -2152,6 +2157,8 @@ angular.module('openshiftCommonUI').provider('NotificationsService', function()
// notifications may already have an id that is not necessarily unique,
// this is an explicitly unique id just for `track by` in templates
notification
.
trackByID
=
_
.
uniqueId
(
'notification-'
)
+
Date
.
now
();
notification
.
skipToast
=
notification
.
skipToast
||
false
;
notification
.
showInDrawer
=
notification
.
showInDrawer
||
false
;
notification
.
timestamp
=
new
Date
().
toISOString
();
if
(
isNotificationPermanentlyHidden
(
notification
)
||
isNotificationVisible
(
notification
))
{
return
;
...
...
dist/origin-web-common.js
View file @
1db8e559
...
...
@@ -579,7 +579,9 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
$templateCache
.
put
(
'src/components/toast-notifications/toast-notifications.html'
,
"<div class=
\"
toast-notifications-list-pf
\"
>
\
n"
+
" <div ng-repeat=
\"
(notificationID, notification) in notifications track by notification.trackByID
\"
ng-if=
\"
!notification.hidden || notification.isHover
\"
\
n"
+
" <div
\
n"
+
" ng-repeat=
\"
(notificationID, notification) in notifications track by notification.trackByID
\"
\
n"
+
" ng-if=
\"
!notification.hidden || notification.isHover
\"
\
n"
+
" ng-mouseenter=
\"
setHover(notification, true)
\"
ng-mouseleave=
\"
setHover(notification, false)
\"
>
\
n"
+
" <div class=
\"
toast-pf alert {{notification.type | alertStatus}}
\"
ng-class=
\"
{'alert-dismissable': !hideCloseButton}
\"
>
\
n"
+
" <button ng-if=
\"
!hideCloseButton
\"
type=
\"
button
\"
class=
\"
close
\"
ng-click=
\"
close(notification)
\"
>
\
n"
+
...
...
@@ -1356,6 +1358,9 @@ angular.module('openshiftCommonUI')
// Listen for updates from NotificationsService to show a notification.
var
deregisterNotificationListener
=
$rootScope
.
$on
(
'NotificationsService.onNotificationAdded'
,
function
(
event
,
notification
)
{
if
(
notification
.
skipToast
)
{
return
;
}
$scope
.
$evalAsync
(
function
()
{
$scope
.
notifications
.
push
(
notification
);
if
(
NotificationsService
.
isAutoDismiss
(
notification
))
{
...
...
@@ -5763,6 +5768,8 @@ angular.module('openshiftCommonUI').provider('NotificationsService', function()
// notifications may already have an id that is not necessarily unique,
// this is an explicitly unique id just for `track by` in templates
notification
.
trackByID
=
_
.
uniqueId
(
'notification-'
)
+
Date
.
now
();
notification
.
skipToast
=
notification
.
skipToast
||
false
;
notification
.
showInDrawer
=
notification
.
showInDrawer
||
false
;
notification
.
timestamp
=
new
Date
().
toISOString
();
if
(
isNotificationPermanentlyHidden
(
notification
)
||
isNotificationVisible
(
notification
))
{
return
;
...
...
dist/origin-web-common.min.js
View file @
1db8e559
This diff is collapsed.
Click to expand it.
dist/scripts/templates.js
View file @
1db8e559
...
...
@@ -379,7 +379,9 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac
$templateCache
.
put
(
'src/components/toast-notifications/toast-notifications.html'
,
"<div class=
\"
toast-notifications-list-pf
\"
>
\
n"
+
" <div ng-repeat=
\"
(notificationID, notification) in notifications track by notification.trackByID
\"
ng-if=
\"
!notification.hidden || notification.isHover
\"
\
n"
+
" <div
\
n"
+
" ng-repeat=
\"
(notificationID, notification) in notifications track by notification.trackByID
\"
\
n"
+
" ng-if=
\"
!notification.hidden || notification.isHover
\"
\
n"
+
" ng-mouseenter=
\"
setHover(notification, true)
\"
ng-mouseleave=
\"
setHover(notification, false)
\"
>
\
n"
+
" <div class=
\"
toast-pf alert {{notification.type | alertStatus}}
\"
ng-class=
\"
{'alert-dismissable': !hideCloseButton}
\"
>
\
n"
+
" <button ng-if=
\"
!hideCloseButton
\"
type=
\"
button
\"
class=
\"
close
\"
ng-click=
\"
close(notification)
\"
>
\
n"
+
...
...
src/components/toast-notifications/toast-notifications.html
View file @
1db8e559
<div
class=
"toast-notifications-list-pf"
>
<div
ng-repeat=
"(notificationID, notification) in notifications track by notification.trackByID"
ng-if=
"!notification.hidden || notification.isHover"
<div
ng-repeat=
"(notificationID, notification) in notifications track by notification.trackByID"
ng-if=
"!notification.hidden || notification.isHover"
ng-mouseenter=
"setHover(notification, true)"
ng-mouseleave=
"setHover(notification, false)"
>
<div
class=
"toast-pf alert {{notification.type | alertStatus}}"
ng-class=
"{'alert-dismissable': !hideCloseButton}"
>
<button
ng-if=
"!hideCloseButton"
type=
"button"
class=
"close"
ng-click=
"close(notification)"
>
...
...
src/components/toast-notifications/toastNotifications.js
View file @
1db8e559
...
...
@@ -56,6 +56,9 @@ angular.module('openshiftCommonUI')
// Listen for updates from NotificationsService to show a notification.
var
deregisterNotificationListener
=
$rootScope
.
$on
(
'NotificationsService.onNotificationAdded'
,
function
(
event
,
notification
)
{
if
(
notification
.
skipToast
)
{
return
;
}
$scope
.
$evalAsync
(
function
()
{
$scope
.
notifications
.
push
(
notification
);
if
(
NotificationsService
.
isAutoDismiss
(
notification
))
{
...
...
src/ui-services/notificationsService.js
View file @
1db8e559
...
...
@@ -21,6 +21,8 @@ angular.module('openshiftCommonUI').provider('NotificationsService', function()
// notifications may already have an id that is not necessarily unique,
// this is an explicitly unique id just for `track by` in templates
notification
.
trackByID
=
_
.
uniqueId
(
'notification-'
)
+
Date
.
now
();
notification
.
skipToast
=
notification
.
skipToast
||
false
;
notification
.
showInDrawer
=
notification
.
showInDrawer
||
false
;
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