MDL-21240 adding new level to requirements manager, now the function calls and events have access to "Y."

This commit is contained in:
Petr Skoda 2010-01-19 22:01:12 +00:00
parent 8f29813160
commit d96d8f03b4
2 changed files with 28 additions and 26 deletions

View file

@ -76,7 +76,7 @@ class renderer_base {
* @return void
*/
public function add_action_handler($id, component_action $action) {
$this->page->requires->event_handler($id, $action->event, $action->jsfunction, $action->jsfunctionargs);
$this->page->requires->event_handler("#$id", $action->event, $action->jsfunction, $action->jsfunctionargs);
}
/**
@ -140,7 +140,7 @@ class renderer_base {
if (!empty($actions) && is_array($actions) && $actions[0] instanceof component_action) {
foreach ($actions as $action) {
if (!empty($action->jsfunction)) {
$this->page->requires->event_handler($component->id, $action->event, $action->jsfunction, $action->jsfunctionargs);
$this->page->requires->event_handler("#$component->id", $action->event, $action->jsfunction, $action->jsfunctionargs);
}
}
}