/** * Returns the javascript entry modules to load. Only modules that need to * be overriden or added conditionally should be placed here. * @return array */ public function getDefaultModules() { $modules = parent::getDefaultModules(); // flush unnecessary modules $modules['content'] = array(); $modules['legacy'] = array(); // Add minerva specific modules $modules['head'] = 'mobile.head'; // Define all the modules that should load on the mobile site and their dependencies. // Do not add mobules here. $modules['stable'] = 'skins.minerva.scripts'; // Doing this unconditionally, prevents the desktop watchstar from ever leaking into mobile view. $modules['watch'] = array(); if ($this->isAllowedPageAction('watch')) { // Explicitly add the mobile watchstar code. $modules['watch'] = array('mobile.watchstar.init'); } if ($this->isAllowedPageAction('edit')) { $modules['editor'] = array('mobile.editor'); } // add the browse module if the page has a tag assigned to it if ($this->getBrowseTags($this->getTitle())) { $modules['browse'] = array('mobile.browse'); } $modules['context'] = $this->getContextSpecificModules(); if ($this->isMobileMode) { $modules['toggling'] = array('mobile.toggling'); $modules['eventlogging'] = array('mobile.loggingSchemas'); } $modules['site'] = 'mobile.site'; // FIXME: Upstream? Hooks::run('SkinMinervaDefaultModules', array($this, &$modules)); return $modules; }
/** * Returns the javascript entry modules to load. Only modules that need to * be overriden or added conditionally should be placed here. * @return array */ public function getDefaultModules() { $modules = parent::getDefaultModules(); // flush unnecessary modules $modules['content'] = array(); $modules['legacy'] = array(); $modules['top'] = 'skins.minerva.scripts.top'; // Define all the modules that should load on the mobile site and their dependencies. // Do not add mobules here. $modules['stable'] = 'skins.minerva.scripts'; // Doing this unconditionally, prevents the desktop watchstar from ever leaking into mobile view. $modules['watch'] = array(); if ($this->isAllowedPageAction('watch')) { // Explicitly add the mobile watchstar code. $modules['watch'] = array('skins.minerva.watchstar'); } if ($this->isAllowedPageAction('edit')) { $modules['editor'] = array('skins.minerva.editor'); } $modules['context'] = $this->getContextSpecificModules(); if ($this->isMobileMode) { $modules['toggling'] = array('skins.minerva.toggling'); } $modules['site'] = 'mobile.site'; // FIXME: Upstream? Hooks::run('SkinMinervaDefaultModules', array($this, &$modules)); return $modules; }