From a0aef397f8518cc9641749fe8ea4f3befe284e37 Mon Sep 17 00:00:00 2001 From: Joseph Inhofer Date: Mon, 14 Dec 2015 16:17:13 -0600 Subject: [PATCH] MDL-52507 enrol/manual: Generated a smart zIndex --- enrol/manual/yui/quickenrolment/quickenrolment.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/enrol/manual/yui/quickenrolment/quickenrolment.js b/enrol/manual/yui/quickenrolment/quickenrolment.js index f3de1bfdfc6..f2adb9983d0 100644 --- a/enrol/manual/yui/quickenrolment/quickenrolment.js +++ b/enrol/manual/yui/quickenrolment/quickenrolment.js @@ -291,6 +291,13 @@ YUI.add('moodle-enrol_manual-quickenrolment', function(Y) { y = parseInt(base.get('winHeight'))*0.1; } base.setXY([x,y]); + var zindex = 0; + Y.all('.moodle-has-zindex').each(function() { + if (parseInt(this.getComputedStyle('zIndex'), 10) > zindex) { + zindex = parseInt(this.getComputedStyle('zIndex'), 10); + } + }); + base.setStyle('zIndex', zindex + 1); if (this.get(UEP.USERS)===null) { this.search(e, false);