-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Dialog fix #122
Comments
Hi bekos! Thanks for reporting - do you think you could give a working example of this? I don't quite understand the problem. You can start with http://plnkr.co/edit/7nf4qO?p=preview |
I talk about the $dialog provider. Lets say i have already created a draggable directive, restricted in C. I now set in my options for the $dialog I hope i made my self clear this time, because im not very familiar with plunker :( |
Oh, I see. The issue is that we are doing a bit of HTML gluing inside JavaScript: We could consider providing a template for it but it might be overkill. Maybe we should just compile the whole modal element? |
If I'm not mistaken it should be as simple as changing this line: bootstrap/src/dialog/dialog.js Line 125 in 739f86f
|
Yes, the change i suggest in the first comment does the job. I have tested locally and it works fine. I should have prepared a pull request, but haven;t done it before :-) |
@bekos actually it might be enough to change it to A PR would be awesome, although writing test for this will require a bit of gymnastic. |
@bekos just pushed a fix. Could you please test a version from http://ci.angularjs.org/job/angularui-bootstrap/ws/dist/ (0.1.1-SNAPSHOT)? Thnx! |
How to apply draggable and resizable directives on modal? |
@sorbing This is not something that is provided out of the box from the library. An option is to create a custom class (C) directive for your dialog, and implement the desired functionality there. |
I have already implemented the directives draggable and resizable. I do not understand how to apply them to the modal window. Thanks for the quick response. <div draggable="" modal="shouldBeOpen" ... > But because the container with |
You can override the |
Many thanks) It's works! <div modal="shouldBeOpen" close="close()" options="{dialogClass: 'modal draggable'}">... However, how I can set the parameters for draggable? Example: <div draggable="{containment: '.selector', scroll: false}" modal="shouldBeOpen"> |
In case the dialog class i provide through options contains a directive, this is not compiled.
Probably when the modalEl is compiled something like
$compile(self.modalEl.wrap("div").parent().contents())($scope);
would be better.
The text was updated successfully, but these errors were encountered: