Salome HOME
Duplicated menu after a second study opening is fixed.
[tools/siman.git] / Workspace / Siman / WebContent / rtef / paste_text.htm
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html> 
3 <head> 
4 <script>document.write("<title>"+window.opener.lblPasteText+"</title>");</script>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <style type="text/css">
7 <!-- 
8 body { font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #EFEDDE; margin: 10px;}
9 legend { font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 14px; padding-left: 5px; padding-right: 8px; }
10 .style2 {font-size: 18px; background:black; font-wieght:bold; color:white; display:block; width:100%; }
11 .show {left:auto;top:auto;position:auto;}
12 .hide {left:-1000px;top:-1000px;position:absolute;}
13 -->
14 </style>
15 <script language="JavaScript" type="text/javascript"> 
16 <!-- 
17 if(opener.isIE7) {
18   window.resizeTo(360,460);
19 } else {
20         window.resizeTo(360,440);
21 }
22
23 function submitForm(){
24   if (document.frm_obj.content.value==''){ 
25     alert(window.opener.lblPasteTextVal0); 
26   }else{
27     cleaned = formatText(document.frm_obj.content.value); 
28     window.opener.insertHTML(cleaned); 
29     window.close(); 
30   }
31 }
32
33 function formatText(html){ 
34    html = html.replace(/&/g, "&amp;"); 
35    html = html.replace(/</g, "&lt;"); 
36    html = html.replace(/>/g, "&gt;");
37    html = html.replace(/\n/g,"</p><p>"); 
38    html = html.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"); 
39    return html; 
40 }
41 //--> 
42 </script> 
43 </head> 
44 <body> 
45 <form name="frm_obj"> 
46 <fieldset style="margin:8px;"><legend><script>document.write(window.opener.lblPasteText);</script></legend>
47 <div style="padding:8px;"><script>document.write(window.opener.lblPasteTextHint);</script><textarea name="content" type="text" id="cleanText" style="width:280px; height:230px;"></textarea></div>
48 </fieldset>
49 <center>
50 <input type="button" name="btnsubmit" value="" style="width:100px" onclick="submitForm();"/>&nbsp;
51 <input type="button" name="btncancel" value="" style="width:100px" onClick="window.close();"/>
52 </center></form></body></html>
53 <script>
54 document.frm_obj.btnsubmit.value = window.opener.lblPasteTextSubmit;
55 document.frm_obj.btncancel.value = window.opener.lblPasteTextCancel;
56 document.frm_obj.content.focus();
57 </script>