On Tuesday, February 24, 2015 at 4:55:57 AM UTC-5, Sander Elias wrote: > > Hi David, > > I don't know the jQuery plugin you are trying to use. In my experience, > its most of the time much quicker to build it from scratch using angular, > then it is to fully integrate some jQ thingie. > There are a number of dialog directives already available for Angular, > there is for sure one in bootstrapUI > <http://angular-ui.github.io/bootstrap/#/modal>. You can look at that > code for an good example how to build one yourself > (or use that one, and be done with it!) > > Regards > Sander > Sander, Thanks. The JQuery component is really of no consequence, it just happens to be what I'm using. The real key is that I want a menu item to say "Yo! DivDude! Do your Thing!" and that's all I want the menu item and its associated code to know about the other Div.
Once the other div starts to do its thing, I want it to run it's own prepopulate code (assuming it has any). I've made some more progress today. I split the directive into two separate directives. One is the OpenDialog directive, the other is the DialogPrepopulateFunction directive. The prepopulate one is responsible for knowing what needs to be done on that dialog. I attached the prepopulate to the activate event and, at first blush, it seemed to work correctly. The correct controller's code was invoked just like it should be. I've since found two problems, one of which I have a solution for. 1) If I set focus after I open up the dialog, the dialog is deactivated and then activated again. That means the prepopulate code needs to make sure it doesn't double-load whatever controls it's supposed to populate because, in that instance, the code will run twice. 2) Any time I click inside the object I get the same issue. It's activating the object. I pretty much can't do anything else because that behavior really shouldn't be running after the dialog is opened. Still working on that. If anyone has a better idea for an event to attach this prepopulate functionality to, I would be happy to hear it! -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
