diff options
author | BeezyT <timo@ezdesign.de> | 2012-10-12 14:25:37 +0400 |
---|---|---|
committer | BeezyT <timo@ezdesign.de> | 2012-10-12 14:25:37 +0400 |
commit | 3f79e5c1f1abf633ca196a33e48032e45d94cd3f (patch) | |
tree | a51f114e49be42c3de83f1e4d47fcf9f780bfa4c /plugins | |
parent | e86440397b9d263de4b5a302e73b785f241a936f (diff) |
refs #3332 Transitions help button linking to doc page
git-svn-id: http://dev.piwik.org/svn/trunk@7165 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CoreHome/templates/popover.js | 16 | ||||
-rw-r--r-- | plugins/Transitions/templates/transitions.js | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/plugins/CoreHome/templates/popover.js b/plugins/CoreHome/templates/popover.js index 73789adb9c..dacf309a7f 100644 --- a/plugins/CoreHome/templates/popover.js +++ b/plugins/CoreHome/templates/popover.js @@ -99,6 +99,22 @@ var Piwik_Popover = (function() { return container; }, + + /** Add a help button to the current popover */ + addHelpButton: function(helpUrl) { + if (!isOpen) { + return false; + } + + var titlebar = container.parent().find('.ui-dialog-titlebar'); + + var button = $(document.createElement('a')).addClass('ui-dialog-titlebar-help'); + button.attr({href: helpUrl, target: '_blank'}); + + titlebar.append(button); + + //alert(titlebar.find('.ui-dialog-titlebar-close').outerWidth()); + }, /** Set inner HTML of the popover */ setContent: function(html) { diff --git a/plugins/Transitions/templates/transitions.js b/plugins/Transitions/templates/transitions.js index 6a743b29cf..73de609757 100644 --- a/plugins/Transitions/templates/transitions.js +++ b/plugins/Transitions/templates/transitions.js @@ -144,6 +144,7 @@ Piwik_Transitions.prototype.showPopover = function() { var self = this; this.popover = Piwik_Popover.showLoading('Transitions', self.actionName, 550); + Piwik_Popover.addHelpButton('http://piwik.org/docs/transitions'); var bothLoaded = function() { Piwik_Popover.setContent(Piwik_Transitions.popoverHtml); |