made a copy
[atutor.git] / include / html / editor_tabs / content_code_picker.inc.php
1 <?php
2 /****************************************************************/
3 /* ATutor                                                                                                               */
4 /****************************************************************/
5 /* Copyright (c) 2002-2008 by Greg Gay & Joel Kronenberg        */
6 /* Adaptive Technology Resource Centre / University of Toronto  */
7 /* http://atutor.ca                                                                                             */
8 /*                                                              */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License  */
11 /* as published by the Free Software Foundation.                                */
12 /****************************************************************/
13 // $Id$
14
15 if (!defined('AT_INCLUDE_PATH')) { exit; }
16
17 ?>
18 <?php echo _AT('click_code'); ?>
19 <table border="0" cellspacing="0" cellpadding="0" width="100%">
20 <?php
21         if (isset($current_tab)) {
22                         echo '<tr><td align="right"><small><strong>'._AT('codes').': </strong></small></td><td><small>';
23                         echo '<a href="javascript:smilie(\'[?] [/?]\')" title="[?][/?]">',_AT('add_term'), '</a> ';
24                         echo '<a href="javascript:smilie(\'[code] [/code]\')" title="[code][/code]">'._AT('add_code').'</a>';
25                         echo '</small></td></tr>';
26         } ?>
27 <tr>
28         <td align="right"><small><b><?php echo _AT('colors'); ?>:</b></small></td>
29         <td><table border="0" cellspacing="2" cellpadding="0" summary="">
30         <tr>
31                 <td bgcolor="blue"><a href="javascript:smilie('[blue]', '[/blue]')" title="[blue] [/blue]"><img src="<?php echo $_base_path; ?>images/clr.gif" alt="<?php echo _AT('blue'); ?>" height="15" width="15" border="0" /></a></td>
32                 <td bgcolor="red"><a href="javascript:smilie('[red]', '[/red]')" title="[red] [/red]"><img src="<?php echo $_base_path; ?>images/clr.gif" alt="<?php echo _AT('red'); ?>" height="15" width="15" border="0" /></a></td>
33                 <td bgcolor="green"><a href="javascript:smilie('[green]', '[/green]')" title="[green] [/green]"><img src="<?php echo $_base_path; ?>images/clr.gif" alt="<?php echo _AT('green'); ?>" height="15" width="15" border="0" /></a></td>
34                 <td bgcolor="orange"><a href="javascript:smilie('[orange]', '[/orange]')" title="[orange] [/orange]"><img src="<?php echo $_base_path; ?>images/clr.gif" alt="<?php echo _AT('orange'); ?>" height="15" width="15" border="0" /></a></td>
35                 <td bgcolor="purple"><a href="javascript:smilie('[purple]', '[/purple]')" title="[purple] [/purple]"><img src="<?php echo $_base_path; ?>images/clr.gif" alt="<?php echo _AT('purple'); ?>" height="15" width="15" border="0" /></a></td>
36                 <td bgcolor="gray"><a href="javascript:smilie('[gray]', '[/gray]')" title="[gray] [/gray]"><img src="<?php echo $_base_path; ?>images/clr.gif" alt="<?php echo _AT('gray'); ?>" height="15" width="15" border="0" /></a></td>
37         </tr>
38         </table></td>
39 </tr>
40 </table>
41
42 <script type="text/javascript">
43 //<!--
44 function smilie(thesmilie, extra) {
45         if (document.form.setvisual.value == 1)
46                 if (!extra) {
47                         tinyMCE.execCommand("mceInsertContent", false, thesmilie);
48                 } else {
49                         tinyMCE.execCommand("mceInsertContent", false, thesmilie + extra);
50                 }
51         else
52                 if (!extra) {
53                         document.form.body_text.value += thesmilie+" ";
54                         document.form.body_text.focus();
55                 } else {
56                         document.form.body_text.value += thesmilie+extra+" ";
57                         document.form.body_text.focus();
58                 }
59 }
60 //--></script>