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
|
||||
|
|
@ -10,15 +10,13 @@ namespace Piwik\AssetManager\UIAssetFetcher;
|
|||
|
||||
use Piwik\AssetManager\UIAssetFetcher;
|
||||
use Piwik\Piwik;
|
||||
use string;
|
||||
|
||||
class JScriptUIAssetFetcher extends UIAssetFetcher
|
||||
{
|
||||
|
||||
protected function retrieveFileLocations()
|
||||
{
|
||||
|
||||
if(!empty($this->plugins)) {
|
||||
if (!empty($this->plugins)) {
|
||||
|
||||
/**
|
||||
* Triggered when gathering the list of all JavaScript files needed by Piwik
|
||||
|
|
@ -31,7 +29,7 @@ class JScriptUIAssetFetcher extends UIAssetFetcher
|
|||
* plugin's root directory.
|
||||
*
|
||||
* _Note: While you are developing your plugin you should enable the config setting
|
||||
* `[Debug] disable_merged_assets` so JavaScript files will be reloaded immediately
|
||||
* `[Development] disable_merged_assets` so JavaScript files will be reloaded immediately
|
||||
* after every change._
|
||||
*
|
||||
* **Example**
|
||||
|
|
@ -53,17 +51,14 @@ class JScriptUIAssetFetcher extends UIAssetFetcher
|
|||
protected function addThemeFiles()
|
||||
{
|
||||
$theme = $this->getTheme();
|
||||
if(!$theme) {
|
||||
if (!$theme) {
|
||||
return;
|
||||
}
|
||||
if(in_array($theme->getThemeName(), $this->plugins)) {
|
||||
|
||||
if (in_array($theme->getThemeName(), $this->plugins)) {
|
||||
$jsInThemes = $this->getTheme()->getJavaScriptFiles();
|
||||
|
||||
if(!empty($jsInThemes)) {
|
||||
|
||||
foreach($jsInThemes as $jsFile) {
|
||||
|
||||
if (!empty($jsInThemes)) {
|
||||
foreach ($jsInThemes as $jsFile) {
|
||||
$this->fileLocations[] = $jsFile;
|
||||
}
|
||||
}
|
||||
|
|
@ -73,13 +68,17 @@ class JScriptUIAssetFetcher extends UIAssetFetcher
|
|||
protected function getPriorityOrder()
|
||||
{
|
||||
return array(
|
||||
'libs/jquery/jquery.js',
|
||||
'libs/jquery/jquery-ui.js',
|
||||
'libs/bower_components/jquery/dist/jquery.min.js',
|
||||
'libs/bower_components/jquery-ui/ui/minified/jquery-ui.min.js',
|
||||
'libs/jquery/jquery.browser.js',
|
||||
'libs/',
|
||||
'js/',
|
||||
'piwik.js',
|
||||
'plugins/CoreHome/javascripts/require.js',
|
||||
'plugins/Zeitgeist/javascripts/piwikHelper.js',
|
||||
'plugins/Zeitgeist/javascripts/',
|
||||
'plugins/Morpheus/javascripts/piwikHelper.js',
|
||||
'plugins/Morpheus/javascripts/jquery.icheck.min.js',
|
||||
'plugins/Morpheus/javascripts/morpheus.js',
|
||||
'plugins/Morpheus/javascripts/',
|
||||
'plugins/CoreHome/javascripts/uiControl.js',
|
||||
'plugins/CoreHome/javascripts/broadcast.js',
|
||||
'plugins/CoreHome/javascripts/', // load CoreHome JS before other plugins
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -17,7 +17,7 @@ class StaticUIAssetFetcher extends UIAssetFetcher
|
|||
*/
|
||||
private $priorityOrder;
|
||||
|
||||
function __construct($fileLocations, $priorityOrder, $theme)
|
||||
public function __construct($fileLocations, $priorityOrder, $theme)
|
||||
{
|
||||
parent::__construct(array(), $theme);
|
||||
|
||||
|
|
@ -27,7 +27,6 @@ class StaticUIAssetFetcher extends UIAssetFetcher
|
|||
|
||||
protected function retrieveFileLocations()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected function getPriorityOrder()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -15,15 +15,30 @@ class StylesheetUIAssetFetcher extends UIAssetFetcher
|
|||
{
|
||||
protected function getPriorityOrder()
|
||||
{
|
||||
return array(
|
||||
$theme = $this->getTheme();
|
||||
$themeName = $theme->getThemeName();
|
||||
|
||||
$order = array(
|
||||
'libs/',
|
||||
'plugins/CoreHome/stylesheets/color_manager.css', // must be before other Piwik stylesheets
|
||||
'plugins/Zeitgeist/stylesheets/base.less',
|
||||
'plugins/Zeitgeist/stylesheets/',
|
||||
'plugins/',
|
||||
'plugins/Dashboard/stylesheets/dashboard.less',
|
||||
'tests/',
|
||||
'plugins/Morpheus/stylesheets/base.less',
|
||||
);
|
||||
|
||||
if ($themeName === 'Morpheus') {
|
||||
$order[] = 'plugins\/((?!Morpheus).)*\/';
|
||||
} else {
|
||||
$order[] = sprintf('plugins\/((?!(Morpheus)|(%s)).)*\/', $themeName);
|
||||
}
|
||||
|
||||
$order = array_merge(
|
||||
$order,
|
||||
array(
|
||||
'plugins/Dashboard/stylesheets/dashboard.less',
|
||||
'tests/',
|
||||
)
|
||||
);
|
||||
|
||||
return $order;
|
||||
}
|
||||
|
||||
protected function retrieveFileLocations()
|
||||
|
|
@ -55,9 +70,13 @@ class StylesheetUIAssetFetcher extends UIAssetFetcher
|
|||
|
||||
protected function addThemeFiles()
|
||||
{
|
||||
$theme = $this->getTheme();
|
||||
if (!$theme) {
|
||||
return;
|
||||
}
|
||||
$themeStylesheet = $this->getTheme()->getStylesheet();
|
||||
|
||||
if($themeStylesheet) {
|
||||
if ($themeStylesheet) {
|
||||
$this->fileLocations[] = $themeStylesheet;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue