import torrus 1.0.9
[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-2010 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 src="common/fck_dialog_common.js" type="text/javascript"></script>\r
37         <script type="text/javascript">\r
38 \r
39 var dialog      = window.parent ;\r
40 var oEditor = dialog.InnerDialogLoaded() ;\r
41 \r
42 window.onload = function ()\r
43 {\r
44         // First of all, translate the dialog box texts\r
45         oEditor.FCKLanguageManager.TranslatePage(document) ;\r
46 \r
47         dialog.SetAutoSize( true ) ;\r
48 }\r
49 \r
50 function InsertSmiley( url )\r
51 {\r
52         oEditor.FCKUndo.SaveUndoStep() ;\r
53 \r
54         var oImg = oEditor.FCK.InsertElement( 'img' ) ;\r
55         oImg.src = url ;\r
56         oImg.setAttribute( '_fcksavedurl', url ) ;\r
57 \r
58         // For long smileys list, it seams that IE continues loading the images in\r
59         // the background when you quickly select one image. so, let's clear\r
60         // everything before closing.\r
61         document.body.innerHTML = '' ;\r
62 \r
63         dialog.Cancel() ;\r
64 }\r
65 \r
66 function over(td)\r
67 {\r
68         td.className = 'LightBackground Hand' ;\r
69 }\r
70 \r
71 function out(td)\r
72 {\r
73         td.className = 'DarkBackground Hand' ;\r
74 }\r
75         </script>\r
76 </head>\r
77 <body style="overflow: hidden">\r
78         <table cellpadding="2" cellspacing="2" align="center" border="0" width="100%" height="100%">\r
79                 <script type="text/javascript">\r
80 \r
81 var FCKConfig = oEditor.FCKConfig ;\r
82 \r
83 var sBasePath   = FCKConfig.SmileyPath ;\r
84 var aImages             = FCKConfig.SmileyImages ;\r
85 var iCols               = FCKConfig.SmileyColumns ;\r
86 var iColWidth   = parseInt( 100 / iCols, 10 ) ;\r
87 \r
88 var i = 0 ;\r
89 while (i < aImages.length)\r
90 {\r
91         document.write( '<tr>' ) ;\r
92         for(var j = 0 ; j < iCols ; j++)\r
93         {\r
94                 if (aImages[i])\r
95                 {\r
96                         var sUrl = sBasePath + aImages[i] ;\r
97                         document.write( '<td width="' + iColWidth + '%" align="center" class="DarkBackground Hand" onclick="InsertSmiley(\'' + sUrl.replace(/'/g, "\\'" ) + '\')" onmouseover="over(this)" onmouseout="out(this)">' ) ;\r
98                         document.write( '<img src="' + sUrl + '" border="0" />' ) ;\r
99                 }\r
100                 else\r
101                         document.write( '<td width="' + iColWidth + '%" class="DarkBackground">&nbsp;' ) ;\r
102                 document.write( '<\/td>' ) ;\r
103                 i++ ;\r
104         }\r
105         document.write('<\/tr>') ;\r
106 }\r
107 \r
108                 </script>\r
109         </table>\r
110 </body>\r
111 </html>\r