Thanks for the pointer to the backdrop: static option. That is a step in
the right direction. I'm still with Matt though that implementors should
have the ability to use something other than bootstrap if they want, unless
bootstrap is in the process of adding a lot more features very soon.

Unfortunately, I couldn't find a way to spawn different dialog types
without having Rave know about bootstrap and jquery. I am not a javascript
expert so maybe someone else can look at it and make a suggestion. Right
now this is what I've done. I've changed the last line in the createPopup
method to be this:

            if (target.popupType == 'jquery') {
                return container.get(0);
            } else {
                return container.find(target.contentSelector).get(0);
            }

If you define a variable called popupType on your popup definition you can
select to use a jquery dialog instead of the bootstrap modal. Maybe if we
add another method to the popup definition that could return the correct
root node we could get rid of this?

The last thing I can't figure out is how to attach functions to the dialog
events from the gadget loaded in the popup, not the popup definition. For
example, we want to use this for users to edit information. We need to be
able to popup a "Are you sure you want to cancel as you'll lose your
changes" but we only want to do it if they've made changes. That requires
the function to have access to data in the popup that is loaded. I haven't
tried this yet but maybe we could add a view_param option when we open the
dialog that would tell the gadget it's running inside a popup and give it
the name of the element to lookup to attach functions? Not sure if that
would work, maybe I'll try.

Chris

On Wed, May 9, 2012 at 6:59 AM, Franklin, Matthew B. <[email protected]>wrote:

> >-----Original Message-----
> >From: Noe-Payne, Erin A. [mailto:[email protected]]
> >Sent: Wednesday, May 09, 2012 9:06 AM
> >To: [email protected]
> >Subject: RE: [DISCUSS] OpenViews Modal
> >
> >>-----Original Message-----
> >>From: Franklin, Matthew B. [mailto:[email protected]]
> >>Sent: Wednesday, May 09, 2012 8:22 AM
> >>To: [email protected]
> >>Subject: RE: [DISCUSS] OpenViews Modal
> >>
> >>>-----Original Message-----
> >>>From: Chris Geer [mailto:[email protected]]
> >>>Sent: Tuesday, May 08, 2012 11:25 PM
> >>>To: [email protected]
> >>>Subject: [DISCUSS] OpenViews Modal
> >>>
> >>>I've been spending a lot of time with the open_views feature. I really
> like
> >>>how things look right now using the bootstrap modal however the
> >>>functionality is just not there. The biggest problem I have is that if
> you
> >>>click anywhere off the dialog it automatically closes which doesn't work
> >>
> >>There is a flag that we can pass to the Bootstrap modal to NOT close on
> click.
> >>
> >
> >Correct, and that flag is being passed. Rave implements dialog and
> >modal_dialog (aka rave.opensocial.VIEW_TARGETS.DIALOG /
> >MODALDIALOG), are you using the modal version? It is receiving the
> >backdrop: 'static' flag,  and should not ever close except clicking on a
> button
> >bound to gadgets.views.close.  The standard dialog does not have the
> static
> >backdrop.
> >
> >>>very well for users who miss click. I've been working on a mod that
> would
> >>>allow you to define popups that can use either bootstrap modal or jquery
> >>>popups.
> >>
> >>IMHO implementers should be able to use whatever type of UI that they
> >>want, but it would be nice if we could support that without actually
> including
> >a
> >>reference to jQuery UI in the demo.  The reason behind this is to keep
> the
> >>demo as simple as possible.
> >>
> >>Now, if implementers are unable to use jQuery UI due to some decision we
> >>made in the code, we should fix that.
> >
> >I believe the pattern that Chris put in place to extend / override the
> popups
> >should allow someone to use jqui or any other library.
>
> +1
>
> >
> >>
> >>>
> >>>Are there other things we could do to make this more usable?
> >>>
> >>>Chris
> >
>
>

Reply via email to