[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/lib/editor/htmlarea/popups/ -> dlg_ins_char.php (source)

   1  <!--
   2  ################################################################################
   3  ##
   4  ## HTML Text Editing Component for hosting in Web Pages
   5  ## Copyright (C) 2001  Ramesys (Contracting Services) Limited
   6  ##
   7  ## This library is free software; you can redistribute it and/or
   8  ## modify it under the terms of the GNU Lesser General Public
   9  ## License as published by the Free Software Foundation; either
  10  ## version 2.1 of the License, or (at your option) any later version.
  11  ##
  12  ## This library is distributed in the hope that it will be useful,
  13  ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15  ## Lesser General Public License for more details.
  16  ##
  17  ## You should have received a copy of the GNU LesserGeneral Public License
  18  ## along with this program; if not a copy can be obtained from
  19  ##
  20  ##    http://www.gnu.org/copyleft/lesser.html
  21  ##
  22  ## or by writing to:
  23  ##
  24  ##    Free Software Foundation, Inc.
  25  ##    59 Temple Place - Suite 330,
  26  ##    Boston,
  27  ##    MA  02111-1307,
  28  ##    USA.
  29  ##
  30  ## Original Developer:
  31  ##
  32  ##  Austin David France
  33  ##  Ramesys (Contracting Services) Limited
  34  ##  Mentor House
  35  ##  Ainsworth Street
  36  ##  Blackburn
  37  ##  Lancashire
  38  ##  BB1 6AY
  39  ##  United Kingdom
  40  ##  email: Austin.France@Ramesys.com
  41  ##
  42  ## Home Page:    http://richtext.sourceforge.net/
  43  ## Support:      http://richtext.sourceforge.net/
  44  ##
  45  ################################################################################
  46  -->
  47  <?php
  48      require("../../../../config.php");
  49  
  50      $id = optional_param('id', SITEID, PARAM_INT);
  51  
  52      require_course_login($id);
  53      @header('Content-Type: text/html; charset=utf-8');
  54  ?>
  55  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  56      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  57  <html>
  58  <head>
  59  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  60  <style type="text/css">
  61  <!--
  62  body { background: ButtonFace; color: ButtonText; font: 11px Tahoma,Verdana,sans-serif;
  63  margin: 0px; padding: 0px; }
  64  form p { margin-top: 5px; margin-bottom: 5px; }
  65  select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
  66  button { width: 70px; }
  67  .space { padding: 2px; }
  68  .title { background: #ddf; color: #000; font-weight: bold; font-size: 14px; padding: 3px 10px; margin-bottom: 10px;
  69  border-bottom: 1px solid black; letter-spacing: 2px; }
  70  form { padding: 0px; margin: 0px; }
  71  .chr { background-color: transparent; border: 1px solid #dcdcdc; font-family: "Times New Roman", times;
  72  font-size: small; }
  73  // -->
  74  </style>
  75  <script type="text/javascript" src="popup.js"></script>
  76  <script type="text/javascript">
  77  //<![CDATA[
  78  function Init() {
  79    __dlg_init();
  80  }
  81  var chars = ["!","&quot;","#","$","%","&","'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","&lt;","=","&gt;","?","@","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","{","|","}","~","&euro;","ƒ","„","…","†","‡","ˆ","\‰","Š","‹","Œ","&lsquo;","&rsquo;","&rsquo;","&ldquo;","&rdquo;","•","&ndash;","&mdash;","˜","™","š","›","œ","Ÿ","&iexcl;","&cent;","&pound;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","­","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&Agrave;","&Aacute;","&Acirc;","&Atilde;","&Auml;","&Aring;","&AElig;","&Ccedil;","&Egrave;","&Eacute;","&Ecirc;","&Euml;","&Igrave;","&Iacute;","&Icirc;","&Iuml;","&ETH;","&Ntilde;","&Ograve;","&Oacute;","&Ocirc;","&Otilde;","&Ouml;","&times;","&Oslash;","&Ugrave;","&Uacute;","&Ucirc;","&Uuml;","&Yacute;","&THORN;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&uuml;","&yacute;","&thorn;","&yuml;"]
  82  
  83  function tab(w,h) {
  84      var strtab = ["<table border='0' cellspacing='0' cellpadding='0' align='center' bordercolor='#dcdcdc' bgcolor='#C0C0C0'>"]
  85      var k = 0;
  86      for(var i = 0; i < w; i++) {
  87          strtab[strtab.length] = "<tr>";
  88          for(var j = 0; j < h; j++) {
  89              strtab[strtab.length] = "<td class='chr' width='14' align='center' onClick='getchar(this)' onMouseOver='hover(this,true)' onMouseOut='hover(this,false)'>"+(chars[k]||'')+"</td>";
  90              k++;
  91          }
  92          strtab[strtab.length]="</tr>";
  93      }
  94      strtab[strtab.length] = "</table>";
  95      return strtab.join("\n");
  96  }
  97  
  98  function hover(obj,val) {
  99      if (!obj.innerHTML) {
 100          obj.style.cursor = "default";
 101          return;
 102      }
 103      obj.style.border = val ? "1px solid black" : "1px solid #dcdcdc";
 104      //obj.style.backgroundColor = val ? "black" : "#C0C0C0"
 105      //obj.style.color = val ? "white" : "black";
 106  }
 107  function getchar(obj) {
 108      if(!obj.innerHTML) return;
 109      var sChar = obj.innerHTML || "";
 110      __dlg_close(sChar);
 111      return false;
 112  }
 113  function cancel() {
 114      __dlg_close(null);
 115      return false;
 116  }
 117  //]]>
 118  </script>
 119  <title><?php print_string("choosechar","editor");?></title>
 120  </head>
 121  <body onload="Init()">
 122  <table class="dlg" cellpadding="0" cellspacing="2">
 123  <tr><td><table width="100%"><tr><td class="title" nowrap><?php print_string("choosechar","editor") ?></td></tr></table></td></tr>
 124  <tr>
 125  <td>
 126      <table border="0" align="center" cellpadding="5">
 127        <tr valign="top">
 128          <td>
 129  
 130         <script type="text/javascript">
 131         //<![CDATA[
 132         document.write(tab(7,32))
 133         //]]>
 134         </script>
 135  
 136          </td>
 137        </tr>
 138      </table>
 139      </td>
 140    </tr>
 141  <tr><td><table width="100%"><tr><td valign="middle" width="90%"><hr width="100%"></td></tr></table></td></tr>
 142  <tr><td align="right">
 143      <button type="button" onclick="cancel()"><?php print_string("close","editor") ?></button></td></tr>
 144  </table>
 145  </body>
 146  </body>
 147  </html>


Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7