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:
authordiosmosis <diosmosis@users.noreply.github.com>2018-07-27 00:27:18 +0300
committerGitHub <noreply@github.com>2018-07-27 00:27:18 +0300
commit70d1b446778909b3beda16ff4dc50fdd968d63ea (patch)
tree742ad8383621817a8b9ac2c19ba7b804d49d3912 /plugins/Morpheus
parent35bd641d69235420f69da986d77437af700a6164 (diff)
Couple more period selector related improvements (#12326)
* Changing semantics of piwik.currentDateString, making it always the value of date query param instead of that or the first date str in a range period. * Use site timezone in getting todays date client side. * For slightly smoother rendering, override jquery UI event handler in date-picker directive. * Just to be comprehensive, handle yesterdaySameTime client side as well. * Simplify additions based on existing code & reuse in scheduled reports.
Diffstat (limited to 'plugins/Morpheus')
-rw-r--r--plugins/Morpheus/javascripts/ajaxHelper.js5
-rw-r--r--plugins/Morpheus/templates/_jsGlobalVariables.twig1
2 files changed, 2 insertions, 4 deletions
diff --git a/plugins/Morpheus/javascripts/ajaxHelper.js b/plugins/Morpheus/javascripts/ajaxHelper.js
index 5360a35326..5f8f171321 100644
--- a/plugins/Morpheus/javascripts/ajaxHelper.js
+++ b/plugins/Morpheus/javascripts/ajaxHelper.js
@@ -549,10 +549,7 @@ function ajaxHelper() {
// handle default date & period if not already set
if (this._useGETDefaultParameter('date') && !params.date && !this.postParams.date) {
- params.date = piwik.currentDateString || broadcast.getValueFromUrl('date');
- if (params.period == 'range' && piwik.currentDateString) {
- params.date = piwik.startDateString + ',' + params.date;
- }
+ params.date = piwik.currentDateString;
}
return params;
diff --git a/plugins/Morpheus/templates/_jsGlobalVariables.twig b/plugins/Morpheus/templates/_jsGlobalVariables.twig
index f4aca47580..95e4742f60 100644
--- a/plugins/Morpheus/templates/_jsGlobalVariables.twig
+++ b/plugins/Morpheus/templates/_jsGlobalVariables.twig
@@ -3,6 +3,7 @@
piwik.token_auth = "{{ token_auth }}";
piwik.piwik_url = "{{ piwikUrl }}";
piwik.cacheBuster = "{{ cacheBuster }}";
+ {% if timezoneOffset is defined %}piwik.timezoneOffset = {{ timezoneOffset }};{% endif %}
piwik.numbers = {
patternNumber: "{{ 'Intl_NumberFormatNumber'|translate }}",