diff options
Diffstat (limited to 'plugins/CoreHome/javascripts/popover.js')
-rw-r--r-- | plugins/CoreHome/javascripts/popover.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/CoreHome/javascripts/popover.js b/plugins/CoreHome/javascripts/popover.js index bdde52e0d8..e1a303931e 100644 --- a/plugins/CoreHome/javascripts/popover.js +++ b/plugins/CoreHome/javascripts/popover.js @@ -227,8 +227,9 @@ var Piwik_Popover = (function () { * @param {string} url * @param {string} loadingName * @param {string} [dialogClass] css class to add to dialog + * @param {object} [ajaxRequest] optional instance of ajaxHelper */ - createPopupAndLoadUrl: function (url, loadingName, dialogClass) { + createPopupAndLoadUrl: function (url, loadingName, dialogClass, ajaxRequest) { // make sure the minimum top position of the popover is 15px var ensureMinimumTop = function () { var popoverContainer = $('#Piwik_Popover').parent(); @@ -254,11 +255,14 @@ var Piwik_Popover = (function () { setPopoverTitleIfOneFoundInContainer(); ensureMinimumTop(); }; - var ajaxRequest = new ajaxHelper(); + + if ('undefined' === typeof ajaxRequest) { + ajaxRequest = new ajaxHelper(); + } ajaxRequest.addParams(piwikHelper.getArrayFromQueryString(url), 'get'); ajaxRequest.setCallback(callback); ajaxRequest.setFormat('html'); ajaxRequest.send(false); } }; -})();
\ No newline at end of file +})(); |