Code cleanup: replaced CVS with SVN
[Packages/TYPO3.CMS.git] / typo3 / sysext / rtehtmlarea / htmlarea / plugins / InsertSmiley / popups / insertsmiley.html
1 <html class="popupwin">
2 <!--
3 /***************************************************************
4 * Copyright notice
5 *
6 * (c) 2004 Ki Master George <kimastergeorge@gmail.com>
7 * (c) 2005-2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
8 * All rights reserved
9 *
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 * A copy is found in the textfile GPL.txt and important notices to the license
19 * from the author is found in LICENSE.txt distributed with these scripts.
20 *
21 *
22 * This script is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * This script is a modified version of a script published under the htmlArea License.
28 * A copy of the htmlArea License may be found in the textfile HTMLAREA_LICENSE.txt.
29 *
30 * This copyright notice MUST APPEAR in all copies of the script!
31 ***************************************************************/
32 /*
33 * Insert Smiley Plugin for TYPO3 htmlArea RTE
34 *
35 * TYPO3 SVN ID: $Id$
36 */
37 -->
38 <head>
39 <title>Insert Smiley</title>
40 <meta http-equiv="Content-Style-Type" content="text/css" />
41 <script type="text/javascript">
42 /*<![CDATA[*/
43 <!--
44 var dialog = window.opener.HTMLArea.Dialog.InsertSmiley;
45 var param;
46
47 function Init() {
48 var totalsmileys = 20;
49 dialog.initialize();
50
51 param = dialog.arguments;
52 var tbody = document.getElementById("smileytable");
53 var inum;
54 var trow;
55 for(var i = 1; i <= totalsmileys; i++) {
56 if((i - 1) % 4 == 0) {
57 trow = tbody.insertRow((i - 1) / 4);
58 }
59 // find new number to be found in smileys folder
60 inum = "";
61 if(i < 1000) {
62 if(i < 100) {
63 if(i < 10) {
64 inum = "000" + i;
65 } else {
66 inum = "00" + i;
67 }
68 } else {
69 inum = "0" + i;
70 }
71 } else {
72 inum = i;
73 }
74 trow.insertCell((i - 1) % 4).innerHTML = "<a href=\"javascript:onOK('" + inum + "')\"><img style=\"border: 0px;\" alt=\"Smiley " + + i + "\" src=\""+ param.editor_url +"plugins/InsertSmiley/smileys/" + inum + ".gif\" />";
75 }
76 };
77
78 function onOK(smileynum) {
79 var params = {};
80 params.imgURL = param.editor_url +"plugins/InsertSmiley/smileys/" + smileynum + ".gif";
81 dialog.performAction(params);
82 dialog.close();
83 return false;
84 };
85
86 function onCancel() {
87 dialog.close();
88 return false;
89 };
90 // -->
91 /*]]>*/
92 </script>
93 </head>
94 <body class="popupwin" onload="Init();">
95 <div id="content">
96 <div class="title">Insert Smiley</div>
97 <form action="" method="get">
98 <div class="smileytable" style="text-align: center;">
99 <table id="smileytable" name="smileytable"></table>
100 </div>
101 <div class="space"></div>
102 <div class="buttons">
103 <button type="button" onclick="return onCancel();">Cancel</button>
104 </div>
105 </form>
106 </div>
107 </body>
108 </html>