Browse Source

Fixed calendar using backwards compatibility hack in global scope

MOODLE_23_STABLE
Artem Andreev 12 years ago
parent
commit
4c5094d279
  1. 5
      calendar.js
  2. 2
      renderer.php

5
calendar.js

@ -1,3 +1,6 @@
YUI().use('yui2-container', 'yui2-calendar', function(Y) {
var YAHOO = Y.YUI2;
document.body.className += ' yui-skin-sam';
YAHOO.util.Event.onDOMReady(function(){
@ -94,3 +97,5 @@ YAHOO.util.Event.onDOMReady(function(){
dialog.show();
});
});
});

2
renderer.php

@ -106,8 +106,6 @@ class mod_attforblock_renderer extends plugin_renderer_base {
'cal_cur_date' => $fcontrols->curdate);
$curdate_controls = html_writer::script(js_writer::set_variable('M.attforblock', $jsvals));
//$this->page->requires->yui2_lib('container');
//$this->page->requires->yui2_lib('calendar');
$this->page->requires->js('/mod/attforblock/calendar.js');
$curdate_controls .= html_writer::link($fcontrols->url(array('curdate' => $fcontrols->prevcur)), $this->output->larrow());

Loading…
Cancel
Save