[Building Sakai] Show Sakai tool iframe in full window mode

Daniel McCallum dmccallum at unicon.net
Thu Jul 2 10:42:28 PDT 2009


There's a few ways to do this.

http://jira.sakaiproject.org/browse/SAK-12402 implements a frameset-based solution. It is most useful when maximized mode is a placement-scoped configuration (as opposed to request-scoped). Works for JSR-168 portlets as well by looking at session state. Don't think it works at all for multi-tool pages. Documentation is thorough: https://collab-sakai.sakaiproject.org/access/content/attachment/d030d355-fcf8-4a93-80c2-427fc993b4e0/sakai_maxmized_view.pdf

In our case, we had a requirement for request-based mode switching, specifically we needed to switch into maximized mode when delegating to a helper, then back to the previous mode on exiting the helper. On-list discussion: http://n2.nabble.com/-Building-Sakai--%22Full-Window%22-Helpers-td2504373.html

Because we needed request-based mode switching and because framesets made us (possibly irrationally) nervous and because we had difficulty setting the tool's frame into the state we needed without hacking portal internals, we looked into other options. Noah Botimer helped out by providing some sample code for a portal-scoped DHTML modal, but we ended up backing away from that solution, at least in part because we would have difficulty with browser reloads.

In the end we went with a new portal handler and client-side redirects to switch between handlers. There's still a few rough edges, e.g. logout keeps you in maximized view, but so far it seems to be meeting our needs.

Sample code:

  https://source.sakaiproject.org/svn/msub/unicon.net/distros/branches/portal-manip-2-6-x/

That's a "teeny" Sakai distro so you should be able to check it out, build it, and run it. Main changes of interest are in ./portal, which implements the new portal handler and corresponding markup, and ./portal-manipulator which has example tools and several utility classes, mainly for managing helper tool transitions. Example tools:

  -- dhtml.tool.maximizer -- First pass at a JS/CSS-based solution, probably similar to what Aaron has in mind. Not surviving reloads was a deal-killer for us.
  -- handler.tool.maximizer -- First pass at a portal handler-based solution. JS is crude, but gets the job done. Think you need to place on ~admin to get it to work
  -- helper.tool.launcher -- Delegates to a helper in maximized mode, which returns the portal to the previous mode and tool when done. Can specify arbitrary URL fragments to control entry point to the helper and return points in the launcher.

Our solution likely does not work as expected for multi-tool pages.

Hope that helps. Getting "teeny" to build can be a bit dodgy...basically assumes you've built 2.6.0RC1-SNAPSHOT previously. Let me know if you run into trouble.

- Dan


  

----- Original Message -----
From: "Aaron Zeckoski" <aaronz at vt.edu>
To: "Thomas Amsler" <tpamsler at ucdavis.edu>
Cc: "sakai-dev" <sakai-dev at collab.sakaiproject.org>
Sent: Wednesday, July 1, 2009 9:53:46 PM GMT -07:00 U.S. Mountain Time (Arizona)
Subject: Re: [Building Sakai] Show Sakai tool iframe in full window mode

It might work to do that by simply hiding the various bits of the
portal via CSS (though you would have to do this each time the page
loads depending on the current state of the switch). Some other
alternatives are changing the tools so you could load the tool view
and then have a link in the tool itself that goes back to the portal
(yuck) or maybe doing some serious hacking of the portal itself
(double yuck).

Hope that helps
-AZ


On Thu, Jul 2, 2009 at 5:48 AM, Thomas Amsler<tpamsler at ucdavis.edu> wrote:
> I would like to add a button, maybe right next to the tool help "?",
> that a user can click on. That button click should hide everything
> else in the portal and only show the tool. Then another button click
> would reset to normal state.
> Best,
> -- Thomas
>
>
>
>
> On Wed, Jul 1, 2009 at 4:57 PM, Aaron Zeckoski<aaronz at vt.edu> wrote:
>> Sure. I do it quite often by just going directly to the webapp URL.
>> Are you trying to get the tool URL or are you trying to hide
>> everything else in the portal?
>>
>> Normal portal link:
>> http://nightly2.sakaiproject.org:8083/portal/site/fd0c9457-7080-4a5d-b150-e58d45894fca/page/bd419236-5207-436c-a732-db84c70b5135
>>
>> Tool only link:
>> http://nightly2.sakaiproject.org:8083/portal/tool/a00afc17-402f-479b-a4bc-89046c47b700/
>>
>> -AZ
>>
>>
>> On Thu, Jul 2, 2009 at 12:32 AM, Thomas Amsler<tpamsler at ucdavis.edu> wrote:
>>> Has anybody experimented with showing a tool (iframe) in "full window"
>>> mode. Meaning that the tool would take over all of the browser's
>>> window?
>>>
>>> Best,
>>> -- Thomas
>>>
>>> _______________________________________________
>>> sakai-dev mailing list
>>> sakai-dev at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>
>>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>>
>>>
>>
>>
>>
>> --
>> Aaron Zeckoski (azeckoski (at) vt.edu)
>> Senior Research Engineer - CARET - University of Cambridge
>> https://twitter.com/azeckoski - http://www.linkedin.com/in/azeckoski
>> http://aaronz-sakai.blogspot.com/ -
>> http://confluence.sakaiproject.org/confluence/display/~aaronz/
>>
>



-- 
Aaron Zeckoski (azeckoski (at) vt.edu)
Senior Research Engineer - CARET - University of Cambridge
https://twitter.com/azeckoski - http://www.linkedin.com/in/azeckoski
http://aaronz-sakai.blogspot.com/ - http://tinyurl.com/azprofile
_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"


More information about the sakai-dev mailing list