update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
namespace Piwik\Plugins\CoreVisualizations;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\ViewDataTable\Manager as ViewDataTableManager;
|
||||
|
||||
require_once PIWIK_INCLUDE_PATH . '/plugins/CoreVisualizations/JqplotDataGenerator.php';
|
||||
require_once PIWIK_INCLUDE_PATH . '/plugins/CoreVisualizations/Visualizations/Cloud.php';
|
||||
require_once PIWIK_INCLUDE_PATH . '/plugins/CoreVisualizations/Visualizations/HtmlTable.php';
|
||||
require_once PIWIK_INCLUDE_PATH . '/plugins/CoreVisualizations/Visualizations/JqplotGraph.php';
|
||||
|
||||
/**
|
||||
* This plugin contains all core visualizations, such as the normal HTML table and
|
||||
|
|
@ -21,27 +21,39 @@ require_once PIWIK_INCLUDE_PATH . '/plugins/CoreVisualizations/Visualizations/Jq
|
|||
class CoreVisualizations extends \Piwik\Plugin
|
||||
{
|
||||
/**
|
||||
* @see Piwik\Plugin::getListHooksRegistered
|
||||
* @see Piwik\Plugin::registerEvents
|
||||
*/
|
||||
public function getListHooksRegistered()
|
||||
public function registerEvents()
|
||||
{
|
||||
return array(
|
||||
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
|
||||
'AssetManager.getJavaScriptFiles' => 'getJsFiles',
|
||||
'ViewDataTable.addViewDataTable' => 'getAvailableDataTableVisualizations',
|
||||
'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
|
||||
'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys',
|
||||
'UsersManager.deleteUser' => 'deleteUser',
|
||||
'ViewDataTable.addViewDataTable' => 'addViewDataTable'
|
||||
);
|
||||
}
|
||||
|
||||
public function getAvailableDataTableVisualizations(&$visualizations)
|
||||
public function deleteUser($userLogin)
|
||||
{
|
||||
$visualizations[] = 'Piwik\\Plugins\\CoreVisualizations\\Visualizations\\Sparkline';
|
||||
$visualizations[] = 'Piwik\\Plugins\\CoreVisualizations\\Visualizations\\HtmlTable';
|
||||
$visualizations[] = 'Piwik\\Plugins\\CoreVisualizations\\Visualizations\\HtmlTable\\AllColumns';
|
||||
$visualizations[] = 'Piwik\\Plugins\\CoreVisualizations\\Visualizations\\Cloud';
|
||||
$visualizations[] = 'Piwik\\Plugins\\CoreVisualizations\\Visualizations\\JqplotGraph\\Pie';
|
||||
$visualizations[] = 'Piwik\\Plugins\\CoreVisualizations\\Visualizations\\JqplotGraph\\Bar';
|
||||
$visualizations[] = 'Piwik\\Plugins\\CoreVisualizations\\Visualizations\\JqplotGraph\\Evolution';
|
||||
ViewDataTableManager::clearUserViewDataTableParameters($userLogin);
|
||||
}
|
||||
|
||||
public function addViewDataTable(&$viewDataTable)
|
||||
{
|
||||
// Both are the same HtmlTable, just the Pivot one has some extra logic in case Pivot is used.
|
||||
// We don't want to use the same HtmlTable twice in the UI. Therefore we always need to remove one.
|
||||
if (Common::getRequestVar('pivotBy', '')) {
|
||||
$tableToRemove = 'Visualizations\HtmlTable';
|
||||
} else {
|
||||
$tableToRemove = 'HtmlTable\PivotBy';
|
||||
}
|
||||
|
||||
foreach ($viewDataTable as $index => $table) {
|
||||
if (Common::stringEndsWith($table, $tableToRemove)) {
|
||||
unset($viewDataTable[$index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getStylesheetFiles(&$stylesheets)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -10,7 +10,6 @@
|
|||
namespace Piwik\Plugins\CoreVisualizations;
|
||||
|
||||
use Exception;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\DataTable;
|
||||
use Piwik\Metrics;
|
||||
|
|
@ -33,7 +32,6 @@ class JqplotDataGenerator
|
|||
*/
|
||||
protected $properties;
|
||||
|
||||
|
||||
protected $graphType;
|
||||
|
||||
/**
|
||||
|
|
@ -139,7 +137,10 @@ class JqplotDataGenerator
|
|||
|
||||
// the bar charts contain the labels a first series
|
||||
// this series has to be removed from the units
|
||||
if ($this->graphType == 'bar') {
|
||||
reset($units);
|
||||
if ($this->graphType == 'bar'
|
||||
&& key($units) == 'label'
|
||||
) {
|
||||
array_shift($units);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -14,7 +14,7 @@ use Piwik\ProxyHttp;
|
|||
/**
|
||||
*
|
||||
*/
|
||||
class Chart
|
||||
class Chart
|
||||
{
|
||||
// the data kept here conforms to the jqplot data layout
|
||||
// @see http://www.jqplot.com/docs/files/jqPlotOptions-txt.html
|
||||
|
|
@ -59,7 +59,7 @@ class Chart
|
|||
);
|
||||
|
||||
array_walk($data, function (&$v) {
|
||||
$v = (float)$v;
|
||||
$v = (float) Common::forceDotAsSeparatorForDecimalPoint($v);
|
||||
});
|
||||
$this->data[] = & $data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -8,7 +8,6 @@
|
|||
*/
|
||||
namespace Piwik\Plugins\CoreVisualizations\JqplotDataGenerator;
|
||||
|
||||
|
||||
use Piwik\Archive\DataTableFactory;
|
||||
use Piwik\Common;
|
||||
use Piwik\DataTable;
|
||||
|
|
@ -78,7 +77,7 @@ class Evolution extends JqplotDataGenerator
|
|||
|
||||
$axisXOnClick = array();
|
||||
$queryStringAsHash = $this->getQueryStringAsHash();
|
||||
foreach ($dataTable->getDataTables() as $idDataTable => $metadataDataTable) {
|
||||
foreach ($dataTable->getDataTables() as $metadataDataTable) {
|
||||
$dateInUrl = $metadataDataTable->getMetadata(DataTableFactory::TABLE_METADATA_PERIOD_INDEX)->getDateStart();
|
||||
$parameters = array(
|
||||
'idSite' => $idSite,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*/
|
||||
namespace Piwik\Plugins\CoreVisualizations\Metrics\Formatter;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Metrics\Formatter;
|
||||
|
||||
/**
|
||||
* A metrics formatter that prettifies metric values without returning string values.
|
||||
* Results of this class can be converted to numeric values and processed further in
|
||||
* some way.
|
||||
*/
|
||||
class Numeric extends Formatter
|
||||
{
|
||||
public function getPrettyNumber($value, $precision = 0)
|
||||
{
|
||||
return round($value, $precision);
|
||||
}
|
||||
|
||||
public function getPrettyTimeFromSeconds($numberOfSeconds, $displayTimeAsSentence = false, $round = false)
|
||||
{
|
||||
return $round ? (int)$numberOfSeconds : (float) Common::forceDotAsSeparatorForDecimalPoint($numberOfSeconds);
|
||||
}
|
||||
|
||||
public function getPrettySizeFromBytes($size, $unit = null, $precision = 1)
|
||||
{
|
||||
list($size, $sizeUnit) = $this->getPrettySizeFromBytesWithUnit($size, $unit, $precision);
|
||||
return $size;
|
||||
}
|
||||
|
||||
public function getPrettyMoney($value, $idSite)
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getPrettyPercentFromQuotient($value)
|
||||
{
|
||||
return $value * 100;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -26,10 +26,10 @@ class Cloud extends Visualization
|
|||
{
|
||||
const ID = 'cloud';
|
||||
const TEMPLATE_FILE = "@CoreVisualizations/_dataTableViz_tagCloud.twig";
|
||||
const FOOTER_ICON = 'plugins/Zeitgeist/images/tagcloud.png';
|
||||
const FOOTER_ICON = 'plugins/Morpheus/images/tagcloud.png';
|
||||
const FOOTER_ICON_TITLE = 'General_TagCloud';
|
||||
|
||||
/** Used by integration tests to make sure output is consistent. */
|
||||
/** Used by system tests to make sure output is consistent. */
|
||||
public static $debugDisableShuffle = false;
|
||||
public $truncatingLimit = 50;
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ class Cloud extends Visualization
|
|||
$tmpArray = $this->wordsArray;
|
||||
|
||||
$this->wordsArray = array();
|
||||
foreach ($keys as $key => $value) {
|
||||
foreach ($keys as $value) {
|
||||
$this->wordsArray[$value] = $tmpArray[$value];
|
||||
}
|
||||
|
||||
|
|
@ -174,6 +174,8 @@ class Cloud extends Visualization
|
|||
*/
|
||||
private function truncateWordIfNeeded($word)
|
||||
{
|
||||
$word = Common::unsanitizeInputValue($word);
|
||||
|
||||
if (Common::mb_strlen($word) > $this->truncatingLimit) {
|
||||
return Common::mb_substr($word, 0, $this->truncatingLimit - 3) . '...';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -8,8 +8,9 @@
|
|||
*/
|
||||
namespace Piwik\Plugins\CoreVisualizations\Visualizations;
|
||||
|
||||
use Piwik\DataTable\Row;
|
||||
use Piwik\DataTable;
|
||||
use Piwik\DataTable\Row;
|
||||
use Piwik\Plugins\CoreVisualizations\Metrics\Formatter\Numeric;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugin\Visualization;
|
||||
|
||||
|
|
@ -58,7 +59,9 @@ abstract class Graph extends Visualization
|
|||
$this->requestConfig->request_parameters_to_modify['filter_truncate'] = $this->config->max_graph_elements - 1;
|
||||
}
|
||||
|
||||
$this->requestConfig->request_parameters_to_modify['disable_queued_filters'] = 1;
|
||||
$this->requestConfig->request_parameters_to_modify['format_metrics'] = 1;
|
||||
|
||||
$this->metricsFormatter = new Numeric();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -135,7 +138,7 @@ abstract class Graph extends Visualization
|
|||
// set default selectable columns, if none specified
|
||||
$selectableColumns = $this->config->selectable_columns;
|
||||
if (false === $selectableColumns) {
|
||||
$selectableColumns = array('nb_visits', 'nb_actions', 'nb_uniq_visitors');
|
||||
$selectableColumns = array('nb_visits', 'nb_actions', 'nb_uniq_visitors', 'nb_users');
|
||||
|
||||
if ($this->config->show_goals) {
|
||||
$goalMetrics = array('nb_conversions', 'revenue');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -8,11 +8,11 @@
|
|||
*/
|
||||
namespace Piwik\Plugins\CoreVisualizations\Visualizations;
|
||||
|
||||
use Piwik\Plugin\Visualization;
|
||||
use Piwik\View;
|
||||
use Piwik\API\Request as ApiRequest;
|
||||
use Piwik\Common;
|
||||
use Piwik\Period;
|
||||
use Piwik\API\Request as ApiRequest;
|
||||
use Piwik\Plugin\Visualization;
|
||||
use Piwik\View;
|
||||
|
||||
/**
|
||||
* DataTable visualization that shows DataTable data in an HTML table.
|
||||
|
|
@ -23,7 +23,7 @@ class HtmlTable extends Visualization
|
|||
{
|
||||
const ID = 'table';
|
||||
const TEMPLATE_FILE = "@CoreVisualizations/_dataTableViz_htmlTable.twig";
|
||||
const FOOTER_ICON = 'plugins/Zeitgeist/images/table.png';
|
||||
const FOOTER_ICON = 'plugins/Morpheus/images/table.png';
|
||||
const FOOTER_ICON_TITLE = 'General_DisplaySimpleTable';
|
||||
|
||||
public static function getDefaultConfig()
|
||||
|
|
@ -51,7 +51,6 @@ class HtmlTable extends Visualization
|
|||
}
|
||||
|
||||
if ($this->dataTable->getRowsCount()) {
|
||||
|
||||
$request = new ApiRequest(array(
|
||||
'method' => 'API.get',
|
||||
'module' => 'API',
|
||||
|
|
@ -64,14 +63,13 @@ class HtmlTable extends Visualization
|
|||
'filter_offset' => 0,
|
||||
'period' => $period,
|
||||
'showColumns' => implode(',', $this->config->columns_to_display),
|
||||
'columns' => implode(',', $this->config->columns_to_display)
|
||||
'columns' => implode(',', $this->config->columns_to_display),
|
||||
'pivotBy' => ''
|
||||
));
|
||||
|
||||
$dataTable = $request->process();
|
||||
$this->assignTemplateVar('siteSummary', $dataTable);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
namespace Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
|
||||
|
||||
use Piwik\DataTable;
|
||||
use Piwik\Metrics;
|
||||
use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
|
||||
use Piwik\View;
|
||||
|
||||
|
|
@ -18,7 +20,7 @@ use Piwik\View;
|
|||
class AllColumns extends HtmlTable
|
||||
{
|
||||
const ID = 'tableAllColumns';
|
||||
const FOOTER_ICON = 'plugins/Zeitgeist/images/table_more.png';
|
||||
const FOOTER_ICON = 'plugins/Morpheus/images/table_more.png';
|
||||
const FOOTER_ICON_TITLE = 'General_DisplayTableWithMoreMetrics';
|
||||
|
||||
public function beforeRender()
|
||||
|
|
@ -36,13 +38,19 @@ class AllColumns extends HtmlTable
|
|||
|
||||
$properties = $this->config;
|
||||
|
||||
$this->dataTable->filter(function ($dataTable) use ($properties) {
|
||||
$this->dataTable->filter(function (DataTable $dataTable) use ($properties) {
|
||||
$columnsToDisplay = array('label', 'nb_visits');
|
||||
|
||||
if (in_array('nb_uniq_visitors', $dataTable->getColumns())) {
|
||||
$columns = $dataTable->getColumns();
|
||||
|
||||
if (in_array('nb_uniq_visitors', $columns)) {
|
||||
$columnsToDisplay[] = 'nb_uniq_visitors';
|
||||
}
|
||||
|
||||
if (in_array('nb_users', $columns)) {
|
||||
$columnsToDisplay[] = 'nb_users';
|
||||
}
|
||||
|
||||
$columnsToDisplay = array_merge(
|
||||
$columnsToDisplay, array('nb_actions', 'nb_actions_per_visit', 'avg_time_on_site', 'bounce_rate')
|
||||
);
|
||||
|
|
@ -56,11 +64,4 @@ class AllColumns extends HtmlTable
|
|||
$properties->columns_to_display = $columnsToDisplay;
|
||||
});
|
||||
}
|
||||
|
||||
public function afterGenericFiltersAreAppliedToLoadedDataTable()
|
||||
{
|
||||
$prettifyTime = array('\Piwik\MetricsFormatter', 'getPrettyTimeFromSeconds');
|
||||
|
||||
$this->dataTable->filter('ColumnCallbackReplace', array('avg_time_on_site', $prettifyTime));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
|
||||
|
||||
use Piwik\DataTable;
|
||||
use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
|
||||
use Piwik\View;
|
||||
|
||||
/**
|
||||
* DataTable Visualization that derives from HtmlTable and sets show_extra_columns to true.
|
||||
*/
|
||||
class PivotBy extends HtmlTable
|
||||
{
|
||||
public function beforeGenericFiltersAreAppliedToLoadedDataTable()
|
||||
{
|
||||
$this->config->columns_to_display = $this->dataTable->getColumns();
|
||||
|
||||
$this->dataTable->applyQueuedFilters();
|
||||
|
||||
parent::beforeGenericFiltersAreAppliedToLoadedDataTable();
|
||||
}
|
||||
|
||||
public function beforeRender()
|
||||
{
|
||||
parent::beforeRender();
|
||||
|
||||
$this->config->columns_to_display = $this->dataTable->getColumns();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -11,6 +11,7 @@ namespace Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
|
|||
|
||||
use Piwik\Common;
|
||||
use Piwik\Config as PiwikConfig;
|
||||
use Piwik\Metrics;
|
||||
use Piwik\ViewDataTable\RequestConfig as VisualizationRequestConfig;
|
||||
|
||||
/**
|
||||
|
|
@ -33,7 +34,12 @@ class RequestConfig extends VisualizationRequestConfig
|
|||
$this->filter_limit = PiwikConfig::getInstance()->General['datatable_default_limit'];
|
||||
|
||||
if (Common::getRequestVar('enable_filter_excludelowpop', false) == '1') {
|
||||
$this->filter_excludelowpop = 'nb_visits';
|
||||
if (Common::getRequestVar('flat', 0, 'int') === 1) {
|
||||
$this->filter_excludelowpop = 'nb_visits';
|
||||
} else {
|
||||
$this->filter_excludelowpop = Metrics::INDEX_NB_VISITS;
|
||||
}
|
||||
|
||||
$this->filter_excludelowpop_value = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -8,7 +8,6 @@
|
|||
*/
|
||||
namespace Piwik\Plugins\CoreVisualizations\Visualizations;
|
||||
|
||||
|
||||
use Piwik\DataTable;
|
||||
use Piwik\Plugins\CoreVisualizations\JqplotDataGenerator;
|
||||
use Piwik\View;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -18,7 +18,7 @@ use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph;
|
|||
class Bar extends JqplotGraph
|
||||
{
|
||||
const ID = 'graphVerticalBar';
|
||||
const FOOTER_ICON = 'plugins/Zeitgeist/images/chart_bar.png';
|
||||
const FOOTER_ICON = 'plugins/Morpheus/images/chart_bar.png';
|
||||
const FOOTER_ICON_TITLE = 'General_VBarGraph';
|
||||
|
||||
public function beforeRender()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -18,7 +18,7 @@ use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph;
|
|||
class Pie extends JqplotGraph
|
||||
{
|
||||
const ID = 'graphPie';
|
||||
const FOOTER_ICON = 'plugins/Zeitgeist/images/chart_pie.png';
|
||||
const FOOTER_ICON = 'plugins/Morpheus/images/chart_pie.png';
|
||||
const FOOTER_ICON_TITLE = 'General_Piechart';
|
||||
|
||||
public static function getDefaultConfig()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Piwik - Web Analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* DataTable UI class for JqplotGraph.
|
||||
*
|
||||
|
|
@ -12,11 +12,21 @@
|
|||
|
||||
var exports = require('piwik/UI'),
|
||||
DataTable = exports.DataTable,
|
||||
dataTablePrototype = DataTable.prototype;
|
||||
dataTablePrototype = DataTable.prototype,
|
||||
getLabelFontFamily = function () {
|
||||
if (!window.piwik.jqplotLabelFont) {
|
||||
window.piwik.jqplotLabelFont = $('<p/>').hide().appendTo('body').css('font-family');
|
||||
}
|
||||
|
||||
return window.piwik.jqplotLabelFont || 'Arial';
|
||||
}
|
||||
;
|
||||
|
||||
exports.getLabelFontFamily = getLabelFontFamily;
|
||||
|
||||
/**
|
||||
* DataTable UI class for jqPlot graph datatable visualizations.
|
||||
*
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
exports.JqplotGraphDataTable = function (element) {
|
||||
|
|
@ -95,7 +105,7 @@
|
|||
tickOptions: {
|
||||
showMark: false,
|
||||
fontSize: '11px',
|
||||
fontFamily: window.piwik.jqplotLabelFont || 'Arial'
|
||||
fontFamily: getLabelFontFamily()
|
||||
},
|
||||
rendererOptions: {
|
||||
drawBaseline: false
|
||||
|
|
@ -104,7 +114,8 @@
|
|||
axes: {
|
||||
yaxis: {
|
||||
tickOptions: {
|
||||
formatString: '%d'
|
||||
formatString: '%s',
|
||||
formatter: $.jqplot.NumberFormatter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -125,7 +136,7 @@
|
|||
$.each(series, function(index, value) {
|
||||
if ($.isArray(value) && value[1]) {
|
||||
sum = sum + value[1];
|
||||
} else {
|
||||
} else if (!$.isArray(value)) {
|
||||
sum = sum + value;
|
||||
}
|
||||
});
|
||||
|
|
@ -136,7 +147,7 @@
|
|||
if ($.isArray(value) && value[1]) {
|
||||
value = value[1];
|
||||
}
|
||||
|
||||
|
||||
percentages[valueIdx] = sum > 0 ? Math.round(100 * value / sum) : 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -263,6 +274,70 @@
|
|||
loading.css({opacity: .7});
|
||||
},
|
||||
|
||||
/**
|
||||
* This method sums up total width of all tick according to currently
|
||||
* set font-family, font-size and font-weight. It is achieved by
|
||||
* creating span elements with ticks and adding their width.
|
||||
* Rendered ticks have to be visible to get their real width. But it
|
||||
* is too fast for user to notice it. If total ticks width is bigger
|
||||
* than container width then half of ticks is beeing cut out and their
|
||||
* width is tested again. Until their total width is smaller than chart
|
||||
* div. There is a failsafe so check will be performed no more than 20
|
||||
* times, which is I think more than enough. Each tick have its own
|
||||
* gutter, by default width of 5 px from each side so they are more
|
||||
* readable.
|
||||
*
|
||||
* @param $targetDiv
|
||||
* @private
|
||||
*/
|
||||
_checkTicksWidth: function($targetDiv){
|
||||
if(typeof this.jqplotParams.axes.xaxis.ticksOriginal === 'undefined' || this.jqplotParams.axes.xaxis.ticksOriginal === {}){
|
||||
this.jqplotParams.axes.xaxis.ticksOriginal = this.jqplotParams.axes.xaxis.ticks.slice();
|
||||
}
|
||||
|
||||
var ticks = this.jqplotParams.axes.xaxis.ticks = this.jqplotParams.axes.xaxis.ticksOriginal.slice();
|
||||
|
||||
var divWidth = $targetDiv.width();
|
||||
var tickOptions = $.extend(true, {}, this.jqplotParams.axesDefaults.tickOptions, this.jqplotParams.axes.xaxis.tickOptions);
|
||||
var gutter = tickOptions.gutter || 5;
|
||||
var sumWidthOfTicks = Number.MAX_VALUE;
|
||||
var $labelTestChamber = {};
|
||||
var tick = "";
|
||||
var $body = $("body");
|
||||
var maxRunsFailsafe = 20;
|
||||
var ticksCount = 0;
|
||||
var key = 0;
|
||||
|
||||
while(sumWidthOfTicks > divWidth && maxRunsFailsafe > 0) {
|
||||
sumWidthOfTicks = 0;
|
||||
for (key = 0; key < ticks.length; key++) {
|
||||
tick = ticks[key];
|
||||
if (tick !== " " && tick !== "") {
|
||||
$labelTestChamber = $("<span/>", {
|
||||
style: 'font-size: ' + (tickOptions.fontSize || '11px') + '; font-family: ' + (tickOptions.fontFamily || 'Arial, Helvetica, sans-serif') + ';' + (tickOptions.fontWeight || 'normal') + ';' + 'clear: both; float: none;',
|
||||
text: tick
|
||||
}).appendTo($body);
|
||||
sumWidthOfTicks += ($labelTestChamber.width() + gutter*2);
|
||||
$labelTestChamber.remove();
|
||||
}
|
||||
}
|
||||
|
||||
ticksCount = 0;
|
||||
if (sumWidthOfTicks > divWidth) {
|
||||
for (key = 0; key < ticks.length; key++) {
|
||||
tick = ticks[key];
|
||||
if (tick !== " " && tick !== "") {
|
||||
if (ticksCount % 2 == 1) {
|
||||
ticks[key] = " ";
|
||||
}
|
||||
ticksCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
maxRunsFailsafe--;
|
||||
}
|
||||
},
|
||||
|
||||
/** Generic render function */
|
||||
render: function () {
|
||||
if (this.data.length == 0) { // sanity check
|
||||
|
|
@ -285,6 +360,14 @@
|
|||
// report has been displayed.
|
||||
var self = this;
|
||||
|
||||
// before drawing a jqplot chart, check if all labels ticks will fit
|
||||
// into it
|
||||
if( this.param.viewDataTable === "graphBar"
|
||||
|| this.param.viewDataTable === "graphVerticalBar"
|
||||
|| this.param.viewDataTable === "graphEvolution" ) {
|
||||
self._checkTicksWidth(target);
|
||||
}
|
||||
|
||||
// create jqplot chart
|
||||
try {
|
||||
var plot = self._plot = $.jqplot(targetDivId, this.data, this.jqplotParams);
|
||||
|
|
@ -302,7 +385,7 @@
|
|||
// TODO: this code destroys plots when a page is switched. there must be a better way of managing memory.
|
||||
if (typeof $.jqplot.visiblePlots == 'undefined') {
|
||||
$.jqplot.visiblePlots = [];
|
||||
$('.nav').on('piwikSwitchPage', function () {
|
||||
$('#secondNavBar').on('piwikSwitchPage', function () {
|
||||
for (var i = 0; i < $.jqplot.visiblePlots.length; i++) {
|
||||
if ($.jqplot.visiblePlots[i] == null) {
|
||||
continue;
|
||||
|
|
@ -355,10 +438,10 @@
|
|||
});
|
||||
|
||||
var popover = $(document.createElement('div'));
|
||||
|
||||
|
||||
popover.append('<div style="font-size: 13px; margin-bottom: 10px;">'
|
||||
+ lang.exportText + '</div>').append($(img));
|
||||
|
||||
|
||||
popover.dialog({
|
||||
title: lang.exportTitle,
|
||||
modal: true,
|
||||
|
|
@ -446,7 +529,7 @@
|
|||
var axisId = this.jqplotParams.series[seriesIndex].yaxis;
|
||||
var formatString = this.jqplotParams.axes[axisId].tickOptions.formatString;
|
||||
|
||||
return formatString.replace('%s', value);
|
||||
return $.jqplot.NumberFormatter(formatString, value);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -486,7 +569,7 @@
|
|||
} else if (viewDataTable == 'graphVerticalBar') {
|
||||
graphType = 'bar';
|
||||
}
|
||||
|
||||
|
||||
var namespace = graphType + '-graph-colors';
|
||||
|
||||
this.jqplotParams.seriesColors = colorManager.getColors(namespace, seriesColorNames, true);
|
||||
|
|
@ -608,7 +691,6 @@ JQPlotExternalSeriesToggle.prototype = {
|
|||
|
||||
};
|
||||
|
||||
|
||||
// ROW EVOLUTION SERIES TOGGLE
|
||||
|
||||
function RowEvolutionSeriesToggle(targetDivId, jqplotData, initiallyShowAll) {
|
||||
|
|
@ -623,7 +705,7 @@ RowEvolutionSeriesToggle.prototype.attachEvents = function () {
|
|||
|
||||
this.seriesPickers.each(function (i) {
|
||||
var el = $(this);
|
||||
el.click(function (e) {
|
||||
el.off('click').on('click', function (e) {
|
||||
if (e.shiftKey) {
|
||||
self.toggleSeries(i);
|
||||
|
||||
|
|
@ -665,6 +747,21 @@ RowEvolutionSeriesToggle.prototype.beforeReplot = function () {
|
|||
}
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// PIWIK NUMBERFORMATTER PLUGIN FOR JQPLOT
|
||||
// ------------------------------------------------------------
|
||||
(function($){
|
||||
|
||||
$.jqplot.NumberFormatter = function (format, value) {
|
||||
|
||||
if (!$.isNumeric(value)) {
|
||||
return format.replace(/%s/, value);
|
||||
}
|
||||
return format.replace(/%s/, NumberFormatter.formatNumber(value));
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// PIWIK TICKS PLUGIN FOR JQPLOT
|
||||
|
|
@ -825,7 +922,6 @@ RowEvolutionSeriesToggle.prototype.beforeReplot = function () {
|
|||
|
||||
})(jQuery);
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// LEGEND PLUGIN FOR JQPLOT
|
||||
// Render legend on canvas
|
||||
|
|
@ -880,7 +976,7 @@ RowEvolutionSeriesToggle.prototype.beforeReplot = function () {
|
|||
|
||||
var ctx = legend.legendCanvas._ctx;
|
||||
ctx.save();
|
||||
ctx.font = '11px ' + (window.piwik.jqplotLabelFont || 'Arial');
|
||||
ctx.font = '11px ' + require('piwik/UI').getLabelFontFamily()
|
||||
|
||||
// render series names
|
||||
var x = 0;
|
||||
|
|
@ -924,7 +1020,6 @@ RowEvolutionSeriesToggle.prototype.beforeReplot = function () {
|
|||
|
||||
})(jQuery);
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// SERIES PICKER
|
||||
// ------------------------------------------------------------
|
||||
|
|
@ -1019,7 +1114,7 @@ RowEvolutionSeriesToggle.prototype.beforeReplot = function () {
|
|||
var ctx = legend.pieLegendCanvas._ctx;
|
||||
ctx.save();
|
||||
|
||||
ctx.font = '11px ' + (window.piwik.jqplotLabelFont || 'Arial');
|
||||
ctx.font = '11px ' + require('piwik/UI').getLabelFontFamily()
|
||||
|
||||
// render labels
|
||||
var height = legend.pieLegendCanvas._elem.height();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Piwik - Web Analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* DataTable UI class for JqplotGraph/Bar.
|
||||
*
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
var percentage = '';
|
||||
if (typeof this.tooltip.percentages != 'undefined') {
|
||||
percentage = this.tooltip.percentages[seriesIndex][valueIndex];
|
||||
percentage = ' (' + percentage + '%)';
|
||||
percentage = ' (' + NumberFormatter.formatPercent(percentage) + ')';
|
||||
}
|
||||
|
||||
var label = this.jqplotParams.axes.xaxis.labels[valueIndex];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Piwik - Web Analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* DataTable UI class for JqplotGraph/Evolution.
|
||||
*
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
_setJqplotParameters: function (params) {
|
||||
JqplotGraphDataTablePrototype._setJqplotParameters.call(this, params);
|
||||
|
||||
|
||||
var defaultParams = {
|
||||
axes: {
|
||||
xaxis: {
|
||||
|
|
@ -89,6 +89,41 @@
|
|||
if (lastTick !== false && typeof self.jqplotParams.axes.xaxis.onclick != 'undefined'
|
||||
&& typeof self.jqplotParams.axes.xaxis.onclick[lastTick] == 'string') {
|
||||
var url = self.jqplotParams.axes.xaxis.onclick[lastTick];
|
||||
|
||||
if (url && -1 === url.indexOf('#')) {
|
||||
var module = broadcast.getValueFromHash('module');
|
||||
var action = broadcast.getValueFromHash('action');
|
||||
var idGoal = broadcast.getValueFromHash('idGoal');
|
||||
var idDimension = broadcast.getValueFromHash('idDimension');
|
||||
var idSite = broadcast.getValueFromUrl('idSite', url);
|
||||
var period = broadcast.getValueFromUrl('period', url);
|
||||
var date = broadcast.getValueFromUrl('date', url);
|
||||
|
||||
if (module && action) {
|
||||
url += '#module=' + module + '&action=' + action;
|
||||
|
||||
if (idSite) {
|
||||
url += '&idSite=' + idSite;
|
||||
}
|
||||
|
||||
if (idGoal) {
|
||||
url += '&idGoal=' + idGoal;
|
||||
}
|
||||
|
||||
if (idDimension) {
|
||||
url += '&idDimension=' + idDimension;
|
||||
}
|
||||
|
||||
if (period) {
|
||||
url += '&period=' + period;
|
||||
}
|
||||
|
||||
if (period) {
|
||||
url += '&date=' + date;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
piwikHelper.redirectToUrl(url);
|
||||
}
|
||||
})
|
||||
|
|
@ -100,17 +135,19 @@
|
|||
} else {
|
||||
label = self.jqplotParams.axes.xaxis.ticks[tick];
|
||||
}
|
||||
|
||||
|
||||
var text = [];
|
||||
for (var d = 0; d < self.data.length; d++) {
|
||||
var value = self.formatY(self.data[d][tick], d);
|
||||
var series = self.jqplotParams.series[d].label;
|
||||
text.push('<strong>' + value + '</strong> ' + series);
|
||||
text.push('<strong>' + value + '</strong> ' + piwikHelper.htmlEntities(series));
|
||||
}
|
||||
var content = '<h3>'+piwikHelper.htmlEntities(label)+'</h3>'+text.join('<br />');
|
||||
|
||||
$(this).tooltip({
|
||||
track: true,
|
||||
items: 'div',
|
||||
content: '<h3>'+label+'</h3>'+text.join('<br />'),
|
||||
content: content,
|
||||
show: false,
|
||||
hide: false
|
||||
}).trigger('mouseover');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Piwik - Web Analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* DataTable UI class for JqplotGraph/Pie.
|
||||
*
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
var label = this.data[0][valueIndex][0];
|
||||
|
||||
var text = '<strong>' + percentage + '%</strong> (' + value + ' ' + series + ')';
|
||||
var text = '<strong>' + NumberFormatter.formatPercent(percentage) + '</strong> (' + value + ' ' + series + ')';
|
||||
$(element).tooltip({
|
||||
track: true,
|
||||
items: '*',
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Piwik - Web Analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* Series Picker control addition for DataTable visualizations.
|
||||
*
|
||||
|
|
@ -11,30 +11,30 @@
|
|||
|
||||
/**
|
||||
* This class creates and manages the Series Picker for certain DataTable visualizations.
|
||||
*
|
||||
*
|
||||
* To add the series picker to your DataTable visualization, create a SeriesPicker instance
|
||||
* and after your visualization has been rendered, call the 'init' method.
|
||||
*
|
||||
*
|
||||
* To customize SeriesPicker placement and behavior, you can bind callbacks to the following
|
||||
* events before calling 'init':
|
||||
*
|
||||
*
|
||||
* 'placeSeriesPicker': Triggered after the DOM element for the series picker link is created.
|
||||
* You must use this event to add the link to the dataTable. YOu can also
|
||||
* use this event to position the link however you want.
|
||||
*
|
||||
*
|
||||
* Callback Signature: function () {}
|
||||
*
|
||||
*
|
||||
* 'seriesPicked': Triggered when the user selects one or more columns/rows.
|
||||
*
|
||||
*
|
||||
* Callback Signature: function (eventInfo, columns, rows) {}
|
||||
*
|
||||
*
|
||||
* Events are triggered via jQuery, so you bind callbacks to them like this:
|
||||
*
|
||||
*
|
||||
* var picker = new SeriesPicker(dataTable);
|
||||
* $(picker).bind('placeSeriesPicker', function () {
|
||||
* $(this.domElem).doSomething(...);
|
||||
* });
|
||||
*
|
||||
*
|
||||
* @param {dataTable} dataTable The dataTable instance to add a series picker to.
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
// render the picker?
|
||||
this.show = !! dataTable.props.show_series_picker
|
||||
&& (this.selectableColumns || this.selectableRows);
|
||||
|
||||
|
||||
// can multiple rows we selected?
|
||||
this.multiSelect = !! dataTable.props.allow_multi_select_series_picker;
|
||||
|
||||
|
|
@ -118,7 +118,7 @@
|
|||
|
||||
/**
|
||||
* Returns the translation of a metric that can be selected.
|
||||
*
|
||||
*
|
||||
* @param {String} metric The name of the metric, ie, 'nb_visits' or 'nb_actions'.
|
||||
* @return {String} The metric translation. If one cannot be found, the metric itself
|
||||
* is returned.
|
||||
|
|
@ -272,7 +272,11 @@
|
|||
$(this).trigger('seriesPicked', [columns, rows]);
|
||||
|
||||
// inform dashboard widget about changed parameters (to be restored on reload)
|
||||
$('#' + this.dataTableId).closest('[widgetId]').trigger('setParameters', {columns: columns, rows: rows});
|
||||
var UI = require('piwik/UI')
|
||||
var params = {columns: columns, columns_to_display: columns,
|
||||
rows: rows, rows_to_display: rows};
|
||||
var tableNode = $('#' + this.dataTableId);
|
||||
UI.DataTable.prototype.notifyWidgetParametersChange(tableNode, params);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -332,7 +336,7 @@
|
|||
;
|
||||
|
||||
$body.prepend(popover);
|
||||
|
||||
|
||||
var neededSpace = popover.outerWidth() + 10;
|
||||
|
||||
var linkOffset = pickerLink.offset();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
.jqplot-loading {
|
||||
background: url(../../Zeitgeist/images/loading-blue.gif) no-repeat center center white;
|
||||
background: url(../../Morpheus/images/loading-blue.gif) no-repeat center center white;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
}
|
||||
|
|
@ -80,10 +80,22 @@
|
|||
text-align: left;
|
||||
}
|
||||
|
||||
#Piwik_Popover .rowevolution .alert-info {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
a.rowevolution-startmulti {
|
||||
color: #4183C4 !important;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.rowevolution h2 {
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.rowevolution .metrics-container {
|
||||
|
|
@ -164,14 +176,6 @@
|
|||
color: #f00;
|
||||
}
|
||||
|
||||
.rowevolution-documentation {
|
||||
font-size: 12px;
|
||||
margin: 2px 0 5px 0;
|
||||
padding: 5px 0 5px 23px;
|
||||
color: #888;
|
||||
background: url(../../Zeitgeist/images/help.png) no-repeat left center;
|
||||
}
|
||||
|
||||
.rowevolution .metric-selectbox,
|
||||
.rowevolution .compare-container {
|
||||
padding: 15px 0 5px 0;
|
||||
|
|
@ -184,17 +188,6 @@
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
a.rowevolution-startmulti {
|
||||
font-size: 12px;
|
||||
color: #7E7363;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.rowevolution-startmulti:hover {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
/**
|
||||
* SERIES PICKER FOR CHARTS
|
||||
*/
|
||||
|
|
@ -206,7 +199,7 @@ a.rowevolution-startmulti:hover {
|
|||
width: 24px;
|
||||
height: 16px;
|
||||
margin-top: 3px;
|
||||
background: url(../../Zeitgeist/images/chart_line_edit.png) no-repeat center center;
|
||||
background: url(../../Morpheus/images/chart_line_edit.png) no-repeat center center;
|
||||
overflow: hidden;
|
||||
text-indent: -999px;
|
||||
}
|
||||
|
|
@ -216,7 +209,7 @@ a.rowevolution-startmulti:hover {
|
|||
position: absolute;
|
||||
z-index: 1010; /* must be above ui dialog */
|
||||
margin-top: -2px;
|
||||
background: url(../../Zeitgeist/images/chart_line_edit.png) no-repeat 7px 4px #f7f7f7;
|
||||
background: url(../../Morpheus/images/chart_line_edit.png) no-repeat 7px 4px #f7f7f7;
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
border: 1px solid #e4e5e4;
|
||||
|
|
@ -251,9 +244,10 @@ a.rowevolution-startmulti:hover {
|
|||
|
||||
.jqplot-seriespicker-popover input.select {
|
||||
margin-right: 8px;
|
||||
min-height: 5px;
|
||||
}
|
||||
|
||||
.jqplot-seriespicker-popover p.pickColumn,
|
||||
.jqplot-seriespicker-popover p.pickRow {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,13 +12,16 @@
|
|||
<tbody>
|
||||
{%- endif -%}
|
||||
{% if showingEmbeddedSubtable and dataTable.getRowsCount() == 0 %}
|
||||
<tr>
|
||||
<td colspan="{{ properties.columns_to_display|length }}">{{ 'CoreHome_CategoryNoData'|translate }}</td>
|
||||
</tr>
|
||||
{% if clientSideParameters is not defined or clientSideParameters.filter_pattern_recursive is not defined or not clientSideParameters.filter_pattern_recursive %}
|
||||
<tr class="nodata">
|
||||
<td colspan="{{ properties.columns_to_display|length }}">{{ 'CoreHome_CategoryNoData'|translate }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{%- for rowId, row in dataTable.getRows() -%}
|
||||
{%- set rowHasSubtable = not subtablesAreDisabled and row.getIdSubDataTable() and properties.subtable_controller_action is not null -%}
|
||||
{%- set shouldHighlightRow = rowId == constant('Piwik\\DataTable::ID_SUMMARY_ROW') and properties.highlight_summary_row -%}
|
||||
{%- set isSummaryRow = rowId == constant('Piwik\\DataTable::ID_SUMMARY_ROW') -%}
|
||||
{%- set shouldHighlightRow = isSummaryRow and properties.highlight_summary_row -%}
|
||||
|
||||
{# display this row if it doesn't have a subtable or if we don't replace the row with the subtable #}
|
||||
{%- set showRow = subtablesAreDisabled
|
||||
|
|
@ -28,7 +31,10 @@
|
|||
|
||||
{% if showRow %}
|
||||
<tr {% if rowHasSubtable %}id="{{ row.getIdSubDataTable() }}"{% endif %}
|
||||
class="{{ row.getMetadata('css_class') }} {% if rowHasSubtable %}subDataTable{% endif %}{% if shouldHighlightRow %} highlight{% endif %}">
|
||||
{% if row.getMetadata('segment') is not false %} data-segment-filter="{{ row.getMetadata('segment')|e('html_attr') }}"{% endif %}
|
||||
{% if row.getMetadata('url') is not false %} data-url-label="{{ row.getMetadata('url')|rawSafeDecoded }}"{% endif %}
|
||||
class="{{ row.getMetadata('css_class') }} {% if rowHasSubtable %}subDataTable{% endif %}{% if shouldHighlightRow %} highlight{% endif %}{% if isSummaryRow %} summaryRow{% endif %}"
|
||||
{% if rowHasSubtable %}title="{{ 'CoreHome_ClickRowToExpandOrContract'|translate }}"{% endif %}>
|
||||
{% for column in properties.columns_to_display %}
|
||||
<td>
|
||||
{% include "@CoreHome/_dataTableCell.twig" with properties %}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<div class="jqplot-graph">
|
||||
<div alt="{{ 'Mobile_StaticGraph'|translate }}" class="jqplot-graph">
|
||||
<div class="piwik-graph" data-data="{{ visualization.getGraphData(dataTable, properties)|json_encode }}"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
{% set cloudColumn = properties.columns_to_display[1] %}
|
||||
<div class="tagCloud">
|
||||
{% for word,value in cloudValues %}
|
||||
<span title="{{ value.word }} ({{ value.value }} {{ properties.translations[cloudColumn]|default(cloudColumn) }})" class="word size{{ value.size }}
|
||||
<span title="{{ value.word|rawSafeDecoded }} ({{ value.value }} {{ properties.translations[cloudColumn]|default(cloudColumn) }})" class="word size{{ value.size }}
|
||||
{# we strike tags with 0 hits #}
|
||||
{% if value.value == 0 %}valueIsZero{% endif %}">
|
||||
{% if labelMetadata[value.word].url is not sameas(false) %}
|
||||
<a href="{{ labelMetadata[value.word].url }}" target="_blank">
|
||||
<a href="{{ labelMetadata[value.word].url }}" rel="noreferrer" target="_blank">
|
||||
{% endif %}
|
||||
{% if labelMetadata[value.word].logo is not sameas(false) %}
|
||||
<img src="{{ labelMetadata[value.word].logo }}" width="{{ value.logoWidth }}" />
|
||||
{% else %}
|
||||
{{ value.wordTruncated }}
|
||||
{{ value.wordTruncated|rawSafeDecoded }}
|
||||
{% endif %}
|
||||
{% if labelMetadata[value.word].url is not sameas(false) %}</a>{% endif %}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue