Skip to content

Commit

Permalink
fix(dialog): remove dialogOpenClass to get in line with v2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pkozlowski-opensource committed May 11, 2013
1 parent 3e5a58e commit f009b23
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/dialog/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dialogModule.provider("$dialog", function(){
backdropClass: 'modal-backdrop',
transitionClass: 'fade',
triggerClass: 'in',
dialogOpenClass: 'modal-open',
resolve:{},
backdropFade: false,
dialogFade:false,
Expand Down Expand Up @@ -132,7 +131,6 @@ dialogModule.provider("$dialog", function(){

$compile(self.modalEl)($scope);
self._addElementsToDom();
body.addClass(self.options.dialogOpenClass);

// trigger tranisitions
setTimeout(function(){
Expand All @@ -152,7 +150,6 @@ dialogModule.provider("$dialog", function(){
var self = this;
var fadingElements = this._getFadingElements();

body.removeClass(self.options.dialogOpenClass);
if(fadingElements.length > 0){
for (var i = fadingElements.length - 1; i >= 0; i--) {
$transition(fadingElements[i], removeTriggerClass).then(onCloseComplete);
Expand Down
2 changes: 0 additions & 2 deletions src/modal/test/modal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,10 @@ describe('Give ui.boostrap.modal', function() {
});

it('should use global $dialog options', function() {
provider.options({dialogOpenClass: 'test-open-modal'});
elm = $compile(templateGenerator('modalShown'))($scope);
expect($document.find('.test-open-modal').length).toBe(0);
$scope.$apply('modalShown = true');
expect($document.find('body > div.modal').length).toBe(1);
expect($document.find('.test-open-modal').length).not.toBe(0);
$scope.$apply('modalShown = false');
});

Expand Down

0 comments on commit f009b23

Please sign in to comment.