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-09-22 06:45:36 +0300
committerdiosmosis <benaka@piwik.pro>2015-09-22 06:45:36 +0300
commit6486e800031d26287c79460746b3fd70d1efe6c9 (patch)
treef9deb068b9470509748d432b8fb9e743ff09f3c9 /plugins/Overlay/javascripts/Piwik_Overlay.js
parent73f72ebd2c471a395ee5bc86e98b0b4ba1007fbd (diff)
Fixing more overlay UI tests.
Diffstat (limited to 'plugins/Overlay/javascripts/Piwik_Overlay.js')
-rw-r--r--plugins/Overlay/javascripts/Piwik_Overlay.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/Overlay/javascripts/Piwik_Overlay.js b/plugins/Overlay/javascripts/Piwik_Overlay.js
index fe5d42dcb3..4c78080806 100644
--- a/plugins/Overlay/javascripts/Piwik_Overlay.js
+++ b/plugins/Overlay/javascripts/Piwik_Overlay.js
@@ -111,14 +111,19 @@ var Piwik_Overlay = (function () {
$fullScreenLink.show();
}
- /** $.history callback for hash change */
- function hashChangeCallback(urlHash) {
+ function getOverlayLocationFromHash(urlHash) {
var location = broadcast.getParamValue('l', urlHash);
// angular will encode the value again since it is added as the fragment path, not the fragment query parameter,
// so we have to decode it again after getParamValue
location = decodeURIComponent(location);
+ return location;
+ }
+
+ /** $.history callback for hash change */
+ function hashChangeCallback(urlHash) {
+ var location = getOverlayLocationFromHash(urlHash);
location = Overlay_Helper.decodeFrameUrl(location);
if (!updateComesFromInsideFrame) {
@@ -248,7 +253,7 @@ var Piwik_Overlay = (function () {
var locationParts = location.href.split('#');
var currentLocation = '';
if (locationParts.length > 1) {
- currentLocation = broadcast.getParamValue('l', locationParts[1]);
+ currentLocation = getOverlayLocationFromHash(locationParts[1]);
}
var newLocation = Overlay_Helper.encodeFrameUrl(currentUrl);