2.8 and 2.9 Mobile nav method different?

2.8 and 2.9 Mobile nav method different?

by Chris Chapman -
Number of replies: 7

Hiya, just working on my aardvark child theme and just noticed in testing that the aardvark mobile nav (half screen @972px or less) is not working. I know Aardvark doesn't officially support 2.9 so just wondered whether the method for delivering this nav is different, I imagine it is as we're now using jQuery instead of YUI?

If this is the case can someone point me in the right direction as to port the clean theme code to it? and I'l let Shaun know too. 

URL to my site is https://vle-dev.exe-coll.ac.uk/vle if that helps.


Many thanks!

Average of ratings: -
In reply to Chris Chapman

Re: 2.8 and 2.9 Mobile nav method different?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi, 

It could be the Clean theme that is the problem, so try taking all the references of that theme from AARDVARK/ CONFIG.PHP and VERSION.PHP and see if it works better? You may need to Purge all caches too.

Just an idea...

Cheers

Mary

In reply to Chris Chapman

Re: 2.8 and 2.9 Mobile nav method different?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Ignore my last comment it's rubbish!

In reply to Mary Evans

Re: 2.8 and 2.9 Mobile nav method different?

by Chris Chapman -

Ok No worries! if you have any further thoughts to try let me know!

In reply to Chris Chapman

Re: 2.8 and 2.9 Mobile nav method different?

by Chris Chapman -

I have found the solution... mega simple in the end, did a bit of hunting in the layout files.

Basically the data-toggle collapse class on line 61 of aardvark/layout/header.php has changed from 

<data-toggle="workaround-collapse"> to

<data-toggle="collapse">

Hope this helps anyone wanting to use aardvark on any 2.9 installs!

In reply to Chris Chapman

Re: 2.8 and 2.9 Mobile nav method different?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Oh gosh! I forgot all about that. Yes that is a regression but not sure if it is documented...I have been needing to check that ever since I saw it being amended! It's all to do with the YUI fiasco!

Thanks for letting us know.

I will go investigate.

Cheers

Mary

In reply to Chris Chapman

Re: 2.8 and 2.9 Mobile nav method different?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Chris,

I have just tracked back and found that the change was made in 2013.

See here: https://github.com/lazydaisy/moodle/blame/MOODLE_29_STABLE/theme/bootstrapbase/layout/columns3.php#L58

So looks like the code has been wrong for a long time when the file was called general.php! In fact is was when we first added Bootstrap before we changed the name to Bootstrapbase.

Cheers

Mary

In reply to Mary Evans

Re: 2.8 and 2.9 Mobile nav method different?

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

This all stems from the JS Shirley YUI port of the Bootstrap JS: https://github.com/moodle/moodle/blob/MOODLE_28_STABLE/theme/bootstrapbase/yui/src/bootstrap/js/bootstrap.js#L21-L22 which had to do it that way because of an issue in the 'upstream library' so I suspect that 'workaround-collapse' is implemented elsewhere.

Thus M2.9 is now a progression instead of a regression where the full JS library is now available to all: http://getbootstrap.com/2.3.2/javascript.html - instead of contributed themes needing to exclude the YUI version and serve the jQuery one.