Skip to content

Commit

Permalink
Merge branch 'MDL-30829-master' of git://github.com/FMCorz/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Sep 11, 2012
2 parents 223285a + 20b12d5 commit 1d26f4a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions blocks/dock.js
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,12 @@ M.core_dock.genericblock.prototype = {
return;
}

// Disable the skip anchor when docking
var skipanchor = node.previous();
if (skipanchor.hasClass('skip-block')) {
skipanchor.hide();
}

var blockclass = (function(classes){
var r = /(^|\s)(block_[a-zA-Z0-9_]+)(\s|$)/;
var m = r.exec(classes);
Expand Down Expand Up @@ -937,6 +943,12 @@ M.core_dock.genericblock.prototype = {
return_to_block : function(dockitem) {
var placeholder = this.Y.one('#content_placeholder_'+this.id);

// Enable the skip anchor when going back to block mode
var skipanchor = placeholder.previous();
if (skipanchor.hasClass('skip-block')) {
skipanchor.show();
}

if (this.cachedcontentnode.one('.header')) {
this.cachedcontentnode.one('.header').insert(dockitem.contents, 'after');
} else {
Expand Down

0 comments on commit 1d26f4a

Please sign in to comment.