Completed
Last Updated: 07 Jun 2021 12:50 by ADMIN
ADMIN
Ianko
Created on: 30 Oct 2013 15:15
Category: Window
Type: Bug Report
0
Add an overlay iframe to the modal background, so that a YouTube movie embedded into the page will be hidden behind it
The problem with adding such an overlay is that it cannot be transparent, or it will not work. If it is added, the content of the main page will be invisible behind a modal popup. It can be implemented via an additional property (that will default to false) should the effect be acceptable to the developer. Add a vote and/or a comment in favor or against such an option.

A possible solution is setting the visibility CSS attribute of the embedded elements to hidden with a JavaScript function attached to the OnClientBeforeShow event of the RadWindow, and reverting it to its initial value with the OnClientClose hander. To ease these elements' collection they are going to use the shouldBeDisabled CSS class for this example:

function OnClientBeforeShow(sender, args) {
	if (sender.isModal())
	{
		var elements = $telerik.$(".shouldBeDisabled");
		var arrLength = elements.length;
		var element;

		for (var i = 0; i < arrLength; i+=1) {
			element = elements[i];
			element.style.visibility = "hidden";
		}
	}
}

function OnClientClose(sender, args) {
	if (sender.isModal()) {
		var elements = $telerik.$(".shouldBeDisabled");
		var arrLength = elements.length;
		var element;

		for (var i = 0; i < arrLength; i += 1) {
			element = elements[i];
			element.style.visibility = "initial";
		}
	}
}
1 comment
ADMIN
Rumen
Posted on: 07 Jun 2021 12:50

The item is set for completed since nowadays Youtube uses the Video tag which does not overlay the RadWindow modal popup.