/** * overwrite standard J mootools file with mootools 1.2 * this isnt really going to work out - too much incompatibilty between the two code bases * even with "compatibility mode" on will try again when final 1.2 is out */ function mootools() { static $mootools; if (!isset($mootools)) { $mootools = true; if (FabrikWorker::nativeMootools12()) { //new standard J mt 1.2.4 pluign is enabled // $$$ hugh - because we set $mootools false in our script() method, before // we call the JHTML::script(), their method then doesn't include moo automagically. // So let's make darn sure it gets loaded! JHTML::_('behavior.mootools'); FabrikHelperHTML::script('j1.5.20_mootools-1.2-ext.js', 'components/com_fabrik/libs/mootools1.2/', true); //FabrikHelperHTML::script('compat12.js', 'components/com_fabrik/libs/mootools1.2/', false); return; } $mooversion = FabrikWorker::getMooVersion(); if ($mooversion == -1) { FabrikHelperHTML::script('mootools-ext.js', 'components/com_fabrik/libs/', true); return; } if ($mooversion == 1) { $document =& JFactory::getDocument(); $docscripts =& FabrikHelperHTML::getDocumentHeadPart('scripts'); $newscripts = array(); foreach ($docscripts as $script => $type) { if (strstr($script, '/media/system/js/mootools.js') || strstr($script, '/fabrik2.0.x/media/system/js/mootools-uncompressed.js')) { $newscripts[$script] = $type; } } FabrikHelperHTML::removeDocumentHeadPart('scripts', $newscripts); $config =& JFactory::getConfig(); $debug = $config->getValue('config.debug'); // TODO NOTE: Here we are checking for Konqueror - If they fix thier issue with compressed, we will need to update this $konkcheck = strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "konqueror"); if ($debug || $konkcheck) { FabrikHelperHTML::script('mootools-1.2-uncompressed.js', 'components/com_fabrik/libs/mootools1.2/', false); FabrikHelperHTML::script('mootools-1.2-more-uncompressed.js', 'components/com_fabrik/libs/mootools1.2/', false); } else { FabrikHelperHTML::script('mootools-1.2.js', 'components/com_fabrik/libs/mootools1.2/', false); FabrikHelperHTML::script('mootools-1.2-more.js', 'components/com_fabrik/libs/mootools1.2/', false); } FabrikHelperHTML::script('compat.js', 'components/com_fabrik/libs/mootools1.2/', false); FabrikHelperHTML::script('compat12.js', 'components/com_fabrik/libs/mootools1.2/', false); FabrikHelperHTML::script('tips.js', 'components/com_fabrik/libs/mootools1.2/', false); FabrikHelperHTML::script('mootools-1.2-ext.js', 'components/com_fabrik/libs/mootools1.2/', true); } else { FabrikHelperHTML::script('mootools-ext.js', 'components/com_fabrik/libs/', true); } } }