Browse Source

Fixed calendar using backwards compatibility hack in global scope

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

9
calendar.js

@ -1,6 +1,9 @@
document.body.className += ' yui-skin-sam'; YUI().use('yui2-container', 'yui2-calendar', function(Y) {
var YAHOO = Y.YUI2;
YAHOO.util.Event.onDOMReady(function(){ document.body.className += ' yui-skin-sam';
YAHOO.util.Event.onDOMReady(function(){
var Event = YAHOO.util.Event, var Event = YAHOO.util.Event,
Dom = YAHOO.util.Dom, Dom = YAHOO.util.Dom,
@ -93,4 +96,6 @@ YAHOO.util.Event.onDOMReady(function(){
dialog.show(); dialog.show();
}); });
});
}); });

2
renderer.php

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

Loading…
Cancel
Save