[Xerte-dev] menu.rlm

Ron Mitchell ronm at mitchellmedia.co.uk
Mon Feb 13 12:30:46 GMT 2012


Hi all

I'd previously seen someone creating an LO using one of the menu options
rather than linear and the buttons were overlapping when the number of items
required 2 columns. At the time I'd put that down to them having long page
titles but I've been working on an LO requiring at least two columns myself
and it seems there is/was an error in the code. In the makeMenu script it
has/had...

 

//get menuItem width

if (numItems < 13){

  itemWidth = 350;

} else if (numItems < 26){

  itemWidth = 300;

} else {

  itemWidth = 245;

}

 

With more than 16 items the 1st and second column buttons overlap regardless
of page title size.

I've changed this as follows and tested with 2 columns and 3 columns:

 

if (numItems < 17){

  itemWidth = 350;

} else if (numItems > 16 & numItems < 33){

  itemWidth = 240;

} else if (numItems > 32){

  itemWidth = 240;

}

 

Actually as you'll see the size of the button doesn't need to change between
2 columns and 3 columns but I left the 3 options in just in case there might
be a future reason to change for 3 columns.

 

I could commit this but just wondering how any changes now get reflected in
the changes Jonathan is making? 

 

HTH

Ron

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20120213/c9ae3af8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: menu.rlm
Type: application/octet-stream
Size: 3600 bytes
Desc: not available
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20120213/c9ae3af8/attachment.obj>


More information about the Xerte-dev mailing list