summaryrefslogtreecommitdiffstats
path: root/schemas/OMNA Schema-based Namespace Registry_fichiers/Display.js
blob: 6c389cf6b00433a88cfe69bd53e428ab5f154319 (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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
var numdivs=3

var IE5=NN4=NN6=false
if(document.all)IE5=true
else if(document.layers)NN4=true
else if(document.getElementById)NN6=true


function copyParentStylesToEditor(editor)
{
  var theIFrame = document.getElementById("RadEContentIframe" + editor.Id);
  var theMainEditorTable = document.getElementById("RadEWrapper" + editor.Id);

  var theParentEl = theMainEditorTable.parentNode.parentNode;
  var theContentArea = editor.GetContentArea();
  if (document.all)
  {
      for (var attr in theParentEl.currentStyle)
      {
          var strStyle = "" + attr;
          // Style Overflow don't be change otherwise Scroll dispear in Raeditor in Big document
          if ( ( strStyle  != "overflow" ) && ( strStyle  != "overflowX" ) && ( strStyle  != "overflowY" ) )
             {
                theContentArea.style[attr] = theParentEl.currentStyle[attr]; 
             }     
      }
  }
  else //Firefox
  {
 
    theContentArea.style.background = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("background");
    theContentArea.style.backgroundAttachment = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("background-attachment");
    theContentArea.style.backgroundColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("background-color");
    theContentArea.style.backgroundImage = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("background-image");
    theContentArea.style.backgroundPosition = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("background-position");
    theContentArea.style.backgroundRepeat = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("background-repeat");
    theContentArea.style.border = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border");
    theContentArea.style.borderBottom = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-bottom");
    theContentArea.style.borderBottomColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-bottom-color");
    theContentArea.style.borderBottomStyle = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-bottom-style");
    theContentArea.style.borderBottomWidth = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-bottom-width");
    theContentArea.style.borderColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-color");
    theContentArea.style.borderLeft = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-left");
    theContentArea.style.borderLeftColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-left-color");
    theContentArea.style.borderLeftStyle = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-left-style");
    theContentArea.style.borderLeftWidth = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-left-width");
    theContentArea.style.borderRight = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-right");
    theContentArea.style.borderRightColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-right-color");
    theContentArea.style.borderRightStyle = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-right-style");
    theContentArea.style.borderRightWidth = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-right-width");
    theContentArea.style.borderStyle = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-style");
    theContentArea.style.borderTop = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-top");
    theContentArea.style.borderTopColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-top-color");
    theContentArea.style.borderTopStyle = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-top-style");
    theContentArea.style.borderTopWidth = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-top-width");
    theContentArea.style.borderWidth = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("border-width");
    theContentArea.style.captionSide = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("caption-side");
    theContentArea.style.clear = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("clear");
    theContentArea.style.clip = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("clip");
    theContentArea.style.color = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("color");
    theContentArea.style.cursor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("cursor");
    theContentArea.style.direction = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("direction");
    theContentArea.style.display = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("display");
    theContentArea.style.emptyCells = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("empty-cells");
    theContentArea.style.float = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("float");
    theContentArea.style.font = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("font");
    theContentArea.style.fontFamily = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("font-family");
    theContentArea.style.fontSize = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("font-size");
    theContentArea.style.fontStretch = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("font-stretch");
    theContentArea.style.fontStyle = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("font-style");
    theContentArea.style.fontVariant = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("font-variant");
    theContentArea.style.fontWeight = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("font-weight");
    theContentArea.style.height = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("height");
    theContentArea.style.left = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("left");
    theContentArea.style.letterSpacing = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("letter-spacing");
    theContentArea.style.lineHeight = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("line-height");
    theContentArea.style.listStyle = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("list-style");
    theContentArea.style.listStyleImage = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("list-style-image");
    theContentArea.style.listStylePosition = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("list-style-position");
    theContentArea.style.listStyleType = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("list-style-type");
    theContentArea.style.margin = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("margin");
    theContentArea.style.marginBottom = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("margin-bottom");
    theContentArea.style.marginLeft = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("margin-left");
    theContentArea.style.marginRight = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("margin-right");
    theContentArea.style.marginTop = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("margin-top");
    theContentArea.style.maxHeight = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("max-height");
    theContentArea.style.maxWidth = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("max-width");
    theContentArea.style.minHeight = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("min-height");
    theContentArea.style.minWidth = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("min-width");
    // Style Overflow don't be change otherwise Scroll dispear in Raeditor in Big document
    //theContentArea.style.overflow = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("overflow");
    theContentArea.style.padding = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("padding");
    theContentArea.style.paddingBottom = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("padding-bottom");
    theContentArea.style.paddingLeft = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("padding-left");
    theContentArea.style.paddingRight = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("padding-right");
    theContentArea.style.paddingTop = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("padding-top");
    theContentArea.style.pageBreakAfter = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("page-break-after");
    theContentArea.style.pageBreakBefore = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("page-Break-Before");
    theContentArea.style.position = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("position");
    theContentArea.style.right = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("right");
    theContentArea.style.scrollbar3dLightColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("scrollbar-3d-light-color");
    theContentArea.style.scrollbarArrowColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("scrollbar-arrow-color");
    theContentArea.style.scrollbarBaseColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("scrollbar-base-color");
    theContentArea.style.scrollbarDarkshadowColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("scrollbar-darkshadow-color");
    theContentArea.style.scrollbarFaceColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("scrollbar-face-color");
    theContentArea.style.scrollbarHighlightColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("scrollbar-highlight-color");
    theContentArea.style.scrollbarShadowColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("scrollbar-shadow-color");
    theContentArea.style.scrollbarTrackColor = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("scrollbar-track-color");
    theContentArea.style.tableLayout = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("table-layout");
    theContentArea.style.textAlign = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("text-align");
    theContentArea.style.textDecoration = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("text-decoration");
    theContentArea.style.textIndent = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("text-indent");
    theContentArea.style.textTransform = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("text-transform");
    theContentArea.style.top = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("top");
    theContentArea.style.verticalAlign = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("vertical-align");
    theContentArea.style.visibility = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("visibility");
    theContentArea.style.width = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("width");
    theContentArea.style.wordSpacing = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("word-spacing");
    theContentArea.style.zIndex = document.defaultView.getComputedStyle(theParentEl, '').getPropertyValue("z-index");
    
  }
}


function copyParentStylesToEditor_Old(editor)
{
  if (NN6) { 
    return CopyStylesToEditorHelper(editor);
  }
  else {
      var theIFrame = document.getElementById("RadEContentIframe" + editor.Id);
      var theMainEditorTable = document.getElementById("RadEWrapper" + editor.Id);

      var theParentEl = theMainEditorTable.parentNode.parentNode;
      var theContentArea = editor.GetContentArea();
      for (var attr in theParentEl.currentStyle)
      {
         theContentArea.style[attr] = theParentEl.currentStyle[attr];
      }
  }
}
function CopyStylesToEditorHelper(element)
{
   if (element.currentStyle) // Handle IE
       return element.currentStyle;
   else // Handle Others
       return document.defaultView.getComputedStyle(element,null);
       return null;
}


function CopyStylesToEditor(editor)
{
   var theIFrame = document.getElementById("RadEContentIframe" + editor.Id);
   var theDocBody = editor.Document.body;
   var IFrameCompStyle = copyParentStylesToEditor(theIFrame);

  if (IFrameCompStyle != null)
  {
      theDocBody.style.fontFamily = IFrameCompStyle.fontFamily;
      theDocBody.style.fontSize = IFrameCompStyle.fontSize;
      theDocBody.style.fontWeight = IFrameCompStyle.fontWeight;
      theDocBody.style.lineHeight = IFrameCompStyle.lineHeight;
  }
}


function DisplayTab(tab, ens) {
	if (document.getElementById){
		document.cookie = tab + ' = ' + (document.getElementById(ens + 'tab'+tab).style.display==''?0:1);
		if (document.getElementById(ens + 'tab'+tab).style.display == ''){
			document.getElementById(ens + 'tab'+tab).style.display = 'none'; 
			document.getElementById('Expand'+tab).style.display = ''; 
			document.getElementById('Collapse'+tab).style.display = 'none'; 
			
		} else {
			document.getElementById(ens + 'tab'+tab).style.display = ''; 
			document.getElementById('Collapse'+tab).style.display = ''; 
			document.getElementById('Expand'+tab).style.display = 'none';
			
		}
	} else if (document.all) {
		document.cookie = tab + ' = ' + (document.all(ens + 'tab'+tab).style.display==''?0:1);
		if (document.all(ens + 'tab'+tab).style.display == ''){
			document.all(ens + 'tab'+tab).style.display = 'none'; 
			document.all('expand'+tab).style.display = ''; 
			document.all('collapse'+tab).style.display = 'none'; 
		} else {
			document.all(ens + 'tab'+tab).style.display = ''; 
			document.all('collapse'+tab).style.display = ''; 
			document.all('expand'+tab).style.display = 'none'; 
		}
	}
}

function loadTabState(tab, ens)
{	
	var cookieValue = readCookie(tab);
	
	if(cookieValue == null)
	{
		cookieValue = 1;
	}

	if (cookieValue == 0)
	{
		document.getElementById(ens + 'tab'+tab).style.display = 'none'; 
		document.getElementById('Expand'+tab).style.display = ''; 
		document.getElementById('Collapse'+tab).style.display = 'none'; 
	}
	else
	{
		document.getElementById(ens + 'tab'+tab).style.display = ''; 
		document.getElementById('Collapse'+tab).style.display = ''; 
		document.getElementById('Expand'+tab).style.display = 'none';
	}
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function DisplayAllTab(listOfTab,action){
	var arrOfTab = listOfTab.split(',');
	for (var i=0; i < arrOfTab.length; i++) {
		if (document.getElementById){
			if(action=='collapse'){
				document.getElementById('tab'+arrOfTab[i]).style.display = 'none'; 
				document.getElementById('expand'+arrOfTab[i]).style.display = ''; 
				document.getElementById('collapse'+arrOfTab[i]).style.display = 'none'; 
			} else {
				document.getElementById('tab'+arrOfTab[i]).style.display = ''; 
				document.getElementById('expand'+arrOfTab[i]).style.display = 'none'; 
				document.getElementById('collapse'+arrOfTab[i]).style.display = ''; 
			}
		} else if (document.all) {
			if(action=='collapse'){
				document.all('tab'+arrOfTab[i]).style.display = 'none'; 
				document.all('expand'+arrOfTab[i]).style.display = ''; 
				document.all('collapse'+arrOfTab[i]).style.display = 'none';
			} else {
				document.all('tab'+arrOfTab[i]).style.display = ''; 
				document.all('expand'+arrOfTab[i]).style.display = 'none'; 
				document.all('collapse'+arrOfTab[i]).style.display = '';
			}
		}
	}
}

function ResizeDiv(td_id,div_id){
	if (document.getElementById)
		document.getElementById(div_id).style.height = document.getElementById(td_id).offsetHeight;
	else if (document.all)
		document.all(div_id).style.height = document.all(td_id).offsetHeight;
	else
		alert('error resizing content');
}

var OpenWindow;

function PrintContent(rootfolder){
	//document.getElementById("table_frame").className = "ONLYSCREEN";
	//document.getElementById("div_print").innerHTML = document.getElementById("div_content").innerHTML;
	//document.getElementById("div_print").className = "PRINTER HIDDEN";
 	//window.print(); 	
	OpenWindow=window.open(rootfolder+"Common/blank.htm", "printscreen", "height=600, width=800, left=20, top=20, " + 
					"location=no, menubar=no, resizable=yes, " + 
					"scrollbars=yes, titlebar=no, toolbar=no", true);
	return;
}

function CloseWindowFromPopupScreen()
{
	OpenWindow.close();	
}

// redirection after 20 minutes

var time1;
 
function timer() { 
time1=window.setTimeout("redirect()",1200000); 
} 

function redirect() {
window.location = "\\"; 
} 

function detime() { 
window.clearTimeout(time1); 
timer(); 
} 

function sendMailCoded (addressStart, addressEnd)
{
	document.location.href="mailto:"+addressStart+'@'+addressEnd;
}


function modifyRadEditorIcon(theID)
{
var tableSplit=theID.split('#');
for (var i=0;i<tableSplit.length;i++)
{
    try
    {
    var placeholder = document.getElementById(tableSplit[i] + '_wrapper');
    var images = placeholder.getElementsByTagName('img');
    var image = images[0];
    if(image.src.indexOf('editor.gif')>0)
        image.style.position = 'absolute';
    }
    catch(e){}
}
//image.style.top = '100px';
//image.style.left = '100px';
}
OpenPOWER on IntegriCloud