source: trunk/plugins/InsertSmiley/popups/insertsmiley.html @ 677

Last change on this file since 677 was 677, checked in by ray, 12 years ago

set svn:keywords property for the new files & all plugins

  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 2.4 KB
Line 
1<html>
2<head>
3<title>Insert Smiley</title>
4<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
5<script type="text/javascript" src="../../../popups/popup.js"></script>
6<script type="text/javascript">
7
8var InsertSmiley = window.opener.InsertSmiley;
9var editor = null;
10var param;
11
12function Init() {
13  var totalsmileys = 580;
14  __dlg_translate("InsertSmiley");
15  __dlg_init();
16  param = window.dialogArguments;
17  editor = param['editor'];
18  window.resizeTo(400, 300);
19  var tbody = document.getElementById("smileytable");
20  var inum;
21  var trow;
22  for(var i = 1; i <= totalsmileys; i++) {
23    if((i - 1) % 4 == 0) {
24          trow = tbody.insertRow((i - 1) / 4);
25        }
26        // find new number to be found in smileys folder
27        inum = "";
28        if(i < 1000) {
29          if(i < 100) {
30                if(i < 10) {
31                  inum = "000" + i;
32                } else {
33                  inum = "00" + i;
34                }
35          } else {
36            inum = "0" + i;
37          }
38        } else {
39          inum = i;
40        }
41        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\" />";
42  }
43  document.body.onkeypress = __dlg_key_press;
44}
45
46function onCancel() {
47  __dlg_close(null);
48  return false;
49}
50
51function onOK(smileynum) {
52  var params = {};
53  params.imgURL = param.editor_url +"plugins/InsertSmiley/smileys/" + smileynum + ".gif";
54  __dlg_close(params);
55  return false;
56}
57
58function __dlg_key_press(ev) {
59  ev || (ev = window.event);
60  switch(ev.keyCode) {
61    case 13:
62    document.getElementById('bt_ok').click();
63      break;
64    case 27:
65    __dlg_close();
66    return false;
67  }
68return true;
69}
70</script>
71
72<style type="text/css">
73.buttons {border-top: 1px solid #999; padding: 5px; text-align: right; height: 20px; }
74</style>
75</head>
76  <body class="dialog" onload="Init()">
77<form action="" method="get">
78  <div class="title" style="width: 360px;">Insert Smiley</div>
79  <div style="height: 175px; overflow:auto;" align="center">
80  <table style="border: 0; width: 370px;" id="smileytable" name="smileytable">
81  </table>
82  </div>
83<div class="space"></div>
84<div class="buttons">
85<button type="button" onclick="return onCancel();">Cancel</button>
86</div>
87<div id="showselect" style="position:absolute; left:7px; top:75px; width:150px; z-index:100; visibility: visible; height: 13px; color: red;">
88</div>
89</form>
90</body>
91</html>
Note: See TracBrowser for help on using the repository browser.