diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2022-03-28 01:23:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-28 01:23:27 +0300 |
commit | 212a3346a0ca3441b63f20d361ad4c9369661114 (patch) | |
tree | adfdfb2ceb27964d8984d13fbcdf55ef4e7df759 /plugins/CoreHome/javascripts/broadcast.js | |
parent | 4110b2edadf6c40421a8767ffaa3d567f332c2b4 (diff) |
[Vue] migrate PiwikMarketplaceController, piwik-marketplace directive and piwik-plugin-name directive (#18966)
* start migration
* finish migrating license key
* get UI test to pass locally
* remove angularjs file
* remove todo
* migrate PiwikMarketplaceController to vue
* apply review feedback
* unfinished commit
* migrate piwik-plugin-name directive, add types for dotdotdot, remove use of $location in broadcast.updatePopoverParamValue, add ability to reference vue directives in twig (for migrating twig code in the future)
* remove directive use
* try to fix random failure
* remove file from plugin php
* fix url update
* fix more URL changing issues. allow "query" to be obtained from GET as well as POST params so marketplace reporting page does not have to redirect to admin page when searching
* reapply vue directives to dotdotdot
Diffstat (limited to 'plugins/CoreHome/javascripts/broadcast.js')
-rw-r--r-- | plugins/CoreHome/javascripts/broadcast.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js index fe3b262b32..44ace8fe19 100644 --- a/plugins/CoreHome/javascripts/broadcast.js +++ b/plugins/CoreHome/javascripts/broadcast.js @@ -504,8 +504,6 @@ var broadcast = { * handler. */ propagateNewPopoverParameter: function (handlerName, value) { - var $location = angular.element(document).injector().get('$location'); - var popover = ''; if (handlerName && '' != value && 'undefined' != typeof value) { popover = handlerName + ':' + value; @@ -524,15 +522,10 @@ var broadcast = { } } - var $window = piwikHelper.getAngularDependency('$window'); - var urlStr = $window.location.hash; - urlStr = broadcast.updateParamValue('popover=' + encodeURIComponent(popover), urlStr); - urlStr = urlStr.replace(/^[#?]+/, ''); - $location.search(urlStr); - - setTimeout(function () { - angular.element(document).injector().get('$rootScope').$apply(); - }, 1); + var MatomoUrl = window.CoreHome.MatomoUrl; + MatomoUrl.updateHash( + Object.assign({}, MatomoUrl.hashParsed.value, { popover }), + ); }, /** |