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
50
www/analytics/plugins/CorePluginsAdmin/javascripts/marketplace.js
Executable file
50
www/analytics/plugins/CorePluginsAdmin/javascripts/marketplace.js
Executable file
|
|
@ -0,0 +1,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'
|
||||
});
|
||||
|
||||
$('a.plugin-details[data-pluginName]').on('click', 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');
|
||||
});
|
||||
|
||||
});
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
/*!
|
||||
* Piwik - Web Analytics
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*/
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
function syncMaxHeight (selector) {
|
||||
|
||||
if (!selector) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $nodes = $(selector);
|
||||
|
||||
if (!$nodes) {
|
||||
return;
|
||||
}
|
||||
|
||||
var max = {};
|
||||
$nodes.each(function (index, node) {
|
||||
var $node = $(node);
|
||||
var top = $node.position().top;
|
||||
|
||||
var height = $node.height();
|
||||
|
||||
if (!max[top]) {
|
||||
max[top] = height;
|
||||
} else if (max[top] < height) {
|
||||
max[top] = height;
|
||||
} else {
|
||||
$node.height(max[top] + 'px');
|
||||
}
|
||||
});
|
||||
|
||||
$nodes.each(function (index, node) {
|
||||
var $node = $(node);
|
||||
var top = $node.position().top;
|
||||
|
||||
$node.height(max[top] + 'px');
|
||||
});
|
||||
}
|
||||
|
||||
syncMaxHeight('.pluginslist .plugin');
|
||||
syncMaxHeight('.themeslist .plugin');
|
||||
|
||||
$('.pluginslist, #plugins, .themeslist').on('click', '[data-pluginName]', function (event) {
|
||||
if ($(event.target).hasClass('install') || $(event.target).hasClass('uninstall')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var pluginName = $(this).attr('data-pluginName');
|
||||
|
||||
if (!pluginName) {
|
||||
return;
|
||||
}
|
||||
|
||||
var activeTab = $(event.target).attr('data-activePluginTab');
|
||||
if (activeTab) {
|
||||
pluginName += '!' + activeTab;
|
||||
}
|
||||
|
||||
broadcast.propagateNewPopoverParameter('browsePluginDetail', pluginName);
|
||||
});
|
||||
|
||||
var showPopover = 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');
|
||||
};
|
||||
|
||||
broadcast.addPopoverHandler('browsePluginDetail', showPopover);
|
||||
|
||||
});
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* Piwik - 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
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
$(document).ready(function () {
|
||||
|
||||
$('.extendPlatform .uploadPlugin').click(function (event) {
|
||||
$('.uploadPlugin').click(function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
piwikHelper.modalConfirm('#installPluginByUpload', {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* Piwik - 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
|
||||
|
|
@ -34,4 +34,12 @@ $(document).ready(function () {
|
|||
});
|
||||
});
|
||||
|
||||
$('.plugin-donation-link').click(function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var overlayId = $(this).data('overlay-id');
|
||||
|
||||
piwikHelper.modalConfirm('#'+overlayId, {});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* Piwik - 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue