Skip to content

Commit

Permalink
fix(modal): backport to 0.6 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 7a5fc78 commit e2c8335
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,15 @@ 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 || '';
var $$modal = {};
$$modal.index = attrs.index || '';
$$modal.windowClass = attrs.windowClass || '';

//trigger CSS transitions
$timeout(function () {
scope.animate = true;
$$modal.animate = true;
});
}
};
Expand Down Expand Up @@ -167,7 +164,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 Expand Up @@ -312,4 +309,4 @@ angular.module('ui.bootstrap.modal', [])
};

return $modalProvider;
});
});

0 comments on commit e2c8335

Please sign in to comment.