1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
---|
2 | <!-- |
---|
3 | * FCKeditor - The text editor for Internet - http://www.fckeditor.net |
---|
4 | * Copyright (C) 2003-2007 Frederico Caldeira Knabben |
---|
5 | * |
---|
6 | * == BEGIN LICENSE == |
---|
7 | * |
---|
8 | * Licensed under the terms of any of the following licenses at your |
---|
9 | * choice: |
---|
10 | * |
---|
11 | * - GNU General Public License Version 2 or later (the "GPL") |
---|
12 | * http://www.gnu.org/licenses/gpl.html |
---|
13 | * |
---|
14 | * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
---|
15 | * http://www.gnu.org/licenses/lgpl.html |
---|
16 | * |
---|
17 | * - Mozilla Public License Version 1.1 or later (the "MPL") |
---|
18 | * http://www.mozilla.org/MPL/MPL-1.1.html |
---|
19 | * |
---|
20 | * == END LICENSE == |
---|
21 | * |
---|
22 | * Link dialog window. |
---|
23 | --> |
---|
24 | <html> |
---|
25 | <head> |
---|
26 | <title>Reference Properties</title> |
---|
27 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
28 | <meta name="robots" content="noindex, nofollow" /> |
---|
29 | <script type="text/javascript"> |
---|
30 | |
---|
31 | var oEditor = window.parent.InnerDialogLoaded() ; |
---|
32 | var FCK = oEditor.FCK ; |
---|
33 | var FCKLang = oEditor.FCKLang ; |
---|
34 | var FCKConfig = oEditor.FCKConfig ; |
---|
35 | var FCKRegexLib = oEditor.FCKRegexLib ; |
---|
36 | var FCKTools = oEditor.FCKTools ; |
---|
37 | |
---|
38 | document.write( '<script src="' + FCKConfig.BasePath + 'dialog/common/fck_dialog_common.js" type="text/javascript"><\/script>' ) ; |
---|
39 | |
---|
40 | </script> |
---|
41 | <script type="text/javascript"> |
---|
42 | |
---|
43 | // Get the selected flash embed (if available). |
---|
44 | var oFakeImage = FCK.Selection.GetSelectedElement() ; |
---|
45 | var oRef ; |
---|
46 | |
---|
47 | if ( oFakeImage ) |
---|
48 | { |
---|
49 | if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fck_mw_ref') ) |
---|
50 | oRef = FCK.GetRealElement( oFakeImage ) ; |
---|
51 | else |
---|
52 | oFakeImage = null ; |
---|
53 | } |
---|
54 | |
---|
55 | window.onload = function() |
---|
56 | { |
---|
57 | // Translate the dialog box texts. |
---|
58 | oEditor.FCKLanguageManager.TranslatePage(document) ; |
---|
59 | |
---|
60 | // Load the selected link information (if any). |
---|
61 | LoadSelection() ; |
---|
62 | |
---|
63 | // Activate the "OK" button. |
---|
64 | window.parent.SetOkButton( true ) ; |
---|
65 | window.parent.SetAutoSize( true ) ; |
---|
66 | } |
---|
67 | |
---|
68 | function LoadSelection() |
---|
69 | { |
---|
70 | if ( !oRef ) return ; |
---|
71 | |
---|
72 | GetE('xRefText').value = FCKTools.HTMLDecode( oRef.innerHTML ).replace( /"/g, '"' ) ; |
---|
73 | GetE('xRefName').value = oRef.getAttribute( 'name' ) ; |
---|
74 | } |
---|
75 | |
---|
76 | //#### The OK button was hit. |
---|
77 | function Ok() |
---|
78 | { |
---|
79 | if ( !oRef ) |
---|
80 | { |
---|
81 | oRef = FCK.EditorDocument.createElement( 'SPAN' ) ; |
---|
82 | oRef.className = 'fck_mw_ref' ; |
---|
83 | } |
---|
84 | |
---|
85 | var refData = FCKTools.HTMLEncode( GetE('xRefText').value ).Trim().replace( /"/g, '"' ) ; |
---|
86 | oRef.innerHTML = refData ; |
---|
87 | SetAttribute( oRef, "name", GetE('xRefName').value ) ; |
---|
88 | |
---|
89 | if ( !oFakeImage ) |
---|
90 | { |
---|
91 | oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__MWRef', oRef ) ; |
---|
92 | oFakeImage.setAttribute( '_fck_mw_ref', 'true', 0 ) ; |
---|
93 | oFakeImage = FCK.InsertElement( oFakeImage ) ; |
---|
94 | } |
---|
95 | |
---|
96 | return true ; |
---|
97 | } |
---|
98 | |
---|
99 | </script> |
---|
100 | </head> |
---|
101 | <body style="overflow: hidden"> |
---|
102 | <div id="divInfo"> |
---|
103 | <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"> |
---|
104 | <tr> |
---|
105 | <td> |
---|
106 | <span fcklang="wikiRef"></span> |
---|
107 | </td> |
---|
108 | </tr> |
---|
109 | <tr> |
---|
110 | <td height="100%"> |
---|
111 | <textarea id="xRefText" style="width: 100%; height: 100%; font-family: Monospace" |
---|
112 | cols="50" rows="5"></textarea> |
---|
113 | </td> |
---|
114 | </tr> |
---|
115 | <tr> |
---|
116 | <td> |
---|
117 | <span fcklang="wikiRefName"></span><br /> |
---|
118 | <input id="xRefName" type="text" size="15" /> |
---|
119 | </td> |
---|
120 | </tr> |
---|
121 | </table> |
---|
122 | </div> |
---|
123 | </body> |
---|
124 | </html> |
---|