| 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>Source 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 oSource ; |
| 46 | |
| 47 | if ( oFakeImage ) |
| 48 | { |
| 49 | if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fck_mw_source') ) |
| 50 | { |
| 51 | oSource = FCK.GetRealElement( oFakeImage ) ; |
| 52 | } |
| 53 | else |
| 54 | { |
| 55 | oFakeImage = null ; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | window.onload = function() |
| 60 | { |
| 61 | // Translate the dialog box texts. |
| 62 | oEditor.FCKLanguageManager.TranslatePage(document) ; |
| 63 | |
| 64 | // Load the selected link information (if any). |
| 65 | LoadSelection() ; |
| 66 | |
| 67 | // Activate the "OK" button. |
| 68 | window.parent.SetOkButton( true ) ; |
| 69 | window.parent.SetAutoSize( true ) ; |
| 70 | } |
| 71 | |
| 72 | function LoadSelection() |
| 73 | { |
| 74 | if ( !oSource ) return ; |
| 75 | |
| 76 | GetE('xSourceText').value = FCKTools.HTMLDecode( oSource.innerHTML ).replace(/fckLR/g,'\r\n').replace( /"/g, '"' ); |
| 77 | GetE('xSourceLang').value = oSource.getAttribute( 'lang' ) ; |
| 78 | } |
| 79 | |
| 80 | //#### The OK button was hit. |
| 81 | function Ok() |
| 82 | { |
| 83 | if ( !oSource ) |
| 84 | { |
| 85 | oSource = FCK.EditorDocument.createElement( 'SPAN' ) ; |
| 86 | oSource.className = 'fck_mw_source' ; |
| 87 | } |
| 88 | |
| 89 | var sourceData = FCKTools.HTMLEncode(GetE('xSourceText').value.Trim().replace(/(\r\n|\n)/g, 'fckLR')).replace( /"/g, '"' ) ; |
| 90 | oSource.innerHTML = sourceData ; |
| 91 | oSource.setAttribute( 'lang', GetE('xSourceLang').value.Trim() ) ; |
| 92 | |
| 93 | if ( !oFakeImage ) |
| 94 | { |
| 95 | oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__MWSource', oSource ) ; |
| 96 | oFakeImage.setAttribute( '_fck_mw_source', 'true', 0 ) ; |
| 97 | oFakeImage = FCK.InsertElement( oFakeImage ) ; |
| 98 | } |
| 99 | |
| 100 | return true ; |
| 101 | } |
| 102 | |
| 103 | </script> |
| 104 | </head> |
| 105 | <body style="overflow: hidden"> |
| 106 | <div id="divInfo"> |
| 107 | <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"> |
| 108 | <tr> |
| 109 | <td> |
| 110 | <span>Source Code</span> |
| 111 | </td> |
| 112 | </tr> |
| 113 | <tr> |
| 114 | <td height="100%"> |
| 115 | <textarea wrap=OFF id="xSourceText" style="width: 100%; height: 100%; font-family: Monospace" |
| 116 | cols="50" rows="5"></textarea> |
| 117 | </td> |
| 118 | </tr> |
| 119 | <tr> |
| 120 | <td> |
| 121 | Source Language<br /> |
| 122 | <input id="xSourceLang" type="text" size="15" /> |
| 123 | </td> |
| 124 | </tr> |
| 125 | </table> |
| 126 | </div> |
| 127 | </body> |
| 128 | </html> |
| 129 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 130 | <!-- |
| 131 | * FCKeditor - The text editor for Internet - http://www.fckeditor.net |
| 132 | * Copyright (C) 2003-2007 Frederico Caldeira Knabben |
| 133 | * |
| 134 | * == BEGIN LICENSE == |
| 135 | * |
| 136 | * Licensed under the terms of any of the following licenses at your |
| 137 | * choice: |
| 138 | * |
| 139 | * - GNU General Public License Version 2 or later (the "GPL") |
| 140 | * http://www.gnu.org/licenses/gpl.html |
| 141 | * |
| 142 | * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
| 143 | * http://www.gnu.org/licenses/lgpl.html |
| 144 | * |
| 145 | * - Mozilla Public License Version 1.1 or later (the "MPL") |
| 146 | * http://www.mozilla.org/MPL/MPL-1.1.html |
| 147 | * |
| 148 | * == END LICENSE == |
| 149 | * |
| 150 | * Link dialog window. |
| 151 | --> |
| 152 | <html> |
| 153 | <head> |
| 154 | <title>Source Properties</title> |
| 155 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 156 | <meta name="robots" content="noindex, nofollow" /> |
| 157 | <script type="text/javascript"> |
| 158 | |
| 159 | var oEditor = window.parent.InnerDialogLoaded() ; |
| 160 | var FCK = oEditor.FCK ; |
| 161 | var FCKLang = oEditor.FCKLang ; |
| 162 | var FCKConfig = oEditor.FCKConfig ; |
| 163 | var FCKRegexLib = oEditor.FCKRegexLib ; |
| 164 | var FCKTools = oEditor.FCKTools ; |
| 165 | |
| 166 | document.write( '<script src="' + FCKConfig.BasePath + 'dialog/common/fck_dialog_common.js" type="text/javascript"><\/script>' ) ; |
| 167 | |
| 168 | </script> |
| 169 | <script type="text/javascript"> |
| 170 | |
| 171 | // Get the selected flash embed (if available). |
| 172 | var oFakeImage = FCK.Selection.GetSelectedElement() ; |
| 173 | var oSource ; |
| 174 | |
| 175 | if ( oFakeImage ) |
| 176 | { |
| 177 | if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fck_mw_source') ) |
| 178 | { |
| 179 | oSource = FCK.GetRealElement( oFakeImage ) ; |
| 180 | } |
| 181 | else |
| 182 | { |
| 183 | oFakeImage = null ; |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | window.onload = function() |
| 188 | { |
| 189 | // Translate the dialog box texts. |
| 190 | oEditor.FCKLanguageManager.TranslatePage(document) ; |
| 191 | |
| 192 | // Load the selected link information (if any). |
| 193 | LoadSelection() ; |
| 194 | |
| 195 | // Activate the "OK" button. |
| 196 | window.parent.SetOkButton( true ) ; |
| 197 | window.parent.SetAutoSize( true ) ; |
| 198 | } |
| 199 | |
| 200 | function LoadSelection() |
| 201 | { |
| 202 | if ( !oSource ) return ; |
| 203 | |
| 204 | GetE('xSourceText').value = FCKTools.HTMLDecode( oSource.innerHTML ).replace(/fckLR/g,'\r\n').replace( /"/g, '"' ); |
| 205 | GetE('xSourceLang').value = oSource.getAttribute( 'lang' ) ; |
| 206 | } |
| 207 | |
| 208 | //#### The OK button was hit. |
| 209 | function Ok() |
| 210 | { |
| 211 | if ( !oSource ) |
| 212 | { |
| 213 | oSource = FCK.EditorDocument.createElement( 'SPAN' ) ; |
| 214 | oSource.className = 'fck_mw_source' ; |
| 215 | } |
| 216 | |
| 217 | var sourceData = FCKTools.HTMLEncode(GetE('xSourceText').value.Trim().replace(/(\r\n|\n)/g, 'fckLR')).replace( /"/g, '"' ) ; |
| 218 | oSource.innerHTML = sourceData ; |
| 219 | oSource.setAttribute( 'lang', GetE('xSourceLang').value.Trim() ) ; |
| 220 | |
| 221 | if ( !oFakeImage ) |
| 222 | { |
| 223 | oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__MWSource', oSource ) ; |
| 224 | oFakeImage.setAttribute( '_fck_mw_source', 'true', 0 ) ; |
| 225 | oFakeImage = FCK.InsertElement( oFakeImage ) ; |
| 226 | } |
| 227 | |
| 228 | return true ; |
| 229 | } |
| 230 | |
| 231 | </script> |
| 232 | </head> |
| 233 | <body style="overflow: hidden"> |
| 234 | <div id="divInfo"> |
| 235 | <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"> |
| 236 | <tr> |
| 237 | <td> |
| 238 | <span>Source Code</span> |
| 239 | </td> |
| 240 | </tr> |
| 241 | <tr> |
| 242 | <td height="100%"> |
| 243 | <textarea wrap=OFF id="xSourceText" style="width: 100%; height: 100%; font-family: Monospace" |
| 244 | cols="50" rows="5"></textarea> |
| 245 | </td> |
| 246 | </tr> |
| 247 | <tr> |
| 248 | <td> |
| 249 | Source Language<br /> |
| 250 | <input id="xSourceLang" type="text" size="15" /> |
| 251 | </td> |
| 252 | </tr> |
| 253 | </table> |
| 254 | </div> |
| 255 | </body> |
| 256 | </html> |