Skip to content
Extraits de code Groupes Projets
Valider bbe352fc rédigé par Matthieu Aubry's avatar Matthieu Aubry
Parcourir les fichiers

Merge pull request #9398 from piwik/load_reportbydimension_notaswidget

Do not load a report by dimension as a widget so it remembers last used report settings
parents 401489f1 791b1822
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -149,7 +149,9 @@
var widgetUniqueId = widgetParams.module + widgetParams.action;
currentWidgetLoading = widgetUniqueId;
widgetsHelper.loadWidgetAjax(widgetUniqueId, widgetParams, function (response) {
var ajaxRequest = new ajaxHelper();
ajaxRequest.addParams(widgetParams, 'get');
ajaxRequest.setCallback(function (response) {
// if the widget that was loaded was not for the latest clicked link, do nothing w/ the response
if (widgetUniqueId != currentWidgetLoading) {
return;
......@@ -160,7 +162,8 @@
// scroll to report
piwikHelper.lazyScrollTo(report, 400);
}, function (deferred, status) {
});
ajaxRequest.setErrorCallback(function (deferred, status) {
if (status == 'abort' || !deferred || deferred.status < 400 || deferred.status >= 600) {
return;
}
......@@ -174,6 +177,8 @@
report.css('display', 'inline-block').html('<div class="dimensionLoadingError">' + errorMessage + '</div>');
});
ajaxRequest.setFormat('html');
ajaxRequest.send(false);
});
});
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter