MDL-36752 Be more specific about tooltip selectors

This commit is contained in:
Andrew Robert Nicols
2012-11-27 14:45:47 +00:00
parent e002d5e435
commit c44a8dfed5
2 changed files with 2 additions and 2 deletions

View File

@@ -1478,7 +1478,7 @@ M.util.help_icon = {
return; return;
} }
this.Y = Y; 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; this.initialised = true;
}, },
add : function(Y, properties) { add : function(Y, properties) {

View File

@@ -1959,7 +1959,7 @@ class core_renderer extends renderer_base {
// note: this title is displayed only if JS is disabled, otherwise the link will have the new ajax tooltip // 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")); $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); $output = html_writer::tag('a', $output, $attributes);
$this->page->requires->js_init_call('M.util.help_icon.setup'); $this->page->requires->js_init_call('M.util.help_icon.setup');