12 Commits

Author SHA1 Message Date
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Frederic Massart
ad606e6514 MDL-47450 blocks: Blocks can be moved on the site profile 2015-08-07 15:08:47 +08:00
Valerii Kuznetsov
13b5a4942f MDL-48968 blocks: fixed bug with pagetype handling 2015-01-26 09:28:42 +13:00
Sam Hemelryk
292dcf047f MDL-41551 blocks: added tracking and recognition of custom block regions 2014-04-06 15:17:47 +12:00
Sam Hemelryk
8496ddd7c6 MDL-43714 blocks: fixed coding style of ajax/blocks.php 2014-01-17 10:50:18 +13:00
Sam Hemelryk
efd556f77b MDL-43714 blocks: fixed notice when moving to an empty region 2014-01-17 10:45:23 +13:00
Paul Nicholls
606554d5b0 MDL-32652 - Make block drag-drop work throughout Moodle
The central "content" region on My Home / user profile pages also needs to
be initialised in lib/ajax/blocks.php in order to allow blocks to be
dropped into that region successfully.  Some tweaks were also necessary in
order to correct the "content" region's structure in order for drag-drop
to function on this region on these pages.

Non-standard block regions (including the central "content" region
used by My Home and user profile pages) were causing the temporary empty
block region used as a drop target to sometimes appear in the wrong place.

The call to init_requirements_data (which includes the block drag-drop JS)
happens at a late enough stage in page generation that we can simply
pass the context ID through to the JS, so that it can be sent as part of
the AJAX request.  This prevents lib/ajax/blocks.php from having to try
to guess the context from the other bits of information it receives, so
block drag-drop should now work everywhere without issues.
2013-01-29 14:57:28 +13:00
Dan Poltawski
dec70f2599 Revert "MDL-32652 - Make block drag-drop work throughout Moodle"
This reverts commit d7c29c22572314680350ccdcf801f188aca541e4.
2013-01-25 11:52:15 +08:00
Paul Nicholls
d7c29c2257 MDL-32652 - Make block drag-drop work throughout Moodle
Other than shifting the initialisation from course/lib.php to
lib/outputrequirementslib.php, some workarounds/tweaks were required
in order to make it work correctly on admin pages and My Home.
2013-01-15 14:55:31 +13:00
Mark Nielsen
e893c6d442 MDL-36607: Improve block drag and drop
* Adding support for subpage
* Adding support for regions that do not start with "side-"
2012-12-10 14:12:57 +13:00
Dan Poltawski
70b36b488b MDL-31263 lib/ajax/blocks.php fix nonsensical url 2012-04-26 11:03:05 +08:00
Ruslan Kabalin
5683815612 MDL-31263 Rewrite block drag/drop using YUI3 2012-04-24 13:25:43 +08:00