navigation MDL-25317 Fixed scroll issue and ajax expansion bug within the navigation JS
This commit is contained in:
@@ -627,6 +627,7 @@ M.core_dock.resize = function() {
|
||||
var titletop = item.nodes.docktitle.getY()-docky-buffer;
|
||||
var containery = this.nodes.container.getY();
|
||||
var containerheight = containery-docky+this.nodes.buttons.get('offsetHeight');
|
||||
var scrolltop = panel.contentBody.get('scrollTop');
|
||||
panel.contentBody.setStyle('height', 'auto');
|
||||
panel.removeClass('oversized_content');
|
||||
var panelheight = panel.get('offsetHeight');
|
||||
@@ -643,6 +644,10 @@ M.core_dock.resize = function() {
|
||||
} else {
|
||||
panel.setTop(titletop-containerheight+buffer);
|
||||
}
|
||||
|
||||
if (scrolltop) {
|
||||
panel.contentBody.set('scrollTop', scrolltop);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.cfg.position=='right') {
|
||||
|
||||
@@ -138,7 +138,11 @@ M.block_navigation.classes.tree = function(Y, id, properties) {
|
||||
*/
|
||||
M.block_navigation.classes.tree.prototype.init_load_ajax = function(e, branch) {
|
||||
e.stopPropagation();
|
||||
if (e.target.get('nodeName').toUpperCase() != 'P') {
|
||||
var target = e.target;
|
||||
if (target.test('span')) {
|
||||
target = target.ancestor('p');
|
||||
}
|
||||
if (!target || !target.test('p')) {
|
||||
return true;
|
||||
}
|
||||
var cfginstance = '', Y = this.Y;
|
||||
@@ -150,11 +154,11 @@ M.block_navigation.classes.tree.prototype.init_load_ajax = function(e, branch) {
|
||||
data:'elementid='+branch.id+'&id='+branch.branchid+'&type='+branch.type+'&sesskey='+M.cfg.sesskey+cfginstance,
|
||||
on: {
|
||||
complete:this.load_ajax,
|
||||
success:function() {Y.detach('click', this.init_load_ajax, e.target);}
|
||||
success:function() {Y.detach('click', this.init_load_ajax, target);}
|
||||
},
|
||||
context:this,
|
||||
arguments:{
|
||||
target:e.target
|
||||
target:target
|
||||
}
|
||||
});
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user