blob: c7bb2b596936c46168be05352e7ae9c569efe563 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
<?php
/**
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\Widgetize;
class Widgetize extends \Piwik\Plugin
{
/**
* @see \Piwik\Plugin::registerEvents
*/
public function registerEvents()
{
return array(
'AssetManager.getJavaScriptFiles' => 'getJsFiles',
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
);
}
public function getJsFiles(&$jsFiles)
{
$jsFiles[] = "node_modules/jquery.scrollto/jquery.scrollTo.min.js";
$jsFiles[] = "plugins/Morpheus/javascripts/piwikHelper.js";
$jsFiles[] = "plugins/CoreHome/javascripts/dataTable.js";
$jsFiles[] = "plugins/Dashboard/javascripts/widgetMenu.js";
}
public function getStylesheetFiles(&$stylesheets)
{
$stylesheets[] = "plugins/Widgetize/stylesheets/widgetize.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/coreHome.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/dataTable.less";
$stylesheets[] = "plugins/CoreHome/stylesheets/cloud.less";
$stylesheets[] = "plugins/Dashboard/stylesheets/dashboard.less";
}
public function getClientSideTranslationKeys(&$translations)
{
$translations[] = 'Widgetize_OpenInNewWindow';
$translations[] = 'Dashboard_LoadingWidget';
$translations[] = 'Widgetize_TooHighAccessLevel';
$translations[] = 'Widgetize_SelectAReport';
$translations[] = 'Widgetize_Reports';
$translations[] = 'Widgetize_Intro';
$translations[] = 'Widgetize_DisplayDashboardInIframe';
$translations[] = 'Widgetize_DisplayDashboardInIframeAllSites';
$translations[] = 'Widgetize_ViewableAnonymously';
$translations[] = 'Widgetize_EmbedIframe';
$translations[] = 'Widgetize_DirectLink';
}
}
|