navigation-dock MDL-22560 Major changes to he way the dock works

* Themes can now check if a region is completely docked
* Dock now delegates events to improve performance
* Dock now completely YUI3
* No longer uses YUI overlay instead has custom control
This commit is contained in:
Sam Hemelryk 2010-05-31 03:33:34 +00:00
parent 8cb4148657
commit 7e4617f7a6
12 changed files with 766 additions and 711 deletions

View file

@ -413,6 +413,26 @@ class block_manager {
$this->extracontent[$region][] = $bc;
}
/**
* Checks to see whether all of the blocks within the given region are docked
*
* @param string $region
* @return bool True if all of the blocks within that region are docked
*/
public function region_completely_docked($region, $output) {
if (!$this->page->theme->enable_dock) {
return false;
}
$this->check_is_loaded();
$this->ensure_content_created($region, $output);
foreach($this->visibleblockcontent[$region] as $instance) {
if (!empty($instance->content) && !get_user_preferences('docked_block_instance_'.$instance->blockinstanceid, 0)) {
return false;
}
}
return true;
}
/// Actions ====================================================================
/**