Skip to content

Commit

Permalink
1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsteele committed Jan 31, 2016
1 parent 9a3a001 commit 3d6ceea
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
13 changes: 7 additions & 6 deletions dist/ng-alerts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! ng-alerts 2016-01-21 */
/*! ng-alerts 2016-01-30 */
'use strict';

angular.module('ngAlerts', ['ui.bootstrap'])
Expand Down Expand Up @@ -82,7 +82,8 @@ angular.module('ngAlerts').directive('ngAlertsList', [
$scope.alerts = ngAlertsMngr.get();
}

$scope.remove = function (id) {
$scope.remove = function (id, $event) {
$event.stopImmediatePropagation();
ngAlertsMngr.remove(id);
};

Expand Down Expand Up @@ -163,9 +164,9 @@ angular.module('ngAlerts').directive('ngAlertsPopover', [
$element.removeAttr('ng-alerts-popover');

// @todo - Update this to not close when clicking on the window...
// if (!$attrs.popoverTrigger) {
// $element.attr('popover-trigger', 'outsideClick');
// }
if (!$attrs.popoverTrigger) {
$element.attr('popover-trigger', 'outsideClick');
}

// Custom classes not available yet
$element.attr('popover-class', 'ng-alerts-popover-list');
Expand Down Expand Up @@ -406,7 +407,7 @@ angular.module('ngAlerts').run(['$templateCache', function($templateCache) {
" {{alert.msg}}\n" +
" </td>\n" +
" <td>\n" +
" <button ng-click=\"remove(alert.id)\" type=\"button\" class=\"close\" aria-label=\"Close\">\n" +
" <button ng-click=\"remove(alert.id, $event)\" type=\"button\" class=\"close\" aria-label=\"Close\">\n" +
" <span aria-hidden=\"true\">&times;</span>\n" +
" </button>\n" +
" </td>\n" +
Expand Down
2 changes: 1 addition & 1 deletion dist/ng-alerts.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-alerts",
"version": "1.0.2",
"version": "1.0.3",
"description": "",
"main": "Gruntfile.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/directives/ng-alerts-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ angular.module('ngAlerts').directive('ngAlertsList', [
$scope.alerts = ngAlertsMngr.get();
}

$scope.remove = function (id) {
$scope.remove = function (id, $event) {
$event.stopImmediatePropagation();
ngAlertsMngr.remove(id);
};

Expand Down
6 changes: 3 additions & 3 deletions src/directives/ng-alerts-popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ angular.module('ngAlerts').directive('ngAlertsPopover', [
$element.removeAttr('ng-alerts-popover');

// @todo - Update this to not close when clicking on the window...
// if (!$attrs.popoverTrigger) {
// $element.attr('popover-trigger', 'outsideClick');
// }
if (!$attrs.popoverTrigger) {
$element.attr('popover-trigger', 'outsideClick');
}

// Custom classes not available yet
$element.attr('popover-class', 'ng-alerts-popover-list');
Expand Down
2 changes: 1 addition & 1 deletion src/tpls/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{{alert.msg}}
</td>
<td>
<button ng-click="remove(alert.id)" type="button" class="close" aria-label="Close">
<button ng-click="remove(alert.id, $event)" type="button" class="close" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</td>
Expand Down
6 changes: 3 additions & 3 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>

<!-- JS: ng-alerts -->
<script src="../dist/ng-alerts.min.js"></script>
<script src="../dist/ng-alerts.js"></script>

<!-- CSS: Dependencies -->
<link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.css">

<!-- CSS: ng-alerts -->
<link rel="stylesheet" href="../dist/ng-alerts.min.css">
<link rel="stylesheet" href="../dist/ng-alerts.css">

<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
Expand Down Expand Up @@ -70,7 +70,7 @@
<div class="container">
<ul class="nav navbar-nav navbar-right">
<li>
<a class="t" href="#" ng-alerts-popover popover-placement="bottom">
<a class="t" href="#" ng-alerts-popover popover-placement="bottom-right">
<ng-alerts-count badge="true" hide-empty="true"></ng-alerts-count> messages
</a>
</li>
Expand Down

0 comments on commit 3d6ceea

Please sign in to comment.