From 0064cb9a923cdd660a78f100d28f6715b0522efa Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Thu, 27 Apr 2017 09:23:06 +1200 Subject: Fix propagateNewPage does not work when no URL parameters are set (#11652) to reproduce eg go to https://www.example.com and then execute this method. It would generate a URL like https://www.example.com/module=Foo&action=bar --- plugins/CoreHome/javascripts/broadcast.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins/CoreHome') diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js index 7117a0fb69..d279598039 100644 --- a/plugins/CoreHome/javascripts/broadcast.js +++ b/plugins/CoreHome/javascripts/broadcast.js @@ -304,6 +304,11 @@ var broadcast = { // available in global scope var currentSearchStr = window.location.search; var currentHashStr = broadcast.getHashFromUrl(); + + if (!currentSearchStr) { + currentSearchStr = '?'; + } + var oldUrl = currentSearchStr + currentHashStr; for (var i = 0; i < params_vals.length; i++) { -- cgit v1.2.3 From abd2e525cbfcd39b9520b675163de372f769c660 Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Mon, 8 May 2017 12:18:07 +0200 Subject: Add plugin upload link to plugin admin (#11630) * Add plugin upload link to plugin admin * update screenshot * Remove line break so the intro text is in one paragraph * move duplicate js into new angular directive * UI test --- plugins/CoreHome/CoreHome.php | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/CoreHome') diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php index 7a221bc7db..fd3e729f74 100644 --- a/plugins/CoreHome/CoreHome.php +++ b/plugins/CoreHome/CoreHome.php @@ -241,6 +241,7 @@ class CoreHome extends \Piwik\Plugin $jsFiles[] = "plugins/CorePluginsAdmin/angularjs/save-button/save-button.directive.js"; $jsFiles[] = "plugins/CorePluginsAdmin/angularjs/plugins/plugin-filter.directive.js"; $jsFiles[] = "plugins/CorePluginsAdmin/angularjs/plugins/plugin-management.directive.js"; + $jsFiles[] = "plugins/CorePluginsAdmin/angularjs/plugins/plugin-upload.directive.js"; $jsFiles[] = "plugins/CoreHome/javascripts/iframeResizer.min.js"; } -- cgit v1.2.3 From defc5469a5d4634d64023477a447a31c58812a12 Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Tue, 9 May 2017 09:55:15 +0200 Subject: Prevent removing page content when opening rowaction in widgetize mode (#11644) * prevent removing page content when opening rowaction in widgetize mode * adds test to show rowevolution in widgetized dashboard * init only in widgetize mode * fix ui test * fix ui test --- plugins/CoreHome/javascripts/broadcast.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'plugins/CoreHome') diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js index d279598039..a58868261f 100644 --- a/plugins/CoreHome/javascripts/broadcast.js +++ b/plugins/CoreHome/javascripts/broadcast.js @@ -92,6 +92,7 @@ var broadcast = { hash = (''+hash).substr(1); } + if (hash) { if (/^popover=/.test(hash)) { @@ -124,7 +125,7 @@ var broadcast = { popoverParamUpdated = (popoverParam != ''); } - if (pageUrlUpdated || broadcast.forceReload) { + if (!broadcast.isWidgetizedDashboard() && (pageUrlUpdated || broadcast.forceReload)) { Piwik_Popover.close(); if (hashUrl != broadcast.currentHashUrl || broadcast.forceReload) { @@ -159,10 +160,16 @@ var broadcast = { } else { // start page Piwik_Popover.close(); - $('.pageWrap #content:not(.admin)').empty(); + if (!broadcast.isWidgetizedDashboard()) { + $('.pageWrap #content:not(.admin)').empty(); + } } }, + isWidgetizedDashboard: function() { + return broadcast.getValueFromUrl('module') == 'Widgetize' && broadcast.getValueFromUrl('moduleToWidgetize') == 'Dashboard'; + }, + /** * Returns if the current page is the login page * @return {boolean} @@ -425,7 +432,9 @@ var broadcast = { */ propagateNewPopoverParameter: function (handlerName, value) { // init broadcast if not already done (it is required to make popovers work in widgetize mode) - //broadcast.init(true); + if (broadcast.isWidgetizedDashboard()) { + broadcast.init(true); + } var $location = angular.element(document).injector().get('$location'); -- cgit v1.2.3