[Building Sakai] Question about 271 site-manage issue

Zhen Qian zqian2004 at gmail.com
Thu Mar 3 21:34:09 PST 2011


For site-manage, there is a utils.resizeFrame() function defined in
site-manage.js, which could also resize the iframe based on the document
height. There are a couple of examples in site-manage vm files that calls
utils.resizeFrame().

Hope this helps.

- Zhen

On Thu, Mar 3, 2011 at 7:00 PM, Duffy Gillman <duffy at rsmart.com> wrote:

> I haven't done this myself, but have looked at the source for the
> site-manage UI. It looks like this can be done with existing javascript.
>
> If you look in look in the javascript file, headscripts.js, included by
> reference in the site-manage tool, you will see this method:
>
>  setMainFrameHeight (id)
>
> The id parameter should be the concatenation of the string "Main" and the
> tool Id for site-manage (eg. if the tool Id is
> 18588303x63b4x4645x9960x8b4d167c96b5, use :
> "Main18588303x63b4x4645x9960x8b4d167c96b5"). I believe this should resize
> the containing iframe to fit whatever content is being displayed. You can
> wire this up to the course radio button using the onclick event.
>
> You can find the headscripts.js file for your own perusal in the 2.7.1 code
> here:
>
>        reference/library/src/webapp/js/headscripts.js
>
> Good luck!
>
>    Duffy Gillman
>    Sr. Software Engineer
>    The rSmart Group, Inc.
>
> On Mar 3, 2011, at 2:46 PM, Walters, Cynthia (cmw6s) wrote:
>
> > Hello:
> >
> > We have a question about site-manage 2.7.1 and the new Site Type screen
> behavior.  We have in the past changed this screen to fully expand the term
> list so users always see the complete list of (5) terms.   I am including in
> this email 'svn diff' from my 2.7.1 efforts which illustrates what I'm
> asking about -- see below.  Also reference the SAK-19297 we (UVa)
> contributed.
> >
> > We are upgrading to 2.7.1 and I'm applying our past changes to
> site-manage.  We see and like the UI change on the Site Type screen
> (creating new course site), which only shows the course term drop-down list
> if user chooses 'course' site type -- but there is one problem for us... the
> overall screen size seems to be computed based on the original screen
> contents, so when we display the drop-down list fully expanded with 5 items
> (so our faculty always see all the course terms), the UI does not resize to
> avoid a scrollbar appearing and the 'Continue', 'Cancel' buttons can be
> hidden.
> >
> > Is there a way I can call a 'resize me now' function if the user picks
> the 'course' site type?  Or some other adjustment I can make to avoid the
> scrollbar appearing with our expanded course term list?  There is no need
> for the scrollbar to appear on this page with the current page contents, but
> I'm not sure how to effect this change in the 2.7.1 code?  (It was not a
> problem in 2.6.2 apparently because the course term list widget was
> displayed by default.)
> >
> > Do you have any advice for me?
> >
> >
> > Here is the small change we made in 2.7.1 that illustrates our dilemma:
> >
> > Index: site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-type.vm
> > ===================================================================
> > --- site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-type.vm
> (revision 12345)
> > +++ site-manage-tool/tool/src/webapp/vm/sitesetup/chef_site-type.vm
> (revision 12347)
> > @@ -72,7 +72,7 @@
> >                                                                <label
> for="selectTerm">
> >
>  $tlang.getString("sitetype.acater")
> >                                                                </label>
> > -                                                               <select
> name="selectTerm" id="selectTerm">  ## onclick="selectSiteType('$type')"
> > +                                                               <select
> name="selectTerm" id="selectTerm" size="$termList.size()"
> style="vertical-align: text-top;">  ## onclick="selectSiteType('$type')"
> >
>  #foreach($term in $termList)
> >
>      <option value ="$term.eid"
> >
>              #if ($!selectedTerm)
> >
> >
> >
> >
> > Thanks very much for looking at this issue for us,
> > Cynthia Gast Walters
> > cmw6s at virginia.edu
> > University of Virginia
> > _______________________________________________
> > 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"
>
> _______________________________________________
> 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"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110304/c659acfe/attachment.html 


More information about the sakai-dev mailing list