public function beforeLayout($viewFile) { parent::beforeLayout($viewFile); $js = array('/highcharts/js/highcharts', '/highcharts/js/highcharts-more'); $theme = $this->_getTheme($this->chart_name); $exportingEnabled = $this->_checkExporting($this->chart_name); $options3dEnabled = $this->_checkOptions3d($this->chart_name); $drillDownEnabled = $this->_checkDrillDown($this->chart_name); if ($exportingEnabled) { $js[] = '/highcharts/js/modules/exporting'; } if ($options3dEnabled) { $js[] = '/highcharts/js/highcharts-3d.js'; } if ($drillDownEnabled) { array_push($js, '/highcharts/js/modules/drilldown'); } switch ($theme) { case 'gray': case 'grid': case 'dark-blue': case 'dark-green': case 'skies': $js[] = '/highcharts/js/themes/' . $theme; break; default: // $js[] = '/highcharts/js/themes/highroller'; break; } $this->Html->css('highcharts/css/highroller'); $this->Html->script($js, false); return true; }
public function beforeLayout($viewFile) { parent::beforeLayout($viewFile); $js = array('/high_charts/js/highcharts'); $theme = $this->_getTheme($this->chart_name); $exportingEnabled = $this->_checkExporting($this->chart_name); if ($exportingEnabled) { $js[] = '/high_charts/js/modules/exporting'; } switch ($theme) { case 'gray': case 'grid': case 'dark-blue': case 'dark-green': case 'skies': $js[] = '/high_charts/js/themes/' . $theme; break; default: // $js[] = '/high_charts/js/themes/highroller'; break; } $this->Html->css('high_charts/css/highroller'); $this->Html->script($js, FALSE); return true; }
/** * Add styles and scripts to the page * * @param String $viewFile */ public function beforeLayout($viewFile) { parent::beforeLayout($viewFile); echo $this->Html->script("shadowbox", array('inline' => false)); echo $this->Html->css("shadowbox", array('inline' => false)); echo $this->Html->scriptBlock(' $(function() { Shadowbox.init({ handleOversize: "drag", modal: true });});', array('inline' => false)); }
public function beforeLayout($viewFile) { parent::beforeLayout($viewFile); $js = array('/plugins/high-charts/js/highcharts', '/plugins/high-charts/js/modules/exporting'); $theme = $this->_getTheme($this->chart_name); switch ($theme) { case 'gray': case 'grid': case 'dark-blue': case 'dark-green': case 'skies': $js[] = '/plugins/high-charts/js/themes/' . $theme; break; default: // $js[] = '/high_charts/js/themes/highroller'; break; } $this->Html->css('/plugins/high-charts/css/highroller'); $this->Html->script($js, array('block' => 'customScript')); return true; }
public function beforeLayout($layoutFile) { parent::beforeLayout($layoutFile); $this->Html->script('Sifter.sifter', array('inline' => false)); }