From 1ca16a9b593ea9f720cdd2adecc81ecf55077c33 Mon Sep 17 00:00:00 2001 From: Andrew Robert Nicols Date: Tue, 27 Nov 2012 14:51:05 +0000 Subject: [PATCH] MDL-36752 Be more specific about tooltip selectors --- lib/javascript-static.js | 2 +- lib/outputrenderers.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/javascript-static.js b/lib/javascript-static.js index be66be91657cf..1233a288416f5 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -1425,7 +1425,7 @@ M.util.help_icon = { return; } this.Y = Y; - Y.one('body').delegate('click', this.display, 'span.helplink a', this); + Y.one('body').delegate('click', this.display, 'span.helplink a.tooltip', this); this.initialised = true; }, add : function(Y, properties) { diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 7159bb867a305..85816b16f3822 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1803,7 +1803,7 @@ protected function render_help_icon(help_icon $helpicon) { // note: this title is displayed only if JS is disabled, otherwise the link will have the new ajax tooltip $title = get_string('helpprefix2', '', trim($title, ". \t")); - $attributes = array('href'=>$url, 'title'=>$title, 'aria-haspopup' => 'true'); + $attributes = array('href'=>$url, 'title'=>$title, 'aria-haspopup' => 'true', 'class' => 'tooltip'); $output = html_writer::tag('a', $output, $attributes); $this->page->requires->js_init_call('M.util.help_icon.setup');