Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

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

1 comment on commit f009b23

@cleercode
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this maybe be readded? :/ I know it's consistent with Bootstrap 2.3, but there's not really a good alternative that I can find on how to do this, it doesn't really do any harm (not having the .modal-open CSS rule defined means it has no effect) and it's readded in Bootstrap 3.0 anyway.

Please sign in to comment.