1 /***********************************************************************/
\r
3 /***********************************************************************/
\r
4 /* Copyright (c) 2002-2010 */
\r
5 /* Inclusive Design Institute */
\r
6 /* http://atutor.ca */
\r
8 /* This program is free software. You can redistribute it and/or */
\r
9 /* modify it under the terms of the GNU General Public License */
\r
10 /* as published by the Free Software Foundation. */
\r
11 /***********************************************************************/
\r
19 ATutor = ATutor || {};
\r
20 ATutor.mods = ATutor.mods || {};
\r
21 ATutor.mods.editor = ATutor.mods.editor || {};
\r
24 //initialises values to show or hide them
\r
25 var setupPage = function () {
\r
26 var textArea = jQuery("#textSpan");
\r
27 var textAreaId = "jb_description";
\r
28 if (jQuery("#html").attr("checked")) {
\r
29 if (ATutor.mods.editor.editor_pref !== '1' && !tinyMCE.get(textAreaId)) {
\r
30 tinyMCE.execCommand('mceAddControl', false, textAreaId);
\r
34 if (tinyMCE.get(textAreaId)) {
\r
35 tinyMCE.execCommand('mceRemoveControl', false, textAreaId);
\r
41 //set up click handlers and show/hide appropriate tools via setupPage
\r
42 var initialize = function () {
\r
43 jQuery("#formatting_radios > input").click(setupPage);
\r
47 jQuery(document).ready(initialize);
\r