0
Welcome Guest! Login
0 items Join Now

Mootools-Core + Mootools-More Called on ALL Pages?

    • Terp's Avatar
    • Terp
    • Elite Rocketeer
    • Posts: 1720
    • Thanks: 23

    Mootools-Core + Mootools-More Called on ALL Pages?

    Posted 11 years 1 month ago
    • I took a 2-year vacation, but now rolling up my sleeves to update and build some new sites. I noticed that all off the pages in the rocketlauncher demos I installed call both the mootools-core AND the mootools-more js.

      I thought perhaps this is a new requirement of Joomla 2.5+, but I then checked a stock J! 3.2 installation and the -more.js is not being called.

      So I was just wondering what in RT's templates is requiring the -more.js? I thought perhaps it's RokSprocket or one of the other fancy toys, but even the 404 page demo is calling it when it compiles.

      Any insight would be much-welcomed.





      PS: GREAT documentation/tutorials on the new site, guys! It's making it so much easier to re-climb the learning curve.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Mootools-Core + Mootools-More Called on ALL Pages?

    Posted 11 years 1 month ago
    • in the latest templates Mootools is only called when its needed ... (for examples in gantry features)
    • Terp's Avatar
    • Terp
    • Elite Rocketeer
    • Posts: 1720
    • Thanks: 23

    Re: Mootools-Core + Mootools-More Called on ALL Pages?

    Posted 11 years 1 month ago
    • Henning wrote:
      in the latest templates Mootools is only called when its needed ... (for examples in gantry features)

      Quatsch. :)

      I only checked a half dozen templates, but they all seem to load both libraries, sir. I thought maybe something in the recent menus required it, but the Hadron 404 page doesn't compile the menu on the 404 page and is calling both libraries, too.

      So in short, gantry now requires both libraries, Herr Henning?
    • Last Edit: 11 years 1 month ago by Terp.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Mootools-Core + Mootools-More Called on ALL Pages?

    Posted 11 years 1 month ago
    • The gantry to top feature is loaded on the 404. That needs (obviously) the library ... and so it load Mootools + more.
      There is no call for Mootools in the index.php ... if there is a Gantry feature that needs Mootools ... it loads Mootools via JHTML::_('behavior.framework', true); so it doesn't get loaded more than once.


      Snippet from the to top-feature:

      function init()
      {
      /** @var $gantry Gantry */
      global $gantry;
      JHTML::_('behavior.framework', true);

      if ($this->get('enabled')) {
      $gantry->addScript('gantry-totop.js');
      }
      }

      I'm not sure if the latest gantry menu needs Mootools ... it's mostly css driven.
      I asked Djamil to shed some light ...

      As far as I can see we are moving to pure js solutions now and not relying on one of the frameworks anymore.
      I would say I'm not telling "Quatsch" ... the template is loading a js-framework only if it's needed.
      You can run a Gantry without using Mootools ... if you don't use one of the features that still need Mootools.
      Mootoos is modular ... "Mootools more" just holds the classes for animations etc. and has still a small footprint.
    • Last Edit: 11 years 1 month ago by Henning.
    • The following users have thanked you: Terp

    • Terp's Avatar
    • Terp
    • Elite Rocketeer
    • Posts: 1720
    • Thanks: 23

    Re: Mootools-Core + Mootools-More Called on ALL Pages?

    Posted 11 years 1 month ago
    • Thanks for the explanation, sir.

      I removed the to-the-top feature and stripped out all the simplecounter animated 'coming soon' lines, but just couldn't get it to compile without the -more. I'll stop spinning my wheels and put more thought into this. Thanks, man.

      PS: It also appears everything is loaded no matter if it's being used or not, or at least is on my stripped down 404 test page...



        <script src="/anacron/media/jui/js/jquery.min.js" type="text/javascript"></script>
        <script src="/anacron/media/jui/js/jquery-noconflict.js" type="text/javascript"></script>
        <script src="/anacron/media/jui/js/jquery-migrate.min.js" type="text/javascript"></script>
        <script src="/anacron/media/system/js/tabs-state.js" type="text/javascript"></script>
        <script src="/anacron/media/system/js/mootools-core.js" type="text/javascript"></script>
        <script src="/anacron/media/system/js/core.js" type="text/javascript"></script>
        <script src="/anacron/media/system/js/caption.js" type="text/javascript"></script>
        <script src="/anacron/media/system/js/mootools-more.js" type="text/javascript"></script>
        <script src="/anacron/plugins/system/rokbox/assets/js/rokbox.js" type="text/javascript"></script>
        <script src="/anacron/libraries/gantry/js/browser-engines.js" type="text/javascript"></script>
        <script src="/anacron/templates/rt_anacron/js/rokmediaqueries.js" type="text/javascript"></script>



      Thanks again, Henning...will continue to put some thought into this while I am under the hood learning what's going on. :)
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Mootools-Core + Mootools-More Called on ALL Pages?

    Posted 11 years 1 month ago
    • The mobile "off canvas" menu needs Mootools as well as Rokbox (at least I think so) ...
      The plan is to remove as much framework dependencies as possible ...

Time to create page: 0.047 seconds