no colored borders for group index

This commit is contained in:
Daniel 2014-05-15 12:35:28 +02:00
commit 2e4f09542c
3471 changed files with 597976 additions and 0 deletions

View file

@ -0,0 +1,88 @@
/*!
* 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);
});

View file

@ -0,0 +1,31 @@
/*!
* Piwik - Web Analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
$(document).ready(function () {
$('.extendPlatform .uploadPlugin').click(function (event) {
event.preventDefault();
piwikHelper.modalConfirm('#installPluginByUpload', {
yes: function () {
window.location = link;
}
});
});
$('#uploadPluginForm').submit(function (event) {
var $zipFile = $('[name=pluginZip]');
var fileName = $zipFile.val();
if (!fileName || '.zip' != fileName.slice(-4)) {
event.preventDefault();
alert(_pk_translate('CorePluginsAdmin_NoZipFileSelected'));
}
});
});

View file

@ -0,0 +1,37 @@
/*!
* Piwik - Web Analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
$(document).ready(function () {
var uninstallConfirmMessage = '';
$('#plugins .uninstall').click(function (event) {
event.preventDefault();
var link = $(this).attr('href');
var pluginName = $(this).attr('data-pluginName');
if (!link || !pluginName) {
return;
}
if (!uninstallConfirmMessage) {
uninstallConfirmMessage = $('#uninstallPluginConfirm').text();
}
var messageToDisplay = uninstallConfirmMessage.replace('%s', pluginName);
$('#uninstallPluginConfirm').text(messageToDisplay);
piwikHelper.modalConfirm('#confirmUninstallPlugin', {
yes: function () {
window.location = link;
}
});
});
});

View file

@ -0,0 +1,93 @@
/*!
* Piwik - Web Analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
$(document).ready(function () {
updateAllNumbersOfMatchingPluginsInFilter();
function filterPlugins()
{
var filterOrigin = getCurrentFilterOrigin();
var filterStatus = getCurrentFilterStatus();
var $nodesToEnable = getMatchingNodes(filterOrigin, filterStatus);
$('#plugins tr[data-filter-origin][data-filter-status]').css('display', 'none');
$nodesToEnable.css('display', 'table-row');
updateAllNumbersOfMatchingPluginsInFilter();
}
function updateAllNumbersOfMatchingPluginsInFilter()
{
var filterOrigin = getCurrentFilterOrigin();
var filterStatus = getCurrentFilterStatus();
updateNumberOfMatchingPluginsInFilter('[data-filter-status="all"]', filterOrigin, 'all');
updateNumberOfMatchingPluginsInFilter('[data-filter-status="active"]', filterOrigin, 'active');
updateNumberOfMatchingPluginsInFilter('[data-filter-status="inactive"]', filterOrigin, 'inactive');
updateNumberOfMatchingPluginsInFilter('[data-filter-origin="all"]', 'all', filterStatus);
updateNumberOfMatchingPluginsInFilter('[data-filter-origin="core"]', 'core', filterStatus);
updateNumberOfMatchingPluginsInFilter('[data-filter-origin="noncore"]', 'noncore', filterStatus);
}
function updateNumberOfMatchingPluginsInFilter(selectorFilterToUpdate, filterOrigin, filterStatus)
{
var numMatchingNodes = getMatchingNodes(filterOrigin, filterStatus).length;
var updatedCounterText = ' (' + numMatchingNodes + ')';
$('.pluginsFilter ' + selectorFilterToUpdate + ' .counter').text(updatedCounterText);
}
function getCurrentFilterOrigin()
{
return $('.pluginsFilter .origin a.active').data('filter-origin');
}
function getCurrentFilterStatus()
{
return $('.pluginsFilter .status a.active').data('filter-status');
}
function getMatchingNodes(filterOrigin, filterStatus)
{
var query = '#plugins tr';
if ('all' == filterOrigin) {
query += '[data-filter-origin]';
} else {
query += '[data-filter-origin=' + filterOrigin + ']';
}
if ('all' == filterStatus) {
query += '[data-filter-status]';
} else {
query += '[data-filter-status=' + filterStatus + ']';
}
return $(query);
}
$('.pluginsFilter .status').on('click', 'a', function (event) {
event.preventDefault();
$(this).siblings().removeClass('active');
$(this).addClass('active');
filterPlugins();
});
$('.pluginsFilter .origin').on('click', 'a', function (event) {
event.preventDefault();
$(this).siblings().removeClass('active');
$(this).addClass('active');
filterPlugins();
});
});