diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2016-08-29 07:13:24 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2016-08-29 18:28:55 +0300 |
commit | 903b870466b62e8a655a0f6564d052583c0fb7ec (patch) | |
tree | 8a25f6c18322aeb0a062840152d259b5ac5265b3 /plugins | |
parent | 4c9d1274408fb57d5e0b53dcda425dc4892c7b00 (diff) |
fix tests
Diffstat (limited to 'plugins')
22 files changed, 95 insertions, 142 deletions
diff --git a/plugins/AnonymousPiwikUsageMeasurement b/plugins/AnonymousPiwikUsageMeasurement -Subproject 7b9fd79de3dc980a5c79385876a0d7f7af7aa60 +Subproject c546e11ede2e77adf1f5c25529eaadaa6473c16 diff --git a/plugins/CoreConsole/Commands/GeneratePlugin.php b/plugins/CoreConsole/Commands/GeneratePlugin.php index 45fa111d87..72ef852c81 100644 --- a/plugins/CoreConsole/Commands/GeneratePlugin.php +++ b/plugins/CoreConsole/Commands/GeneratePlugin.php @@ -52,7 +52,7 @@ class GeneratePlugin extends GeneratePluginBase 'ExampleTheme' => $pluginName, $exampleDescription => $description, '0.1.0' => $version, - 'PIWIK_VERSION' => Version::VERSION + '3.0.0-b1' => Version::VERSION ); $whitelistFiles = array(); @@ -63,7 +63,7 @@ class GeneratePlugin extends GeneratePluginBase 'ExamplePlugin' => $pluginName, $exampleDescription => $description, '0.1.0' => $version, - 'PIWIK_VERSION' => Version::VERSION + '3.0.0-b1' => Version::VERSION ); $whitelistFiles = array( '/ExamplePlugin.php', diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js index e3e6cf456f..9340c64f31 100644 --- a/plugins/CoreHome/javascripts/dataTable.js +++ b/plugins/CoreHome/javascripts/dataTable.js @@ -1673,29 +1673,40 @@ $.extend(DataTable.prototype, UIControl.prototype, { var tooltip = th.find('.columnDocumentation'); tooltip.next().hover(function () { - var left = (-1 * tooltip.outerWidth() / 2) + th.width() / 2; - var top = -1 * tooltip.outerHeight(); + var left = (-1 * tooltip.outerWidth() / 2) + th.width() / 2; + var top = -1 * tooltip.outerHeight(); - if (th.next().size() == 0) { - left = (-1 * tooltip.outerWidth()) + th.width() + - parseInt(th.css('padding-right'), 10); - } + var thPos = th.position(); + var thPosTop = 0; - if (th.offset().top + top < 0) { - top = th.outerHeight(); - } + if (thPos && thPos.top) { + thPosTop = thPosTop.top; + } - tooltip.css({ - marginLeft: left, - marginTop: top, - top: 0 - }); + // we need to add thPosTop because the parent th is not position:relative. There may be a gap for the + // headline + top = top + thPosTop; - tooltip.stop(true, true).fadeIn(250); - }, - function () { - $(this).prev().stop(true, true).fadeOut(400); + if (th.next().size() == 0) { + left = (-1 * tooltip.outerWidth()) + th.width() + + parseInt(th.css('padding-right'), 10); + } + + if (th.offset().top + top < 0) { + top = thPosTop + th.outerHeight(); + } + + tooltip.css({ + marginLeft: left, + marginTop: top, + top: 0 }); + + tooltip.stop(true, true).fadeIn(250); + }, + function () { + $(this).prev().stop(true, true).fadeOut(400); + }); }); }, diff --git a/plugins/CustomAlerts b/plugins/CustomAlerts -Subproject d239c89269841a2f31452c17c1782bd4a695bf3 +Subproject 530ef0355efd9bcaa92ffd15179b10d33ef9ffd diff --git a/plugins/CustomDimensions b/plugins/CustomDimensions -Subproject ecba4e4bb9eaf8196dd98316ace28a5a63db5b4 +Subproject 1c3305172f4360181e1377df03fe63069e63a40 diff --git a/plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_manage.png b/plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_manage.png Binary files differindex 3d7c2233e3..cc28bdaf04 100644 --- a/plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_manage.png +++ b/plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_manage.png diff --git a/plugins/ExamplePlugin/plugin.json b/plugins/ExamplePlugin/plugin.json index fa71469815..c784750dec 100644 --- a/plugins/ExamplePlugin/plugin.json +++ b/plugins/ExamplePlugin/plugin.json @@ -4,7 +4,7 @@ "description": "Piwik Platform showcase: how to create widgets, menus, scheduled tasks, a custom archiver, plugin tests, and a AngularJS component.", "theme": false, "require": { - "piwik": ">=PIWIK_VERSION,<3.0.0-b1" + "piwik": ">=3.0.0-b1,<4.0.0-b1" }, "authors": [ { diff --git a/plugins/ExampleTheme/plugin.json b/plugins/ExampleTheme/plugin.json index 92b17918ec..6e99da3910 100644 --- a/plugins/ExampleTheme/plugin.json +++ b/plugins/ExampleTheme/plugin.json @@ -4,7 +4,7 @@ "version": "0.1.0", "theme": true, "require": { - "piwik": ">=PIWIK_VERSION,<3.0.0-b1" + "piwik": ">=3.0.0-b1,<4.0.0-b1" }, "stylesheet": "stylesheets/theme.less", "homepage": "", diff --git a/plugins/Installation/ServerFilesGenerator.php b/plugins/Installation/ServerFilesGenerator.php index 19b7d8e903..91ada4e2ec 100644 --- a/plugins/Installation/ServerFilesGenerator.php +++ b/plugins/Installation/ServerFilesGenerator.php @@ -48,7 +48,7 @@ class ServerFilesGenerator "</IfModule>\n\n" . "# Allow to serve static files which are safe\n" . - "<Files ~ \"\\.(gif|ico|jpg|png|svg|js|css|htm|html|swf|mp3|mp4|wav|ogg|avi|ttf|eot|woff|woff2)$\">\n" . + "<Files ~ \"\\.(gif|ico|jpg|png|svg|js|css|htm|html|swf|mp3|mp4|wav|ogg|avi|ttf|eot|woff|woff2|json)$\">\n" . $allow . "\n" . "</Files>\n"; diff --git a/plugins/LogViewer b/plugins/LogViewer -Subproject e2b6cd803a59a47df17a4e33d614422fdc5cd77 +Subproject 5f4c3fdcf4a0f1a69699389edeaefb3d9198f10 diff --git a/plugins/LoginHttpAuth b/plugins/LoginHttpAuth -Subproject 06e16190bee3121a9b707d00e055f57e22da3f8 +Subproject f65b922a4219237dd5824cf607df43d825175e5 diff --git a/plugins/Morpheus/templates/genericForm.twig b/plugins/Morpheus/templates/genericForm.twig index 480740299b..a28ca4701b 100644 --- a/plugins/Morpheus/templates/genericForm.twig +++ b/plugins/Morpheus/templates/genericForm.twig @@ -34,5 +34,11 @@ {% endif %} {% endfor %} - {{ form_data.submit.html|raw }} + {% if form_data.submit.html %} + <div class="row"> + <div class="col s12"> + {{ form_data.submit.html|raw }} + </div> + </div> + {% endif %} </form> diff --git a/plugins/PiwikPro/Widgets/RssPiwikPro.php b/plugins/PiwikPro/Widgets/RssPiwikPro.php deleted file mode 100644 index 26e87f92be..0000000000 --- a/plugins/PiwikPro/Widgets/RssPiwikPro.php +++ /dev/null @@ -1,49 +0,0 @@ -<?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\PiwikPro\Widgets; - -use Piwik\Container\StaticContainer; -use Piwik\Piwik; -use Piwik\Widget\WidgetConfig; -use Piwik\Plugins\ExampleRssWidget\RssRenderer; - -class RssPiwikPro extends \Piwik\Widget\Widget -{ - public static function configure(WidgetConfig $config) - { - $config->setCategoryId('About Piwik'); - $config->setName('PiwikPro_WidgetBlogTitle'); - $config->setIsEnabled(StaticContainer::get('Piwik\PiwikPro\Advertising')->arePiwikProAdsEnabled()); - } - - public function render() - { - try { - $rss = new RssRenderer('https://piwik.pro/feed/'); - $rss->showDescription(true); - - return $rss->get(); - - } catch (\Exception $e) { - - return $this->error($e); - } - } - - /** - * @param \Exception $e - * @return string - */ - private function error($e) - { - return '<div class="pk-emptyDataTable">' - . Piwik::translate('General_ErrorRequest', array('', '')) - . ' - ' . $e->getMessage() . '</div>'; - } -} diff --git a/plugins/ProfessionalServices/Widgets.php b/plugins/ProfessionalServices/Widgets.php deleted file mode 100644 index b1abc5e7da..0000000000 --- a/plugins/ProfessionalServices/Widgets.php +++ /dev/null @@ -1,60 +0,0 @@ -<?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\ProfessionalServices; - -use Piwik\Piwik; -use Piwik\ProfessionalServices\Advertising; -use Piwik\Plugins\ExampleRssWidget\RssRenderer; -use Piwik\View; - -class Widgets extends \Piwik\Plugin\Widgets -{ - protected $category = 'About Piwik'; - - /** - * @var Advertising - */ - private $advertising; - - /** - * @var Promo - */ - private $promo; - - public function __construct(Advertising $advertising, Promo $promo) - { - $this->advertising = $advertising; - $this->promo = $promo; - } - - protected function init() - { - if ($this->advertising->areAdsForProfessionalServicesEnabled()) { - $this->addWidget('ProfessionalServices_WidgetProfessionalServicesForPiwik', 'promoServices'); - } - } - - public function rss() - { - return ''; - } - - public function promoServices() - { - $view = new View('@ProfessionalServices/promoServicesWidget'); - - $promo = $this->promo->getContent(); - - $view->ctaLinkUrl = $this->advertising->getPromoUrlForPiwikProUpgrade(); - $view->ctaText = $promo['text']; - $view->ctaLinkTitle = $this->promo->getLinkTitle(); - - return $view->render(); - } -} diff --git a/plugins/PiwikPro/Widgets/PromoPiwikPro.php b/plugins/ProfessionalServices/Widgets/PromoServices.php index a9203d417f..516d5860c6 100644 --- a/plugins/PiwikPro/Widgets/PromoPiwikPro.php +++ b/plugins/ProfessionalServices/Widgets/PromoServices.php @@ -6,16 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * */ -namespace Piwik\Plugins\PiwikPro\Widgets; +namespace Piwik\Plugins\ProfessionalServices\Widgets; use Piwik\Container\StaticContainer; -use Piwik\Piwik; -use Piwik\PiwikPro\Advertising; -use Piwik\Plugins\PiwikPro\Promo; +use Piwik\Plugins\ProfessionalServices\Promo; +use Piwik\ProfessionalServices\Advertising; use Piwik\View; use Piwik\Widget\WidgetConfig; -class PromoPiwikPro extends \Piwik\Widget\Widget +class PromoServices extends \Piwik\Widget\Widget { /** * @var Advertising @@ -36,17 +35,19 @@ class PromoPiwikPro extends \Piwik\Widget\Widget public static function configure(WidgetConfig $config) { $config->setCategoryId('About Piwik'); - $config->setName('PiwikPro_WidgetPiwikProAd'); - $config->setIsEnabled(StaticContainer::get('Piwik\PiwikPro\Advertising')->arePiwikProAdsEnabled()); + $config->setName('ProfessionalServices_WidgetProfessionalServicesForPiwik'); + + $advertising = StaticContainer::get('Piwik\ProfessionalServices\Advertising'); + $config->setIsEnabled($advertising->areAdsForProfessionalServicesEnabled()); } public function render() { - $view = new View('@PiwikPro/promoPiwikProWidget'); + $view = new View('@ProfessionalServices/promoServicesWidget'); $promo = $this->promo->getContent(); - $view->ctaLinkUrl = $this->advertising->getPromoUrlForOnPremises('PromoWidget', $promo['campaignContent']); + $view->ctaLinkUrl = $this->advertising->getPromoUrlForPiwikProUpgrade(); $view->ctaText = $promo['text']; $view->ctaLinkTitle = $this->promo->getLinkTitle(); diff --git a/plugins/ProfessionalServices/Widgets/Rss.php b/plugins/ProfessionalServices/Widgets/Rss.php new file mode 100644 index 0000000000..41d98f3dc8 --- /dev/null +++ b/plugins/ProfessionalServices/Widgets/Rss.php @@ -0,0 +1,25 @@ +<?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\ProfessionalServices\Widgets; + +use Piwik\Widget\WidgetConfig; + +class Rss extends \Piwik\Widget\Widget +{ + public static function configure(WidgetConfig $config) + { + $config->setCategoryId('About Piwik'); + $config->setIsEnabled(false); + } + + public function render() + { + return ''; + } +} diff --git a/plugins/QueuedTracking b/plugins/QueuedTracking -Subproject 73e54678385bb18850c3d2b453e77fcffa449d4 +Subproject 75c866d29389f2f939068efe3af923ec22bf620 diff --git a/plugins/SecurityInfo b/plugins/SecurityInfo -Subproject 8288bbf2e03ec5c6a1d0e279262b785d0ec9d14 +Subproject af890f1713d1a2c18a34966021cea81d2c0decd diff --git a/plugins/TasksTimetable b/plugins/TasksTimetable -Subproject db23b9d9ce2d5e9d9cf1d80c4a80ab8128c2358 +Subproject 173452dab9e7e504cf04d29a38704810f978628 diff --git a/plugins/TreemapVisualization b/plugins/TreemapVisualization -Subproject 22cc2992deb3429102a7ae09f90ae5172dced6b +Subproject 88e3a37febbd01c4f4c76f3554d3bbf772dd0ed diff --git a/plugins/UserId/Categories/VisitorsUserSubcategory.php b/plugins/UserId/Categories/VisitorsUserSubcategory.php new file mode 100644 index 0000000000..47d5657633 --- /dev/null +++ b/plugins/UserId/Categories/VisitorsUserSubcategory.php @@ -0,0 +1,19 @@ +<?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\UserId\Categories; + +use Piwik\Category\Subcategory; + +class VisitorsUserSubcategory extends Subcategory +{ + protected $categoryId = 'General_Visitors'; + protected $id = 'UserId_UserReportTitle'; + protected $order = 6; + +} diff --git a/plugins/VisitorGenerator b/plugins/VisitorGenerator -Subproject f4bb405511d44420558abe31fcc24f25a2bec42 +Subproject d602c3c412f5046e334e7a4e4b6a4cd84fbf4c2 |