Modal Windows Outside Rapportive Sidebar

53 views
Skip to first unread message

toddsler

unread,
Apr 19, 2012, 1:55:16 PM4/19/12
to Raplet developer discussion list
Is there a "best practice" way to open a modal window for the user
when they interact with my Raplet? I would like to be able to do this
to have the room to display more information (or the ability to do a
slightly more complicated view) than might fit in the Rapportive
sidebar.

I know that I could use plain JS to write to window/document, but the
api documentation specifically calls this out as bad practice and
mentions that future updates will likely break such implementations.

Any feedback is appreciated.

Conrad Irwin

unread,
Apr 19, 2012, 5:36:21 PM4/19/12
to raple...@googlegroups.com, stt...@gmail.com
Hi Toddsler,

If you want to have one slightly-larger view, and one small view you can use the inbuilt support for collapsible sections: http://code.rapportive.com/raplet-docs/index.html#advanced_usage.

Rapportive will automatically show the larger view in the sidebar if there is enough space, but will fall back to showing the smaller view when there is not. (This choice takes a lot of parameters into account, for example if the user uses your raplet a lot, it's more likely to show the larger view).

If that doesn't give you enough space, you can also use the $.dialog() method on the jQuery object passed to your raplet, it's documented at http://jqueryui.com/demos/dialog/.

Please let me know if you need further help,

Conrad
--
You received this message because you are subscribed to the Google
Groups "Raplet developer discussion list" group.
To post to this group, send email to raple...@googlegroups.com (mailto:raple...@googlegroups.com)
To unsubscribe from this group, send email to
For more options, visit this group at

toddsler

unread,
Apr 19, 2012, 6:04:25 PM4/19/12
to raple...@googlegroups.com, stt...@gmail.com
Excellent! I didn't realize jQuery UI was available. Sometimes the information the user will request is quite lengthy so $.dialog() will work beautifully.
Thank you very much.



On Thursday, April 19, 2012 2:36:21 PM UTC-7, Conrad Irwin wrote:
Hi Toddsler,

If you want to have one slightly-larger view, and one small view you can use the inbuilt support for collapsible sections: http://code.rapportive.com/raplet-docs/index.html#advanced_usage.

Rapportive will automatically show the larger view in the sidebar if there is enough space, but will fall back to showing the smaller view when there is not. (This choice takes a lot of parameters into account, for example if the user uses your raplet a lot, it's more likely to show the larger view).

If that doesn't give you enough space, you can also use the $.dialog() method on the jQuery object passed to your raplet, it's documented at http://jqueryui.com/demos/dialog/.

Please let me know if you need further help,

Conrad

On Thursday, April 19, 2012 at 10:55 AM, toddsler wrote:
Is there a "best practice" way to open a modal window for the user
when they interact with my Raplet? I would like to be able to do this
to have the room to display more information (or the ability to do a
slightly more complicated view) than might fit in the Rapportive
sidebar.

I know that I could use plain JS to write to window/document, but the
api documentation specifically calls this out as bad practice and
mentions that future updates will likely break such implementations.

Any feedback is appreciated.

--
You received this message because you are subscribed to the Google
Groups "Raplet developer discussion list" group.
To post to this group, send email to raple...@googlegroups.com (mailto:raplet-dev@googlegroups.com)
To unsubscribe from this group, send email to
Reply all
Reply to author
Forward
0 new messages