From 73dd2ee2d5c2f9506b9d653455fcc093e03fded3 Mon Sep 17 00:00:00 2001 From: Jason Fowler Date: Fri, 7 Dec 2012 11:32:21 +0800 Subject: [PATCH] MDL-35833 - Blocks - Adding alt and title attributes to the docked-block panel close button --- blocks/dock.js | 2 +- lang/en/block.php | 2 ++ lib/outputrequirementslib.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/blocks/dock.js b/blocks/dock.js index 73249e9f4f301..46c047932e194 100644 --- a/blocks/dock.js +++ b/blocks/dock.js @@ -936,7 +936,7 @@ M.core_dock.genericblock.prototype = { }, this); // Add a close icon // Must set the image src seperatly of we get an error with XML strict headers - var closeicon = Y.Node.create(''); + var closeicon = Y.Node.create(''+M.str.block.hidepanel+''); closeicon.one('img').setAttribute('src', M.util.image_url('t/dockclose', 'moodle')); closeicon.on('forceclose|click', this.hide, this); closeicon.on('dock:actionkey',this.hide, this, {actions:{enter:true,toggle:true}}); diff --git a/lang/en/block.php b/lang/en/block.php index a685f0ef0e6aa..d662bebfb77b9 100644 --- a/lang/en/block.php +++ b/lang/en/block.php @@ -39,6 +39,8 @@ $string['defaultweight_help'] = 'The default weight allows you to choose roughly where you want the block to appear in the chosen region, either at the top or the bottom. The final location is calculated from all the blocks in that region (for example, only one block can actually be at the top). This value can be overridden on specific pages if required.'; $string['deletecheck'] = 'Delete {$a} block?'; $string['deleteblockcheck'] = 'Are you sure that you want to delete this block titled {$a}?'; +$string['hidedockpanel'] = 'Hide the dock panel'; +$string['hidepanel'] = 'Hide panel'; $string['moveblockhere'] = 'Move block here'; $string['movingthisblockcancel'] = 'Moving this block ({$a})'; $string['onthispage'] = 'On this page'; diff --git a/lib/outputrequirementslib.php b/lib/outputrequirementslib.php index c57b5d0452101..d4eff1ccc2a60 100644 --- a/lib/outputrequirementslib.php +++ b/lib/outputrequirementslib.php @@ -407,7 +407,7 @@ protected function find_module($component) { $module = array('name' => 'core_dock', 'fullpath' => '/blocks/dock.js', 'requires' => array('base', 'node', 'event-custom', 'event-mouseenter', 'event-resize'), - 'strings' => array(array('addtodock', 'block'),array('undockitem', 'block'),array('undockall', 'block'),array('thisdirectionvertical', 'langconfig'))); + 'strings' => array(array('addtodock', 'block'),array('undockitem', 'block'),array('undockall', 'block'),array('thisdirectionvertical', 'langconfig'),array('hidedockpanel', 'block'),array('hidepanel', 'block'))); break; case 'core_message': $module = array('name' => 'core_message',