navigation MDL-21503 Dock cleanup in preperation of removing global Y

This commit is contained in:
Sam Hemelryk
2010-02-04 06:51:57 +00:00
parent 7f4e9ef9a4
commit 87bf352d75
2 changed files with 24 additions and 7 deletions
+1 -2
View File
@@ -578,7 +578,6 @@ class block_base {
function get_required_javascript() {
$this->_initialise_dock();
if ($this->instance_can_be_docked()) {
$this->page->requires->js('/blocks/dock.js');
$this->page->requires->js_object_init(null, 'M.blocks.genericblock', array($this->instance->id), array('blocks_dock'));
user_preference_allow_ajax_update('docked_block_instance_'.$this->instance->id, PARAM_INT);
}
@@ -753,7 +752,7 @@ class block_base {
public function _initialise_dock() {
global $CFG;
if (!self::$dockinitialised) {
$this->page->requires->js_module(array('name'=>'blocks_dock', 'fullpath'=>'/blocks/dock.js', 'requires'=>array('base','dom','io','node', 'event-custom')));
$this->page->requires->js_module(array('name'=>'blocks_dock', 'fullpath'=>'/blocks/dock.js', 'requires'=>array('dom','io','node', 'event-custom', 'cookie')));
$this->page->requires->strings_for_js(array('addtodock','undockitem','undockall'), 'block');
self::$dockinitialised = true;
}