event refactor, landing on HEAD!
[freeside.git] / httemplate / elements / fckeditor / editor / dialog / fck_smiley.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >\r
2 <!--\r
3  * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
4  * Copyright (C) 2003-2007 Frederico Caldeira Knabben\r
5  *\r
6  * == BEGIN LICENSE ==\r
7  *\r
8  * Licensed under the terms of any of the following licenses at your\r
9  * choice:\r
10  *\r
11  *  - GNU General Public License Version 2 or later (the "GPL")\r
12  *    http://www.gnu.org/licenses/gpl.html\r
13  *\r
14  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
15  *    http://www.gnu.org/licenses/lgpl.html\r
16  *\r
17  *  - Mozilla Public License Version 1.1 or later (the "MPL")\r
18  *    http://www.mozilla.org/MPL/MPL-1.1.html\r
19  *\r
20  * == END LICENSE ==\r
21  *\r
22  * Smileys (emoticons) dialog window.\r
23 -->\r
24 <html xmlns="http://www.w3.org/1999/xhtml">\r
25 <head>\r
26         <title></title>\r
27         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
28         <meta name="robots" content="noindex, nofollow" />\r
29         <style type="text/css">\r
30                 .Hand\r
31                 {\r
32                         cursor: pointer;\r
33                         cursor: hand;\r
34                 }\r
35         </style>\r
36         <script type="text/javascript">\r
37 \r
38 var oEditor = window.parent.InnerDialogLoaded() ;\r
39 \r
40 window.onload = function ()\r
41 {\r
42         // First of all, translate the dialog box texts\r
43         oEditor.FCKLanguageManager.TranslatePage(document) ;\r
44 }\r
45 \r
46 function InsertSmiley( url )\r
47 {\r
48         var oImg = oEditor.FCK.CreateElement( 'IMG' ) ;\r
49         oImg.src = url ;\r
50         oImg.setAttribute( '_fcksavedurl', url ) ;\r
51 \r
52         // For long smileys list, it seams that IE continues loading the images in\r
53         // the background when you quickly select one image. so, let's clear\r
54         // everything before closing.\r
55         document.body.innerHTML = '' ;\r
56 \r
57         window.parent.Cancel() ;\r
58 }\r
59 \r
60 function over(td)\r
61 {\r
62         td.className = 'LightBackground Hand' ;\r
63 }\r
64 \r
65 function out(td)\r
66 {\r
67         td.className = 'DarkBackground Hand' ;\r
68 }\r
69         </script>\r
70 </head>\r
71 <body scroll="no">\r
72         <table cellpadding="2" cellspacing="2" align="center" border="0" width="100%" height="100%">\r
73                 <script type="text/javascript">\r
74 \r
75 var FCKConfig = oEditor.FCKConfig ;\r
76 \r
77 var sBasePath   = FCKConfig.SmileyPath ;\r
78 var aImages             = FCKConfig.SmileyImages ;\r
79 var iCols               = FCKConfig.SmileyColumns ;\r
80 var iColWidth   = parseInt( 100 / iCols, 10 ) ;\r
81 \r
82 var i = 0 ;\r
83 while (i < aImages.length)\r
84 {\r
85         document.write( '<tr>' ) ;\r
86         for(var j = 0 ; j < iCols ; j++)\r
87         {\r
88                 if (aImages[i])\r
89                 {\r
90                         var sUrl = sBasePath + aImages[i] ;\r
91                         document.write( '<td width="' + iColWidth + '%" align="center" class="DarkBackground Hand" onclick="InsertSmiley(\'' + sUrl.replace(/'/g, "\\'" ) + '\')" onmouseover="over(this)" onmouseout="out(this)">' ) ;\r
92                         document.write( '<img src="' + sUrl + '" border="0" />' ) ;\r
93                 }\r
94                 else\r
95                         document.write( '<td width="' + iColWidth + '%" class="DarkBackground">&nbsp;' ) ;\r
96                 document.write( '<\/td>' ) ;\r
97                 i++ ;\r
98         }\r
99         document.write('<\/tr>') ;\r
100 }\r
101 \r
102                 </script>\r
103         </table>\r
104 </body>\r
105 </html>\r