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

feat(modal): add appendToLast option #5826

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

norami
Copy link

@norami norami commented Apr 20, 2016

Enable Cascaded Dialog with CSS below

@media (min-width: 992px) {
.modal-wd{
position:absolute;
top:0;bottom:0;left:0;right:0;
width: auto;
height:auto;
}
.modal:nth-child(3n+1) .modal-wd{
margin: 20px 40px 40px 20px;
}
.modal:nth-child(3n+2) .modal-wd{
margin: 30px 30px 30px 30px;
}
.modal:nth-child(3n) .modal-wd{
margin: 40px 20px 20px 40px;
}
.modal-wd .modal-content{
position:absolute;
top:0;bottom:0;left:0;right:0;
width: auto;
height:auto;
margin:0;
}
}

Enable Cascaded Dialog with CSS below

@media (min-width: 992px) {
  .modal-wd{
    position:absolute;
    top:0;bottom:0;left:0;right:0;
    width: auto;
    height:auto;
  }
  .modal:nth-child(3n+1) .modal-wd{
    margin: 20px 40px 40px 20px;
  }
  .modal:nth-child(3n+2) .modal-wd{
    margin: 30px 30px 30px 30px;
  }
  .modal:nth-child(3n) .modal-wd{
    margin: 40px 20px 20px 40px;
  }
  .modal-wd .modal-content{
    position:absolute;
    top:0;bottom:0;left:0;right:0;
    width: auto;
    height:auto;
    margin:0;
  }
}
@norami norami changed the title Add appendToLast option feat(modal): add appendToLast option Apr 20, 2016
@wesleycho
Copy link
Contributor

This sounds fragile - a better solution would be to use an appropriate CSS class for each modal IMO.

@norami
Copy link
Author

norami commented Apr 21, 2016

Although thie pull request affect the future (wrong) change
depending on the order of elements,
the current implementation does not depend on the order of elements.

In the other hand, it's not a elegant
to use an appropriate CSS class for each modal element.
An alternate plan should be the code below.

$uibModal.open({
    className: function(index){
        return 'modal-' + index % 3;
    }
})

@wesleycho
Copy link
Contributor

I'm amenable to support a function there that passes in the index.

@icfantv
Copy link
Contributor

icfantv commented Jun 13, 2016

@norami, what's the status of this? Shall I close this as something you do not intend to finish? Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants