summaryrefslogtreecommitdiffstats
path: root/schemas/OMNA Schema-based Namespace Registry_fichiers/Overlay.js
blob: 4bdb30671ff31db1ab935ada0e6c4415e4bddce5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
if (typeof window.RadControlsNamespace == "undefined")
{
	window.RadControlsNamespace = {};
}

if (
	typeof(window.RadControlsNamespace.Overlay) == "undefined" ||
	typeof(window.RadControlsNamespace.Overlay.Version) == null ||
	window.RadControlsNamespace.Overlay.Version < 1.1
	)
{	
	window.RadControlsNamespace.Overlay = function (element)
	{
		
		if (!this.SupportsOverlay())
		{
			return;
		}

		this.Element = element;

		this.Shim = document.createElement("IFRAME");
		this.Shim.src="javascript:'';";
		this.Element.parentNode.insertBefore(this.Shim, this.Element);

		if (element.style.zIndex > 0)
		{
			this.Shim.style.zIndex = element.style.zIndex - 1;
		}
		this.Shim.style.position = "absolute";	
		this.Shim.style.border = "0px";	
		this.Shim.frameBorder = 0;
		this.Shim.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
		this.Shim.disabled = "disabled";
	}

	window.RadControlsNamespace.Overlay.Version = 1.1;// update in the header IF also

	RadControlsNamespace.Overlay.prototype.SupportsOverlay = function()
	{
		return (RadControlsNamespace.Browser.IsIE);
	}

	RadControlsNamespace.Overlay.prototype.Update = function ()
	{
		if (!this.SupportsOverlay())
		{
			return;
		}
		
		this.Shim.style.top = this.ToUnit(this.Element.style.top);
		this.Shim.style.left = this.ToUnit(this.Element.style.left);
		this.Shim.style.width = this.Element.offsetWidth + "px";
		this.Shim.style.height = this.Element.offsetHeight + "px";	
		
	//	this.Shim.style.border = "0px solid red";
	}

	RadControlsNamespace.Overlay.prototype.ToUnit = function (value)
	{
		if (!value) return "0px";
		return parseInt(value) + "px";
	}

	RadControlsNamespace.Overlay.prototype.Dispose = function ()
	{
		if (!this.SupportsOverlay())
		{
			return;
		}
				
		if (this.Shim.parentNode)
		{
			this.Shim.parentNode.removeChild(this.Shim);
		}
		
		this.Element = null;
		this.Shim = null;
		
	}
}

//BEGIN_ATLAS_NOTIFY
if (typeof(Sys) != "undefined")
{
	if (Sys.Application != null && Sys.Application.notifyScriptLoaded != null)
	{
		Sys.Application.notifyScriptLoaded();
	}
}
//END_ATLAS_NOTIFY
OpenPOWER on IntegriCloud