Skip to content
Extraits de code Groupes Projets
Valider 64d2351e rédigé par sgiehl's avatar sgiehl
Parcourir les fichiers

fixes #3671 update url hash when switching dashboard

git-svn-id: http://dev.piwik.org/svn/trunk@7752 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 3694c60d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -47,6 +47,11 @@ var broadcast = { ...@@ -47,6 +47,11 @@ var broadcast = {
*/ */
forceReload: false, forceReload: false,
/**
* Suppress content update on hash changing
*/
updateHashOnly: false,
/** /**
* Initializes broadcast object * Initializes broadcast object
* @return {void} * @return {void}
...@@ -82,6 +87,12 @@ var broadcast = { ...@@ -82,6 +87,12 @@ var broadcast = {
// Unbind any previously attached resize handlers // Unbind any previously attached resize handlers
$(window).off('resize'); $(window).off('resize');
// do not update content if it should be suppressed
if (broadcast.updateHashOnly) {
broadcast.updateHashOnly = false;
return;
}
// hash doesn't contain the first # character. // hash doesn't contain the first # character.
if( hash ) { if( hash ) {
......
...@@ -91,6 +91,8 @@ ...@@ -91,6 +91,8 @@
dashboardLayout = null; dashboardLayout = null;
dashboardId = dashboardIdToLoad; dashboardId = dashboardIdToLoad;
piwikHelper.showAjaxLoading(); piwikHelper.showAjaxLoading();
broadcast.updateHashOnly = true;
broadcast.propagateAjax('?idDashboard='+dashboardIdToLoad);
fetchLayout(generateLayout); fetchLayout(generateLayout);
buildMenu(); buildMenu();
return this; return this;
......
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