From 03bd9e7b7818491ed808e4aff95e2ed9c6cd0ad1 Mon Sep 17 00:00:00 2001 From: Andrew Robert Nicols Date: Fri, 15 Feb 2013 22:45:49 +0000 Subject: [PATCH 1/2] MDL-34300 JavaScript: Stop YUI from forcing z-index on moodle-core-notification --- lib/yui/notification/notification.js | 4 ++++ theme/base/style/core.css | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/yui/notification/notification.js b/lib/yui/notification/notification.js index 83d4f4ee454..f7f300060bb 100644 --- a/lib/yui/notification/notification.js +++ b/lib/yui/notification/notification.js @@ -77,6 +77,10 @@ Y.extend(DIALOGUE, Y.Panel, { this.after('visibleChange', this.visibilityChanged, this); this.render(); this.show(); + + // Workaround upstream YUI bug http://yuilibrary.com/projects/yui3/ticket/2532507 + // and allow setting of z-index in theme. + this.get('boundingBox').setStyle('zIndex', null); }, visibilityChanged : function(e) { var titlebar; diff --git a/theme/base/style/core.css b/theme/base/style/core.css index b55c3ccc799..8d176449218 100644 --- a/theme/base/style/core.css +++ b/theme/base/style/core.css @@ -864,7 +864,7 @@ sup {vertical-align: super;} background: none; border: none; /* Override the z-index set incorrectly by the YUI dialogue */ - z-index: 600!important; + z-index: 600; } From 1015b24b422fbb297167dab162c34e8b1adf9040 Mon Sep 17 00:00:00 2001 From: Andrew Robert Nicols Date: Fri, 15 Feb 2013 22:56:57 +0000 Subject: [PATCH 2/2] MDL-38067 JavaScript: Ensure the filemanager does not show through the tooltip --- lib/yui/tooltip/tooltip.js | 7 +++++-- theme/base/style/core.css | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/yui/tooltip/tooltip.js b/lib/yui/tooltip/tooltip.js index e2680e5d1bb..a735caadf2c 100644 --- a/lib/yui/tooltip/tooltip.js +++ b/lib/yui/tooltip/tooltip.js @@ -251,8 +251,7 @@ YUI.add('moodle-core-tooltip', function(Y) { this.setAttrs({ headerContent: this.get('initialheadertext'), bodyContent: this.get('initialbodytext'), - footerContent: this.get('initialfootertext'), - zIndex: 150 + footerContent: this.get('initialfootertext') }); // Hide and then render the dialogue. @@ -262,6 +261,10 @@ YUI.add('moodle-core-tooltip', function(Y) { // Hook into a few useful areas. this.bb = this.get('boundingBox'); + // Add an additional class to the boundingbox to allow tooltip-specific style to be + // set. + this.bb.addClass('moodle-dialogue-tooltip'); + // Change the alignment if this is an RTL language. if (right_to_left()) { this.alignpoints = [ diff --git a/theme/base/style/core.css b/theme/base/style/core.css index 8d176449218..6d50030aca2 100644 --- a/theme/base/style/core.css +++ b/theme/base/style/core.css @@ -1020,7 +1020,9 @@ sup {vertical-align: super;} .moodle-dialogue .tooltiptext { max-height: 300px; } - +.moodle-dialogue-base .moodle-dialogue.moodle-dialogue-tooltip { + z-index: 3001; +} /* Question Bank - Question Chooser "Close" button */ #page-question-edit.dir-rtl a.container-close {right:auto;left:6px;}