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 <benaka@piwik.pro>2015-05-09 10:46:01 +0300
committerdiosmosis <benaka@piwik.pro>2015-05-13 08:23:42 +0300
commita53ae704fecf5fb8c991b8f52275c7327429515f (patch)
tree64a870e4b75f3cf1531c747b6959504e49718a49 /plugins/CoreHome/javascripts/broadcast.js
parentd3d43cd105870d3aacaa70547e7ce607b669060b (diff)
Refs #7798, proof of concept fix for history plugin's scroll to top issue. Fix involves using angular service that uses the singleton instead of jquery's history plugin. Can remove the history plugin after this change.
Diffstat (limited to 'plugins/CoreHome/javascripts/broadcast.js')
-rw-r--r--plugins/CoreHome/javascripts/broadcast.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js
index aaad2bd708..5ada120a6b 100644
--- a/plugins/CoreHome/javascripts/broadcast.js
+++ b/plugins/CoreHome/javascripts/broadcast.js
@@ -54,9 +54,9 @@ var broadcast = {
}
broadcast._isInit = true;
- // Initialize history plugin.
- // The callback is called at once by present location.hash
- $.history.init(broadcast.pageload, {unescape: true});
+ angular.element(document).injector().invoke(function (historyService) {
+ historyService.init();
+ });
if(noLoadingMessage != true) {
piwikHelper.showAjaxLoading();
@@ -222,7 +222,9 @@ var broadcast = {
else {
// Let history know about this new Hash and load it.
broadcast.forceReload = true;
- $.history.load(currentHashStr);
+ angular.element(document).injector().invoke(function (historyService) {
+ historyService.load(currentHashStr);
+ });
}
},
@@ -378,7 +380,9 @@ var broadcast = {
}
broadcast.forceReload = false;
- $.history.load(newHash);
+ angular.element(document).injector().invoke(function (historyService) {
+ historyService.load(newHash);
+ });
},
/**