Skip to content

Commit

Permalink
fix(modal): applied @AGiorgetti's fix for angular-ui#969
Browse files Browse the repository at this point in the history
  • Loading branch information
BastianVoigt committed Sep 23, 2013
1 parent 4fc0e83 commit ddc275a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,16 @@ angular.module('ui.bootstrap.modal', [])
.directive('modalWindow', ['$timeout', function ($timeout) {
return {
restrict: 'EA',
scope: {
index: '@'
},
replace: true,
transclude: true,
templateUrl: 'template/modal/window.html',
link: function (scope, element, attrs) {
scope.windowClass = attrs.windowClass || '';
scope.$$modal = {};
scope.$$modal.index = attrs.index || 0;
scope.$$modal.windowClass = attrs.windowClass || '';


//trigger CSS transitions
$timeout(function () {
scope.animate = true;
scope.$$modal.animate = true;
});
}
};
Expand Down Expand Up @@ -167,7 +165,7 @@ angular.module('ui.bootstrap.modal', [])
keyboard: modal.keyboard
});

var angularDomEl = angular.element('<div modal-window></div>');
var angularDomEl = angular.element("<div modal-window class=\"modal fade {{ $$modal.windowClass }}\" ng-class=\"{in: $$modal.animate}\" ng-style=\"{'z-index': 1050 + $$modal.index*10}\"></div>");
angularDomEl.attr('window-class', modal.windowClass);
angularDomEl.attr('index', openedWindows.length() - 1);
angularDomEl.html(modal.content);
Expand Down

0 comments on commit ddc275a

Please sign in to comment.