mirror of
https://github.com/moodle/moodle.git
synced 2025-01-23 00:28:57 +01:00
159 lines
5.8 KiB
PHP
159 lines
5.8 KiB
PHP
<!--
|
||
################################################################################
|
||
##
|
||
## HTML Text Editing Component for hosting in Web Pages
|
||
## Copyright (C) 2001 Ramesys (Contracting Services) Limited
|
||
##
|
||
## This library is free software; you can redistribute it and/or
|
||
## modify it under the terms of the GNU Lesser General Public
|
||
## License as published by the Free Software Foundation; either
|
||
## version 2.1 of the License, or (at your option) any later version.
|
||
##
|
||
## This library is distributed in the hope that it will be useful,
|
||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
## Lesser General Public License for more details.
|
||
##
|
||
## You should have received a copy of the GNU LesserGeneral Public License
|
||
## along with this program; if not a copy can be obtained from
|
||
##
|
||
## http://www.gnu.org/copyleft/lesser.html
|
||
##
|
||
## or by writing to:
|
||
##
|
||
## Free Software Foundation, Inc.
|
||
## 59 Temple Place - Suite 330,
|
||
## Boston,
|
||
## MA 02111-1307,
|
||
## USA.
|
||
##
|
||
## Original Developer:
|
||
##
|
||
## Austin David France
|
||
## Ramesys (Contracting Services) Limited
|
||
## Mentor House
|
||
## Ainsworth Street
|
||
## Blackburn
|
||
## Lancashire
|
||
## BB1 6AY
|
||
## United Kingdom
|
||
## email: Austin.France@Ramesys.com
|
||
##
|
||
## Home Page: http://richtext.sourceforge.net/
|
||
## Support: http://richtext.sourceforge.net/
|
||
##
|
||
################################################################################
|
||
-->
|
||
<?php
|
||
include("../../../config.php");
|
||
?>
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
<html style="height: 270px;">
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=<?php print_string("thischarset");?>">
|
||
<style type="text/css">
|
||
body {
|
||
background: ButtonFace;
|
||
color: ButtonText;
|
||
font: 11px Tahoma,Verdana,sans-serif;
|
||
margin: 0px;
|
||
padding: 0px;
|
||
}
|
||
body { padding: 5px; }
|
||
table {
|
||
font: 11px Tahoma,Verdana,sans-serif;
|
||
}
|
||
form p {
|
||
margin-top: 5px;
|
||
margin-bottom: 5px;
|
||
}
|
||
|
||
select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
|
||
button { width: 70px; }
|
||
.space { padding: 2px; }
|
||
|
||
.title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
|
||
border-bottom: 1px solid black; letter-spacing: 2px;
|
||
}
|
||
form { padding: 0px; margin: 0px; }
|
||
.chr {
|
||
background-color: transparent;
|
||
border: 1px solid #dcdcdc;
|
||
font-family: "Times New Roman", times;
|
||
font-size: small;
|
||
}
|
||
</style>
|
||
<script type="text/javascript" src="popup.js"></script>
|
||
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
|
||
<!--
|
||
function Init() {
|
||
__dlg_init();
|
||
}
|
||
var chars = ["!",""","#","$","%","&","'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","€","<22>","<22>","<22>","<22>","<22>","<22>","\<5C>","<22>","<22>","<22>","‘","’","’","“","”","<22>","–","—","<22>","<22>","<22>","<22>","<22>","<22>","¡","¢","£","£","¤","¥","¦","§","¨","©","ª","«","¬","<22>","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ü","ý","þ","ÿ"]
|
||
|
||
function tab(w,h) {
|
||
var strtab = ["<table border='0' cellspacing='0' cellpadding='0' align='center' bordercolor='#dcdcdc' bgcolor='#C0C0C0'>"]
|
||
var k = 0;
|
||
for(var i = 0; i < w; i++) {
|
||
strtab[strtab.length] = "<tr>";
|
||
for(var j = 0; j < h; j++) {
|
||
strtab[strtab.length] = "<td class='chr' width='14' align='center' onClick='getchar(this)' onMouseOver='hover(this,true)' onMouseOut='hover(this,false)'>"+(chars[k]||'')+"</td>";
|
||
k++;
|
||
}
|
||
strtab[strtab.length]="</tr>";
|
||
}
|
||
strtab[strtab.length] = "</table>";
|
||
return strtab.join("\n");
|
||
}
|
||
|
||
function hover(obj,val) {
|
||
if (!obj.innerHTML) {
|
||
obj.style.cursor = "default";
|
||
return;
|
||
}
|
||
obj.style.border = val ? "1px solid black" : "1px solid #dcdcdc";
|
||
//obj.style.backgroundColor = val ? "black" : "#C0C0C0"
|
||
//obj.style.color = val ? "white" : "black";
|
||
}
|
||
function getchar(obj) {
|
||
if(!obj.innerHTML) return;
|
||
var sChar = obj.innerHTML || "";
|
||
__dlg_close(sChar);
|
||
return false;
|
||
}
|
||
function cancel() {
|
||
__dlg_close(null);
|
||
return false;
|
||
}
|
||
//-->
|
||
</SCRIPT>
|
||
<title>Insert Character</title>
|
||
</head>
|
||
<body onload="Init()">
|
||
<table class="dlg" cellpadding="0" cellspacing="2">
|
||
<tr><td><table width="100%"><tr><td class="title" nowrap><?php print_string("choosechar","editor") ?></td></tr></table></td></tr>
|
||
<tr>
|
||
<td>
|
||
<table border="0" align="center" cellpadding="5">
|
||
<tr valign="top">
|
||
<td>
|
||
|
||
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
|
||
<!--
|
||
document.write(tab(7,32))
|
||
//-->
|
||
</SCRIPT>
|
||
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr><td><table width="100%"><tr><td valign="middle" width="90%"><hr width="100%"></td></tr></table></td></tr>
|
||
<tr><td align="right">
|
||
<button type="button" onclick="cancel()"><?php print_string("close","editor") ?></button></td></tr>
|
||
</table>
|
||
</body>
|
||
</body>
|
||
</html>
|