Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
class: 'tiny dialog',
overlay: true,
overlayClose: false,
templateUrl: 'partials/examples-dynamic-modal.html',
templateUrl: 'partials/examples-dynamic-modal2.html',
contentScope: {
close: function() {
modal.deactivate();
Expand Down
8 changes: 8 additions & 0 deletions docs/partials/examples-dynamic-modal2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="grid-block vertical text-center">
<div class="grid-content">
<strong>This modal was created programmatically using an <a href="https://docs.angularjs.org/guide/providers" target="_blank">Angular Factory</a></strong>
<br/>
<br/>
<a class="button" ng-click="close()">Close</a>
</div>
</div>
2 changes: 1 addition & 1 deletion docs/templates/modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ <h3>Angular-ize Your Modals</h3>
'class': 'tiny dialog',
'overlay': true,
'overlayClose': false,
'templateUrl': 'partials/examples-dynamic-modal.html',
'templateUrl': 'partials/examples-dynamic-modal2.html',
'contentScope': {
'close': function() {
modal.deactivate();
Expand Down
3 changes: 1 addition & 2 deletions js/angular/components/modal/modal.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<div
class="modal-overlay"
ng-click="hideOverlay()">
ng-click="hideOverlay($event)">
<aside
class="modal"
ng-click="$event.stopPropagation();"
ng-transclude>
</aside>
</div>
4 changes: 2 additions & 2 deletions js/angular/components/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
var overlayIn = 'fadeIn';
var overlayOut = 'fadeOut';

scope.hideOverlay = function() {
if(scope.overlayClose) {
scope.hideOverlay = function($event) {
if($event.target.id == attrs.id && scope.overlayClose) {
foundationApi.publish(attrs.id, 'close');
}
};
Expand Down