Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTassoman <tassoman@gmail.com>2015-11-27 10:57:51 +0300
committerTassoman <tassoman@gmail.com>2015-11-27 10:57:51 +0300
commitfeec4d55bcb97b2b5f5d58578fa88c7bcc619333 (patch)
treeaa0ab71eb8454c359fcfa589b342a402e2b5f5a1 /plugins
parent4b28debc773131512a633965ab85ea96ba0de095 (diff)
parentd54ddc8b9f4d19bb8b4c69dd02776e3766211261 (diff)
Merge branch 'master' of github.com:piwik/piwik into i9148_user_menu
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreHome/CoreHome.php1
-rw-r--r--plugins/CoreHome/javascripts/dataTable.js17
2 files changed, 13 insertions, 5 deletions
diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php
index 7cf82cfd3b..ba0f3edd82 100644
--- a/plugins/CoreHome/CoreHome.php
+++ b/plugins/CoreHome/CoreHome.php
@@ -252,6 +252,7 @@ class CoreHome extends \Piwik\Plugin
$translationKeys[] = 'Intl_Day_Min_StandAlone_6';
$translationKeys[] = 'Intl_Day_Min_StandAlone_7';
$translationKeys[] = 'General_And';
+ $translationKeys[] = 'General_All';
$translationKeys[] = 'General_Search';
$translationKeys[] = 'General_Clear';
$translationKeys[] = 'General_MoreDetails';
diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js
index 0232d91ec6..56837809fc 100644
--- a/plugins/CoreHome/javascripts/dataTable.js
+++ b/plugins/CoreHome/javascripts/dataTable.js
@@ -506,13 +506,20 @@ $.extend(DataTable.prototype, UIControl.prototype, {
};
}
+ function getFilterLimitAsString(limit) {
+ if (limit == '-1') {
+ return _pk_translate('General_All').toLowerCase();
+ }
+ return limit;
+ }
+
// setup limit control
- $('.limitSelection', domElem).append('<div><span>' + self.param[limitParamName] + '</span></div><ul></ul>');
+ $('.limitSelection', domElem).append('<div><span value="'+ self.param[limitParamName] +'">' + getFilterLimitAsString(self.param[limitParamName]) + '</span></div><ul></ul>');
if (self.props.show_limit_control) {
$('.limitSelection ul', domElem).hide();
for (var i = 0; i < numbers.length; i++) {
- $('.limitSelection ul', domElem).append('<li value="' + numbers[i] + '"><span>' + numbers[i] + '</span></li>');
+ $('.limitSelection ul', domElem).append('<li value="' + numbers[i] + '"><span>' + getFilterLimitAsString(numbers[i]) + '</span></li>');
}
$('.limitSelection ul li:last', domElem).addClass('last');
@@ -535,12 +542,12 @@ $.extend(DataTable.prototype, UIControl.prototype, {
$('.limitSelection', domElem).is('.visible') ? hide() : show();
});
$('.limitSelection ul li', domElem).on('click', function (event) {
- var limit = parseInt($(event.target).text());
+ var limit = parseInt($(event.target).closest('li').attr('value'));
hide();
if (limit != self.param[limitParamName]) {
setLimitValue(self.param, limit);
- $('.limitSelection>div>span', domElem).text(limit);
+ $('.limitSelection>div>span', domElem).text( getFilterLimitAsString(limit)).attr('value', limit);
self.reloadAjaxDataTable();
var data = {};
@@ -1045,7 +1052,7 @@ $.extend(DataTable.prototype, UIControl.prototype, {
$(this).attr('href', function () {
var url = $(this).attr('href') + '&token_auth=' + piwik.token_auth;
- var limit = $('.limitSelection>div>span', domElem).text();
+ var limit = $('.limitSelection>div>span', domElem).attr('value');
var defaultLimit = $(this).attr('filter_limit');
if (!limit || 'undefined' === limit || defaultLimit == -1) {
limit = defaultLimit;