Пример #1
0
 public function display($tpl = null)
 {
     // prepare the view, based on request
     // do we force reading updates from server ?
     $options = Sh404sefHelperAnalytics::getRequestOptions();
     // push display options into template
     $this->assign('options', $options);
     // call report specific methods to get data
     $method = '_makeView' . ucfirst($options['report']);
     if (is_callable(array($this, $method))) {
         $this->{$method}($tpl);
     }
     // flag to know if we should display placeholder for ajax fillin
     $this->assign('isAjaxTemplate', false);
     parent::display($tpl);
 }
Пример #2
0
 public function display($tpl = null)
 {
     // prepare the view, based on request
     // do we force reading updates from server ?
     $options = Sh404sefHelperAnalytics::getRequestOptions();
     $method = '_makeView' . ucfirst($options['report']);
     if (is_callable(array($this, $method))) {
         $this->{$method}($tpl);
     }
     // push display options into template
     $this->assign('options', $options);
     // add our javascript
     JHTML::script('cp.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/');
     // add Joomla calendar behavior, needed to input start and end dates
     if ($options['showFilters'] == 'yes') {
         JHTML::_('behavior.calendar');
     }
     // add our own css
     JHtml::styleSheet('cp.css', Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/');
     // add tooltips handler
     JHTML::_('behavior.tooltip');
     // add title
     $app =& JFactory::getApplication();
     $title = Sh404sefHelperGeneral::makeToolbarTitle(JText16::_('COM_SH404SEF_ANALYTICS_MANAGER'), $icon = 'sh404sef', $class = 'sh404sef-toolbar-title');
     $app->set('JComponentTitle', $title);
     // add a div to display our ajax-call-in-progress indicator
     // Get the JComponent instance of JToolBar
     $bar =& JToolBar::getInstance('toolbar');
     $bar->addButtonPath(JPATH_COMPONENT . DS . 'classes');
     $html = '<div id="sh-progress-cpprogress"></div>';
     $bar->appendButton('custom', $html, 'sh-progress-button-cpprogress');
     // add quick control panel loader
     $js = 'window.addEvent(\'domready\', function(){  shSetupAnalytics({report:" ' . $options['report'] . '"});});';
     $document =& JFactory::getDocument();
     $document->addScriptDeclaration($js);
     // flag to know if we should display placeholder for ajax fillin
     $this->assign('isAjaxTemplate', true);
     parent::display($tpl = null);
 }
Пример #3
0
 public function display($tpl = null)
 {
     // version prefix
     $this->joomlaVersionPrefix = Sh404sefHelperGeneral::getJoomlaVersionPrefix();
     // prepare the view, based on request
     // do we force reading updates from server ?
     $options = Sh404sefHelperAnalytics::getRequestOptions();
     // push display options into template
     $this->assign('options', $options);
     // Get the JComponent instance of JToolBar
     $bar = JToolBar::getInstance('toolbar');
     if (version_compare(JVERSION, '3.0', 'ge')) {
         $document = JFactory::getDocument();
         // render submenu sidebar
         $this->sidebar = Sh404sefHelperHtml::renderSubmenu();
         // add custom css
         JHtml::styleSheet(Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/' . $this->joomlaVersionPrefix . '_list.css');
         // add modal css and js
         ShlHtmlBs_helper::addBootstrapCss(JFactory::getDocument());
         ShlHtmlBs_helper::addBootstrapJs(JFactory::getDocument());
         // add title
         JToolbarHelper::title('sh404SEF: ' . JText::_('COM_SH404SEF_ANALYTICS_MANAGER'), 'sh404sef-toolbar-title');
         // needed javascript
         jimport('joomla.html.html.bootstrap');
         JHtml::_('formbehavior.chosen', 'select');
         // add Joomla calendar behavior, needed to input start and end dates
         if ($options['showFilters'] == 'yes') {
             JHTML::_('behavior.calendar');
         }
         // add quick control panel loader
         $js = 'jQuery(document).ready(function(){  shSetupAnalytics({report:" ' . $options['report'] . '"});});';
         $document = JFactory::getDocument();
         $document->addScriptDeclaration($js);
     } else {
         // add Joomla calendar behavior, needed to input start and end dates
         if ($options['showFilters'] == 'yes') {
             JHTML::_('behavior.calendar');
         }
         // add tooltips handler
         JHTML::_('behavior.tooltip');
         // add title
         $app = JFactory::getApplication();
         $title = Sh404sefHelperGeneral::makeToolbarTitle(JText::_('COM_SH404SEF_ANALYTICS_MANAGER'), $icon = 'sh404sef', $class = 'sh404sef-toolbar-title');
         JFactory::getApplication()->JComponentTitle = $title;
         // add quick control panel loader
         $js = 'window.addEvent(\'domready\', function(){  shSetupAnalytics({report:" ' . $options['report'] . '"});});';
         $document = JFactory::getDocument();
         $document->addScriptDeclaration($js);
     }
     // call methods to prepare display based on report type
     $method = '_makeView' . ucfirst($options['report']);
     if (is_callable(array($this, $method))) {
         $this->{$method}($tpl);
     }
     // add our javascript
     JHTML::script(Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/' . $this->joomlaVersionPrefix . '_cp.js');
     // add our own css
     JHtml::styleSheet(Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/' . $this->joomlaVersionPrefix . '_cp.css');
     // flag to know if we should display placeholder for ajax fillin
     $this->assign('isAjaxTemplate', true);
     parent::display($this->joomlaVersionPrefix);
 }