MDL-33926 Add window scrolling when drag/dropping
authorAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Fri, 22 Jun 2012 07:11:06 +0000 (08:11 +0100)
committerAparup Banerjee <aparup@moodle.com>
Mon, 25 Jun 2012 07:27:46 +0000 (15:27 +0800)
course/yui/dragdrop/dragdrop.js
lib/yui/blocks/blocks.js

index 2b492ad..435b355 100644 (file)
@@ -91,7 +91,7 @@ YUI.add('moodle-course-dragdrop', function(Y) {
                             // Keep it inside the .course-content
                             constrain: '#'+CSS.PAGECONTENT,
                             stickY: true
-                        });
+                        }).plug(Y.Plugin.DDWinScroll);
                     }
                 }
             }, this);
@@ -306,7 +306,7 @@ YUI.add('moodle-course-dragdrop', function(Y) {
                     }).plug(Y.Plugin.DDConstrained, {
                         // Keep it inside the .course-content
                         constrain: '#'+CSS.PAGECONTENT
-                    });
+                    }).plug(Y.Plugin.DDWinScroll);
                 }
             }, this);
         },
@@ -411,4 +411,4 @@ YUI.add('moodle-course-dragdrop', function(Y) {
     M.course.init_section_dragdrop = function(params) {
         new DRAGSECTION(params);
     }
-}, '@VERSION@', {requires:['base', 'node', 'io', 'dom', 'dd', 'moodle-core-dragdrop', 'moodle-enrol-notification', 'moodle-course-coursebase']});
+}, '@VERSION@', {requires:['base', 'node', 'io', 'dom', 'dd', 'dd-scroll', 'moodle-core-dragdrop', 'moodle-enrol-notification', 'moodle-course-coursebase']});
index 8555f32..21cc5f1 100644 (file)
@@ -87,7 +87,7 @@ YUI.add('moodle-core-blocks', function(Y) {
                         }).plug(Y.Plugin.DDConstrained, {
                             // Keep it inside the .course-content
                             constrain: '#'+CSS.PAGECONTENT
-                        });
+                        }).plug(Y.Plugin.DDWinScroll);
                     }
                 }, this);
             }, this);
@@ -267,5 +267,5 @@ YUI.add('moodle-core-blocks', function(Y) {
     M.core_blocks.init_dragdrop = function(params) {
         new DRAGBLOCK(params);
     }
-}, '@VERSION@', {requires:['base', 'node', 'io', 'dom', 'dd', 'moodle-core-dragdrop', 'moodle-enrol-notification']});
+}, '@VERSION@', {requires:['base', 'node', 'io', 'dom', 'dd', 'dd-scroll', 'moodle-core-dragdrop', 'moodle-enrol-notification']});