6 Commits

Author SHA1 Message Date
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