mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-65539 dragdrop: Allow sections and blocks to move to the top
Before this change sections and blocks could not be moved to be the top item when using keyboard drag and drop. They can now be moved to the top in one action. The way they move using keyboard drag and drop has changed when they are below the item they are dropped on, not instead of appearing below it they will be placed above it.
This commit is contained in:
parent
472c953093
commit
b08323a789
@ -48,6 +48,8 @@ Y.extend(DRAGSECTION, M.core.dragdrop, {
|
||||
this.groups = [CSS.SECTIONDRAGGABLE];
|
||||
this.samenodeclass = M.course.format.get_sectionwrapperclass();
|
||||
this.parentnodeclass = M.course.format.get_containerclass();
|
||||
// Detect the direction of travel.
|
||||
this.detectkeyboarddirection = true;
|
||||
|
||||
// Check if we are in single section mode
|
||||
if (Y.Node.one('.' + CSS.JUMPMENU)) {
|
||||
|
File diff suppressed because one or more lines are too long
@ -48,6 +48,8 @@ Y.extend(DRAGSECTION, M.core.dragdrop, {
|
||||
this.groups = [CSS.SECTIONDRAGGABLE];
|
||||
this.samenodeclass = M.course.format.get_sectionwrapperclass();
|
||||
this.parentnodeclass = M.course.format.get_containerclass();
|
||||
// Detect the direction of travel.
|
||||
this.detectkeyboarddirection = true;
|
||||
|
||||
// Check if we are in single section mode
|
||||
if (Y.Node.one('.' + CSS.JUMPMENU)) {
|
||||
|
2
course/yui/src/dragdrop/js/section.js
vendored
2
course/yui/src/dragdrop/js/section.js
vendored
@ -16,6 +16,8 @@ Y.extend(DRAGSECTION, M.core.dragdrop, {
|
||||
this.groups = [CSS.SECTIONDRAGGABLE];
|
||||
this.samenodeclass = M.course.format.get_sectionwrapperclass();
|
||||
this.parentnodeclass = M.course.format.get_containerclass();
|
||||
// Detect the direction of travel.
|
||||
this.detectkeyboarddirection = true;
|
||||
|
||||
// Check if we are in single section mode
|
||||
if (Y.Node.one('.' + CSS.JUMPMENU)) {
|
||||
|
@ -458,6 +458,8 @@ MANAGER.prototype = {
|
||||
this.groups = ['block'];
|
||||
this.samenodeclass = CSS.BLOCK;
|
||||
this.parentnodeclass = CSS.BLOCKREGION;
|
||||
// Detect the direction of travel.
|
||||
this.detectkeyboarddirection = true;
|
||||
|
||||
// Add relevant classes and ID to 'content' block region on Dashboard page.
|
||||
var myhomecontent = Y.Node.all('body#' + CSS.MYINDEX + ' #' + CSS.REGIONMAIN + ' > .' + CSS.REGIONCONTENT);
|
||||
|
File diff suppressed because one or more lines are too long
@ -454,6 +454,8 @@ MANAGER.prototype = {
|
||||
this.groups = ['block'];
|
||||
this.samenodeclass = CSS.BLOCK;
|
||||
this.parentnodeclass = CSS.BLOCKREGION;
|
||||
// Detect the direction of travel.
|
||||
this.detectkeyboarddirection = true;
|
||||
|
||||
// Add relevant classes and ID to 'content' block region on Dashboard page.
|
||||
var myhomecontent = Y.Node.all('body#' + CSS.MYINDEX + ' #' + CSS.REGIONMAIN + ' > .' + CSS.REGIONCONTENT);
|
||||
|
2
lib/yui/src/blocks/js/manager.js
vendored
2
lib/yui/src/blocks/js/manager.js
vendored
@ -66,6 +66,8 @@ MANAGER.prototype = {
|
||||
this.groups = ['block'];
|
||||
this.samenodeclass = CSS.BLOCK;
|
||||
this.parentnodeclass = CSS.BLOCKREGION;
|
||||
// Detect the direction of travel.
|
||||
this.detectkeyboarddirection = true;
|
||||
|
||||
// Add relevant classes and ID to 'content' block region on Dashboard page.
|
||||
var myhomecontent = Y.Node.all('body#' + CSS.MYINDEX + ' #' + CSS.REGIONMAIN + ' > .' + CSS.REGIONCONTENT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user