1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
2<!--
3 * File Name: fck_insertHtmlCode.html
4 * 	Insert Code dialog window.
5 *
6 * File Authors:
7 * 		Abdul-Aziz Al-Oraij (top7up@hotmail.com)
8 * 		Michel Staelens
9 * 		Bernadette Cierzniak
10 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
11 *      Nico Piponides
12-->
13<html>
14	<head>
15		<title>Insert Code</title>
16		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
17		<meta content="noindex, nofollow" name="robots">
18		<link rel="stylesheet" type="text/css" href="fck_insertHtmlCode.css" />
19
20<style type = 'text/css'>
21  body, .std_font { font-size: 8pt; }
22</style>
23		<script type="text/javascript">
24
25
26var oEditor = window.parent.InnerDialogLoaded() ;
27var insertHTMLCodeObject = oEditor.FCK.oinsertHtmlCodeObj;
28var insertHTMLCodeObjectEdit = false;
29var insertHTMLCodeObjectLoaded = false;
30
31window.onload = function()
32{
33	document.body.style.padding = '0px' ;
34
35	// First of all, translate the dialog box texts
36	oEditor.FCKLanguageManager.TranslatePage(document) ;
37
38	window.parent.SetOkButton( true ) ;
39	window.parent.SetAutoSize( true ) ;
40
41}
42
43
44function loadNoteToEdit() {
45	var editorInstance = oEditor.FCK;
46    var UID = document.getElementById('citationId').value;
47
48    if(insertHTMLCodeObject.notes[UID]) {
49       var edit_area = document.getElementById('insCode_area');
50       edit_area.value = insertHTMLCodeObject.notes[UID];
51       insertHTMLCodeObjectLoaded = true;
52    }
53
54 }
55
56
57
58function Ok()
59{
60	 var oArea = document.getElementById( 'insCode_area' ) ;
61     var UID = document.getElementById('citationId').value;
62
63     if(UID && !insertHTMLCodeObjectLoaded) {
64          alert('You must first load your note into the editing window.');
65          return false;
66     }
67
68	if ( oArea.value.length > 0 ) {
69         if(UID) {
70            insertHTMLCodeObject.notes[UID] = document.getElementById('insCode_area').value;
71            return true
72         }
73
74        var instance = ++insertHTMLCodeObject.count;
75        var fn_id = 'fckgL'+ instance;
76        insertHTMLCodeObject.notes[fn_id] = oArea.value ;
77        var note = '<sup class="dwfcknote ' + fn_id +'" title="' + oArea.value + '">' + fn_id + '</sup>';
78      // var note = '<sup class="dwfcknote ' + fn_id +'">' + fn_id + '</sup>';
79
80       oEditor.FCK.InsertHtml(note) ;
81	}
82
83	return true ;
84}
85
86		</script>
87	</head>
88	<body>
89        <span class='std_font' fcklang="DlgFootnoteExplaination">Use the text area for both creating and revising your footnotes.
90       </span><br />
91		<textarea id="insCode_area" cols="60" rows="15" style="width:100%;; height:70%;font-size:9pt;"></textarea>
92
93        <span class="std_font" fcklang="DlgFootnoteId">Footnote ID&nbsp;&nbsp;</span><input type ='text' id = 'citationId' size='8' style="font-size:9pt">
94        <input type = 'button' id="loadNote" class="std_font" value = 'Load Note in Editor' onclick="loadNoteToEdit();" fcklang="DlgFootnoteLoad">
95       <br /><span class="std_font" fcklang="DlgFootnoteExplainationBottom">To Revise enter the footnote ID and click "Load Note in Editor"
96          </span>
97		<script type="text/javascript" src="dialogue.js"></script>
98	</body>
99</html>
100