*/ defined('_JEXEC') or die; GAnalyticsHelper::loadjQuery(); $document = JFactory::getDocument(); $document->addScript((JBrowser::getInstance()->isSSLConnection() ? 'https' : 'http') . '://www.google.com/jsapi'); $document->addScript(JURI::base() . 'components/com_ganalytics/libraries/jquery/fancybox/jquery.easing-1.3.pack.js'); $document->addScript(JURI::base() . 'components/com_ganalytics/libraries/jquery/fancybox/jquery.mousewheel-3.0.4.pack.js'); $document->addScript(JURI::base() . 'components/com_ganalytics/libraries/jquery/fancybox/jquery.fancybox-1.3.4.pack.js'); $document->addStyleSheet(JURI::base() . 'components/com_ganalytics/libraries/jquery/fancybox/jquery.fancybox-1.3.4.css'); if (GAnalyticsHelper::isPROMode()) { $document->addScript(JURI::base() . 'components/com_ganalytics/libraries/jquery/ganalytics/chart.js'); $scriptCode = "gajQuery(document).ready(function() {gajQuery('#ga-date-chart').gaChart({\n\t\tchartDivID: 'gaChartDivDate',\n\t\turl: 'index.php?option=com_ganalytics&view=pages&source=date&format=raw&layout=data',\n\t\tstart: '" . $this->escape($this->state->get('filter.search_start')) . "',\n\t\tend: '" . $this->escape($this->state->get('filter.search_end')) . "',\n\t\tcolorStart: '" . GAnalyticsHelper::getFadedColor('EB8F33', 20) . "',\n\t\tcolorEnd: 'EB8F33',\n\t\tpathPrefix: '" . JURI::root() . "'\n\t});\n"; $scriptCode .= "gajQuery('#ga-date-chart').gaChart('refresh');\n"; $scriptCode .= "gajQuery('#ga-browser-chart').gaChart({\n\t\tchartDivID: 'gaChartDivBrowser',\n\t\tchartType: 'pie',\n\t\tchartHeight: '150px',\n\t\turl: 'index.php?option=com_ganalytics&view=pages&source=browser&format=raw&layout=data',\n\t\tstart: '" . $this->escape($this->state->get('filter.search_start')) . "',\n\t\tend: '" . $this->escape($this->state->get('filter.search_end')) . "',\n\t\tcolorStart: '" . GAnalyticsHelper::getFadedColor('EB8F33', 20) . "',\n\t\tcolorEnd: 'EB8F33',\n\t\tpathPrefix: '" . JURI::root() . "'\n\t});\n"; $scriptCode .= "gajQuery('#ga-browser-chart').gaChart('refresh');\n"; $scriptCode .= "gajQuery('#ga-country-chart').gaChart({\n\t\tchartDivID: 'gaChartDivCountry',\n\t\tchartHeight: '150px',\n\t\turl: 'index.php?option=com_ganalytics&view=pages&source=country&format=raw&layout=data',\n\t\tstart: '" . $this->escape($this->state->get('filter.search_start')) . "',\n\t\tend: '" . $this->escape($this->state->get('filter.search_end')) . "',\n\t\tcolorStart: '" . GAnalyticsHelper::getFadedColor('EB8F33', 20) . "',\n\t\tcolorEnd: 'EB8F33',\n\t\tpathPrefix: '" . JURI::root() . "'\n\t});\n"; $scriptCode .= "gajQuery('#ga-country-chart').gaChart('refresh');\n"; $scriptCode .= "});\n"; $document->addScriptDeclaration($scriptCode); } $document->addScript(JURI::base() . 'components/com_ganalytics/views/pages/tmpl/default.js'); $document->addStyleSheet(JURI::base() . 'components/com_ganalytics/views/pages/tmpl/default.css'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); ?> <form action="<?php echo JRoute::_('index.php?option=com_ganalytics&view=pages'); ?> " method="post" name="adminForm" id="adminForm">
?> <td valign="top"> <?php foreach ($this->statsViews as $view) { if ($view->group_id != $group->id || $view->column != $i) { continue; } ?> <div class="portlet"> <div class="portlet-header"><div class="portlet-title"><?php echo $view->name; ?> </div></div> <div class="portlet-content"> <?php $scriptCode .= "gajQuery('#widgetForm-" . $view->id . "').gaChart({\n\t\t\tchartDivID: 'gaChartDiv" . $view->id . "',\n\t\t\tgaid: gajQuery('#profiles').val(),\n\t\t\turl: 'index.php?option=com_ganalytics&view=dashboard&format=raw&layout=data&id=" . $view->id . "',\n\t\t\tstart: gajQuery('#date_from').val(),\n\t\t\tend: gajQuery('#date_to').val(),\n\t\t\tcolorStart: '" . GAnalyticsHelper::getFadedColor('EB8F33', 0.2) . "',\n\t\t\tcolorEnd: 'EB8F33',\n\t\t\tpathPrefix: '" . JURI::root() . "'\n\t\t});\n"; ?> <form method="post" name="adminForm" class="adminForm" id="widgetForm-<?php echo $view->id; ?> "> <?php JForm::addFormPath(JPATH_COMPONENT . '/models/forms'); JForm::addFieldPath(JPATH_COMPONENT . '/models/fields'); $form = JForm::getInstance('com_ganalytics.statsview', 'statsview'); $form->bind($view); ?> <fieldset class="adminform"> <table class="adminformlist"> <?php foreach ($form->getFieldset('details') as $field) {
$document = JFactory::getDocument(); $document->addScript((JBrowser::getInstance()->isSSLConnection() ? 'https' : 'http') . '://www.google.com/jsapi'); if (GAnalyticsHelper::isPROMode()) { $document->addScript(JURI::root() . 'administrator/components/com_ganalytics/libraries/jquery/ganalytics/chart.js'); } else { $document->addScript(JURI::root() . 'administrator/components/com_ganalytics/libraries/jquery/ganalytics/list.js'); } $scriptCode = "gajQuery(document).ready(function() {gajQuery('#ga-date-chart').gaChart({\n\tchartDivID: 'gaChartDivDate',\n\tchartHeight: '220px',\n\turl: 'index.php?option=com_ganalytics&view=page&source=date&format=raw&layout=data&path=" . JRequest::getVar('path', '', null, 'BASE64') . "',\n\tstart: '" . $this->escape($this->state->get('filter.search_start')) . "',\n\tend: '" . $this->escape($this->state->get('filter.search_end')) . "',\n\tcolorStart: '" . GAnalyticsHelper::getFadedColor('EB8F33', 20) . "',\n\tcolorEnd: 'EB8F33',\n\tpathPrefix: '" . JURI::root() . "'\n});\n"; $scriptCode .= "gajQuery('#ga-date-chart').gaChart('refresh');\n"; $scriptCode .= "gajQuery('#ga-source-chart').gaChart({\n\tchartDivID: 'gaChartDivSearch',\n\tchartType: 'pie',\n\tchartHeight: '150px',\n\turl: 'index.php?option=com_ganalytics&view=page&source=source&format=raw&layout=data&path=" . JRequest::getVar('path', '', null, 'BASE64') . "',\n\tstart: '" . $this->escape($this->state->get('filter.search_start')) . "',\n\tend: '" . $this->escape($this->state->get('filter.search_end')) . "',\n\tcolorStart: '" . GAnalyticsHelper::getFadedColor('EB8F33', 20) . "',\n\tcolorEnd: 'EB8F33',\n\tpathPrefix: '" . JURI::root() . "'\n});\n"; $scriptCode .= "gajQuery('#ga-source-chart').gaChart('refresh');\n"; $scriptCode .= "gajQuery('#ga-mobile-chart').gaChart({\n\tchartDivID: 'gaChartDivMobile',\n\tchartHeight: '150px',\n\turl: 'index.php?option=com_ganalytics&view=page&source=mobile&format=raw&layout=data&path=" . JRequest::getVar('path', '', null, 'BASE64') . "',\n\tstart: '" . $this->escape($this->state->get('filter.search_start')) . "',\n\tend: '" . $this->escape($this->state->get('filter.search_end')) . "',\n\tcolorStart: '" . GAnalyticsHelper::getFadedColor('EB8F33', 20) . "',\n\tcolorEnd: 'EB8F33',\n\tpathPrefix: '" . JURI::root() . "'\n});\n"; $scriptCode .= "gajQuery('#ga-mobile-chart').gaChart('refresh');\n"; $scriptCode .= "gajQuery('#ga-language-chart').gaChart({\n\tchartDivID: 'gaChartDivLanguage',\n\tchartType: 'pie',\n\tchartHeight: '150px',\n\turl: 'index.php?option=com_ganalytics&view=page&source=language&format=raw&layout=data&path=" . JRequest::getVar('path', '', null, 'BASE64') . "',\n\tstart: '" . $this->escape($this->state->get('filter.search_start')) . "',\n\tend: '" . $this->escape($this->state->get('filter.search_end')) . "',\n\tcolorStart: '" . GAnalyticsHelper::getFadedColor('EB8F33', 20) . "',\n\tcolorEnd: 'EB8F33',\n\tpathPrefix: '" . JURI::root() . "'\n});\n"; $scriptCode .= "gajQuery('#ga-language-chart').gaChart('refresh');\n"; $scriptCode .= "gajQuery('#ga-referrer-chart').gaChart({\n\tchartDivID: 'gaChartDivReferrer',\n\turl: 'index.php?option=com_ganalytics&view=page&source=referrer&format=raw&layout=data&path=" . JRequest::getVar('path', '', null, 'BASE64') . "',\n\tstart: '" . $this->escape($this->state->get('filter.search_start')) . "',\n\tend: '" . $this->escape($this->state->get('filter.search_end')) . "',\n\tcolorStart: '" . GAnalyticsHelper::getFadedColor('EB8F33', 20) . "',\n\tcolorEnd: 'EB8F33',\n\tpathPrefix: '" . JURI::root() . "'\n});\n"; $scriptCode .= "gajQuery('#ga-referrer-chart').gaChart('refresh');\n"; $scriptCode .= "});\n"; $document->addScriptDeclaration($scriptCode); $document->addStyleSheet(JURI::root() . 'administrator/components/com_ganalytics/views/page/tmpl/default.css'); ?> <form action="<?php echo JRoute::_('index.php?option=com_ganalytics&view=page'); ?> " method="post" name="adminForm"> <div id="filter-bar" class="btn-toolbar"> <div class="btn-group pull-left"> <label class="element-invisible" for="filter_search_start"><?php echo JText::_('COM_DPCALENDAR_VIEW_EVENTS_START_DATE_AFTER_LABEL'); ?> :</label>