blob: 64cb5087abca96797f67b23744da60b3ccfe265d (
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
|
/*!
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
$(document).ready(function () {
// Keeps the plugin descriptions the same height
$('.marketplace .plugin .description').dotdotdot({
after: 'a.more',
watch: 'window'
});
$('.marketplace').on('click', '.plugin-details', function (event) {
event.preventDefault();
var pluginName = $(this).attr('data-pluginName');
if (!pluginName) {
return;
}
var activeTab = $(this).attr('data-activePluginTab');
if (activeTab) {
pluginName += '!' + activeTab;
}
broadcast.propagateNewPopoverParameter('browsePluginDetail', pluginName);
});
broadcast.addPopoverHandler('browsePluginDetail', function (value) {
var pluginName = value;
var activeTab = null;
if (-1 !== value.indexOf('!')) {
activeTab = value.substr(value.indexOf('!') + 1);
pluginName = value.substr(0, value.indexOf('!'));
}
var url = 'module=CorePluginsAdmin&action=pluginDetails&pluginName=' + encodeURIComponent(pluginName);
if (activeTab) {
url += '&activeTab=' + encodeURIComponent(activeTab);
}
Piwik_Popover.createPopupAndLoadUrl(url, 'details');
});
});
|