mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
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:
parent
8cb4148657
commit
7e4617f7a6
12 changed files with 766 additions and 711 deletions
|
@ -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 ====================================================================
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue