Skip to content

Commit fae09bf

Browse files
Merge branch 'master-local' into master-dist
2 parents 5ab9c19 + 06669bd commit fae09bf

File tree

62 files changed

+245
-151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+245
-151
lines changed

dist/angular-patternfly.js

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11217,8 +11217,8 @@ angular.module('patternfly.notification').component('pfNotificationList', {
1121711217
* @param {Array} notifications The list of current notifications to display. Each notification should have the following (see pfToastNotification):
1121811218
* <ul style='list-style-type: none'>
1121911219
* <li>.type - (String) The type of the notification message. Allowed value is one of these: 'success','info','danger', 'warning'
11220-
* <li>.header - (String) The header to display for the notification (optional)
11221-
* <li>.message - (String) The main text message of the notification.
11220+
* <li>.header - (String) The header to display for the notification, accepts HTML content when allowed. (optional)
11221+
* <li>.message - (String) The main text message of the notification. Accepts HTML content when allowed.
1122211222
* <li>.actionTitle Text to show for the primary action, optional.
1122311223
* <li>.actionCallback (function(this notification)) Function to invoke when primary action is selected, optional
1122411224
* <li>.menuActions Optional list of actions to place in the kebab menu:<br/>
@@ -11231,6 +11231,7 @@ angular.module('patternfly.notification').component('pfNotificationList', {
1123111231
* <li>.isPersistent Flag to show close button for the notification even if showClose is false.
1123211232
* </ul>
1123311233
* @param {Boolean} showClose Flag to show the close button on all notifications (not shown if the notification has menu actions)
11234+
* @param {Boolean} htmlContent Flag to allow HTML content within the header and message options.
1123411235
* @param {function} closeCallback (function(data)) Function to invoke when closes a toast notification
1123511236
* @param {function} updateViewing (function(boolean, data)) Function to invoke when user is viewing/not-viewing (hovering on) a toast notification
1123611237
*
@@ -11242,7 +11243,7 @@ angular.module('patternfly.notification').component('pfNotificationList', {
1124211243

1124311244
<file name="index.html">
1124411245
<div ng-controller="ToastNotificationListDemoCtrl" >
11245-
<pf-toast-notification-list notifications="notifications" show-close="showClose" close-callback="handleClose" update-viewing="updateViewing"></pf-toast-notification-list>
11246+
<pf-toast-notification-list notifications="notifications" show-close="showClose" html-content="htmlContent" close-callback="handleClose" update-viewing="updateViewing"></pf-toast-notification-list>
1124611247
<div class="row example-container">
1124711248
<div class="col-md-12">
1124811249
<form class="form-horizontal">
@@ -11294,9 +11295,13 @@ angular.module('patternfly.notification').component('pfNotificationList', {
1129411295
<input type="checkbox" ng-model="persistent"/>
1129511296
</div>
1129611297
<label class="col-sm-2 control-label" for="type">Show Menu:</label>
11297-
<div class="col-sm-2">
11298+
<div class="col-sm-1">
1129811299
<input type="checkbox" ng-model="showMenu"/>
1129911300
</div>
11301+
<label class="col-sm-2 control-label" for="type">Allow HTML:</label>
11302+
<div class="col-sm-1">
11303+
<input type="checkbox" ng-model="htmlContent"/>
11304+
</div>
1130011305
</div>
1130111306
<div class="form-group">
1130211307
<div class="col-sm-12">
@@ -11328,8 +11333,9 @@ angular.module('patternfly.notification').component('pfNotificationList', {
1132811333

1132911334
$scope.type = $scope.types[0];
1133011335
$scope.header = 'Default header.';
11331-
$scope.message = 'Default notification message.';
11336+
$scope.message = 'Default <strong>notification</strong> message.';
1133211337
$scope.showClose = false;
11338+
$scope.htmlContent = false;
1133311339
$scope.persistent = false;
1133411340

1133511341
$scope.primaryAction = '';
@@ -11403,7 +11409,7 @@ angular.module('patternfly.notification').component('pfNotificationList', {
1140311409
$scope.handleAction,
1140411410
($scope.showMenu ? $scope.menuActions : undefined)
1140511411
);
11406-
}
11412+
};
1140711413

1140811414
$scope.notifications = Notifications.data;
1140911415
});
@@ -11415,6 +11421,7 @@ angular.module('patternfly.notification').component('pfToastNotificationList', {
1141511421
bindings: {
1141611422
notifications: '=',
1141711423
showClose: '=?',
11424+
htmlContent: '<?',
1141811425
closeCallback: '=?',
1141911426
updateViewing: '=?'
1142011427
},
@@ -11435,16 +11442,18 @@ angular.module('patternfly.notification').component('pfToastNotificationList', {
1143511442
};
1143611443
}
1143711444
});
11445+
1143811446
;/**
1143911447
* @ngdoc directive
1144011448
* @name patternfly.notification.component:pfToastNotification
1144111449
* @restrict E
1144211450
* @scope
1144311451
*
1144411452
* @param {string} notificationType The type of the notification message. Allowed value is one of these: 'success','info','danger', 'warning'
11445-
* @param {string} header The header text of the notification.
11446-
* @param {string} message The main text message of the notification.
11453+
* @param {string} header The header text of the notification. Accepts HTML content when allowed.
11454+
* @param {string} message The main text message of the notification. Accepts HTML content when allowed.
1144711455
* @param {boolean} showClose Flag to show the close button, default: true
11456+
* @param {boolean} htmlContent Flag to allow HTML content within the header and message options.
1144811457
* @param {function} closeCallback (function(data)) Function to invoke when close action is selected, optional
1144911458
* @param {string} actionTitle Text to show for the primary action, optional.
1145011459
* @param {function} actionCallback (function(data)) Function to invoke when primary action is selected, optional
@@ -11474,9 +11483,9 @@ angular.module('patternfly.notification').component('pfToastNotificationList', {
1147411483
<div ng-controller="ToastNotificationDemoCtrl" class="row example-container">
1147511484
<div class="col-md-12">
1147611485
<pf-toast-notification notification-type="{{type}}" header="{{header}}" message="{{message}}"
11477-
show-close="{{showClose}}" close-callback="closeCallback"
11478-
action-title="{{primaryAction}}" action-callback="handleAction"
11479-
menu-actions="menuActions">
11486+
show-close="{{showClose}}" html-content="htmlContent"
11487+
close-callback="closeCallback" action-title="{{primaryAction}}"
11488+
action-callback="handleAction" menu-actions="menuActions">
1148011489
</pf-toast-notification>
1148111490

1148211491
<form class="form-horizontal">
@@ -11518,13 +11527,17 @@ angular.module('patternfly.notification').component('pfToastNotificationList', {
1151811527
</div>
1151911528
<div class="form-group">
1152011529
<label class="col-sm-2 control-label" for="type">Show Close:</label>
11521-
<div class="col-sm-3">
11530+
<div class="col-sm-1">
1152211531
<input type="checkbox" ng-model="showClose"/>
1152311532
</div>
1152411533
<label class="col-sm-2 control-label" for="type">Show Menu:</label>
11525-
<div class="col-sm-3">
11534+
<div class="col-sm-1">
1152611535
<input type="checkbox" ng-model="showMenu"/>
1152711536
</div>
11537+
<label class="col-sm-2 control-label" for="type">Allow HTML:</label>
11538+
<div class="col-sm-1">
11539+
<input type="checkbox" ng-model="htmlContent"/>
11540+
</div>
1152811541
</div>
1152911542
</form>
1153011543
</div>
@@ -11542,9 +11555,10 @@ angular.module('patternfly.notification').component('pfToastNotificationList', {
1154211555
$scope.types = ['success','info','danger', 'warning'];
1154311556
$scope.type = $scope.types[0];
1154411557
$scope.showClose = false;
11558+
$scope.htmlContent = false;
1154511559

1154611560
$scope.header = 'Default Header.';
11547-
$scope.message = 'Default Message.';
11561+
$scope.message = 'Default <strong>notification</strong> message.';
1154811562
$scope.primaryAction = '';
1154911563

1155011564
$scope.updateType = function(item) {
@@ -11619,6 +11633,7 @@ angular.module( 'patternfly.notification' ).component('pfToastNotification', {
1161911633
'message': '@',
1162011634
'header': '@',
1162111635
'showClose': '@',
11636+
'htmlContent': '<?',
1162211637
'closeCallback': '=?',
1162311638
'actionTitle': '@',
1162411639
'actionCallback': '=?',
@@ -11627,7 +11642,7 @@ angular.module( 'patternfly.notification' ).component('pfToastNotification', {
1162711642
'data': '=?'
1162811643
},
1162911644
templateUrl: 'notification/toast-notification.html',
11630-
controller: function () {
11645+
controller: ["$sce", function ($sce) {
1163111646
'use strict';
1163211647
var ctrl = this,
1163311648
_showClose;
@@ -11686,8 +11701,13 @@ angular.module( 'patternfly.notification' ).component('pfToastNotification', {
1168611701
ctrl.updateShowClose();
1168711702
}
1168811703
};
11689-
}
11704+
11705+
ctrl.trustAsHtml = function (html) {
11706+
return $sce.trustAsHtml(html);
11707+
};
11708+
}]
1169011709
});
11710+
1169111711
;/**
1169211712
* @ngdoc directive
1169311713
* @name patternfly.pagination.component:pfPagination
@@ -18343,12 +18363,12 @@ angular.module('patternfly.wizard').component('pfWizard', {
1834318363

1834418364

1834518365
$templateCache.put('notification/toast-notification-list.html',
18346-
"<div class=toast-notifications-list-pf data-ng-show=\"$ctrl.notifications.length > 0\"><div ng-repeat=\"notification in $ctrl.notifications\"><pf-toast-notification notification-type={{notification.type}} header={{notification.header}} message={{notification.message}} show-close=\"{{($ctrl.showClose || notification.isPersistent === true) && !(notification.menuActions && notification.menuActions.length > 0)}}\" close-callback=$ctrl.handleClose action-title={{notification.actionTitle}} action-callback=notification.actionCallback menu-actions=notification.menuActions update-viewing=$ctrl.handleViewingChange data=notification></pf-toast-notification></div></div>"
18366+
"<div class=toast-notifications-list-pf data-ng-show=\"$ctrl.notifications.length > 0\"><div ng-repeat=\"notification in $ctrl.notifications\"><pf-toast-notification notification-type={{notification.type}} header={{notification.header}} message={{notification.message}} show-close=\"{{($ctrl.showClose || notification.isPersistent === true) && !(notification.menuActions && notification.menuActions.length > 0)}}\" html-content=$ctrl.htmlContent close-callback=$ctrl.handleClose action-title={{notification.actionTitle}} action-callback=notification.actionCallback menu-actions=notification.menuActions update-viewing=$ctrl.handleViewingChange data=notification></pf-toast-notification></div></div>"
1834718367
);
1834818368

1834918369

1835018370
$templateCache.put('notification/toast-notification.html',
18351-
"<div class=\"toast-pf alert alert-{{$ctrl.notificationType}}\" ng-class=\"{'alert-dismissable': $ctrl.showCloseButton}\" ng-mouseenter=$ctrl.handleEnter() ng-mouseleave=$ctrl.handleLeave()><div uib-dropdown class=\"pull-right dropdown-kebab-pf\" ng-if=\"$ctrl.menuActions && $ctrl.menuActions.length > 0\"><button uib-dropdown-toggle class=\"btn btn-link\" type=button id=dropdownKebabRight><span class=\"fa fa-ellipsis-v\"></span></button><ul uib-dropdown-menu class=dropdown-menu-right aria-labelledby=dropdownKebabRight><li ng-repeat=\"menuAction in $ctrl.menuActions\" role=\"{{menuAction.isSeparator === true ? 'separator' : 'menuitem'}}\" ng-class=\"{'divider': menuAction.isSeparator === true, 'disabled': menuAction.isDisabled === true}\"><a ng-if=\"menuAction.isSeparator !== true\" class=secondary-action title={{menuAction.title}} ng-click=$ctrl.handleMenuAction(menuAction)>{{menuAction.name}}</a></li></ul></div><button ng-if=$ctrl.showCloseButton type=button class=close aria-hidden=true ng-click=$ctrl.handleClose()><span class=\"pficon pficon-close\"></span></button><div class=\"pull-right toast-pf-action\" ng-if=$ctrl.actionTitle><a ng-click=$ctrl.handleAction()>{{$ctrl.actionTitle}}</a></div><span class=\"pficon pficon-ok\" ng-if=\"$ctrl.notificationType === 'success'\"></span> <span class=\"pficon pficon-info\" ng-if=\"$ctrl.notificationType === 'info'\"></span> <span class=\"pficon pficon-error-circle-o\" ng-if=\"$ctrl.notificationType === 'danger'\"></span> <span class=\"pficon pficon-warning-triangle-o\" ng-if=\"$ctrl.notificationType === 'warning'\"></span> <span ng-if=$ctrl.header><strong>{{$ctrl.header}}</strong> {{$ctrl.message}}</span> <span ng-if=!$ctrl.header>{{$ctrl.message}}</span></div>"
18371+
"<div class=\"toast-pf alert alert-{{$ctrl.notificationType}}\" ng-class=\"{'alert-dismissable': $ctrl.showCloseButton}\" ng-mouseenter=$ctrl.handleEnter() ng-mouseleave=$ctrl.handleLeave()><div uib-dropdown class=\"pull-right dropdown-kebab-pf\" ng-if=\"$ctrl.menuActions && $ctrl.menuActions.length > 0\"><button uib-dropdown-toggle class=\"btn btn-link\" type=button id=dropdownKebabRight><span class=\"fa fa-ellipsis-v\"></span></button><ul uib-dropdown-menu class=dropdown-menu-right aria-labelledby=dropdownKebabRight><li ng-repeat=\"menuAction in $ctrl.menuActions\" role=\"{{menuAction.isSeparator === true ? 'separator' : 'menuitem'}}\" ng-class=\"{'divider': menuAction.isSeparator === true, 'disabled': menuAction.isDisabled === true}\"><a ng-if=\"menuAction.isSeparator !== true\" class=secondary-action title={{menuAction.title}} ng-click=$ctrl.handleMenuAction(menuAction)>{{menuAction.name}}</a></li></ul></div><button ng-if=$ctrl.showCloseButton type=button class=close aria-hidden=true ng-click=$ctrl.handleClose()><span class=\"pficon pficon-close\"></span></button><div class=\"pull-right toast-pf-action\" ng-if=$ctrl.actionTitle><a ng-click=$ctrl.handleAction()>{{$ctrl.actionTitle}}</a></div><span class=\"pficon pficon-ok\" ng-if=\"$ctrl.notificationType === 'success'\"></span> <span class=\"pficon pficon-info\" ng-if=\"$ctrl.notificationType === 'info'\"></span> <span class=\"pficon pficon-error-circle-o\" ng-if=\"$ctrl.notificationType === 'danger'\"></span> <span class=\"pficon pficon-warning-triangle-o\" ng-if=\"$ctrl.notificationType === 'warning'\"></span> <span ng-if=!$ctrl.htmlContent><strong ng-if=$ctrl.header ng-bind=$ctrl.header></strong> <span ng-bind=$ctrl.message></span></span> <span ng-if=$ctrl.htmlContent><strong ng-if=$ctrl.header ng-bind-html=$ctrl.trustAsHtml($ctrl.header)></strong> <span ng-bind-html=$ctrl.trustAsHtml($ctrl.message)></span></span></div>"
1835218372
);
1835318373

1835418374
}]);

dist/angular-patternfly.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)