diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2019-11-18 11:56:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-18 11:56:28 +0300 |
commit | 65415140ebf9b9a0d0b7d34d922cee60c6e2f886 (patch) | |
tree | 75faf9eee32d01b65ffd96f87fcc220afc30df50 /plugins/Overlay/javascripts/Piwik_Overlay.js | |
parent | 21b49c1358cccc2ca92133be17021083d75f98ee (diff) |
Disable range select until overlay is fully loaded. (#15162)
* Disable range select until overlay is fully loaded.
* If iframe origin cannot be parsed, do not throw.
Diffstat (limited to 'plugins/Overlay/javascripts/Piwik_Overlay.js')
-rw-r--r-- | plugins/Overlay/javascripts/Piwik_Overlay.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Overlay/javascripts/Piwik_Overlay.js b/plugins/Overlay/javascripts/Piwik_Overlay.js index 897bbbd394..05211a05ef 100644 --- a/plugins/Overlay/javascripts/Piwik_Overlay.js +++ b/plugins/Overlay/javascripts/Piwik_Overlay.js @@ -122,6 +122,7 @@ var Piwik_Overlay = (function () { /** Hide the loading message */ function hideLoading() { $loading.hide(); + $('#overlayDateRangeSelect').prop('disabled', false).material_select(); } function getOverlaySegment(url) { @@ -145,7 +146,8 @@ var Piwik_Overlay = (function () { } function setIframeOrigin(location) { - iframeOrigin = location.match(ORIGIN_PARSE_REGEX)[0]; + var m = location.match(ORIGIN_PARSE_REGEX); + iframeOrigin = m ? m[0] : null; // unset iframe origin if it is not one of the site URLs var validSiteOrigins = Piwik_Overlay.siteUrls.map(function (url) { |