From 6bebbe4503b88c423619662158517175865f5f54 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 23 Sep 2008 14:16:31 +0000 Subject: [PATCH] MDL-16627 removing obsoleted HTMLArea --- admin/settings/appearance.php | 6 +- lib/editor/htmlarea/coursefiles.php | 815 ----- lib/editor/htmlarea/dialog.js | 80 - lib/editor/htmlarea/htmlarea.class.php | 370 --- lib/editor/htmlarea/htmlarea.css | 180 -- lib/editor/htmlarea/htmlarea.php | 2822 ----------------- lib/editor/htmlarea/htmlarea_bak.php | 2304 -------------- lib/editor/htmlarea/images/ed_about.gif | Bin 87 -> 0 bytes .../htmlarea/images/ed_align_center.gif | Bin 69 -> 0 bytes .../htmlarea/images/ed_align_justify.gif | Bin 69 -> 0 bytes lib/editor/htmlarea/images/ed_align_left.gif | Bin 69 -> 0 bytes lib/editor/htmlarea/images/ed_align_right.gif | Bin 68 -> 0 bytes lib/editor/htmlarea/images/ed_anchor.gif | Bin 118 -> 0 bytes lib/editor/htmlarea/images/ed_blank.gif | Bin 56 -> 0 bytes lib/editor/htmlarea/images/ed_charmap.gif | Bin 143 -> 0 bytes lib/editor/htmlarea/images/ed_color_bg.gif | Bin 181 -> 0 bytes lib/editor/htmlarea/images/ed_color_fg.gif | Bin 171 -> 0 bytes lib/editor/htmlarea/images/ed_copy.gif | Bin 110 -> 0 bytes lib/editor/htmlarea/images/ed_custom.gif | Bin 67 -> 0 bytes lib/editor/htmlarea/images/ed_cut.gif | Bin 91 -> 0 bytes lib/editor/htmlarea/images/ed_delete.gif | Bin 90 -> 0 bytes lib/editor/htmlarea/images/ed_format_bold.gif | Bin 74 -> 0 bytes .../htmlarea/images/ed_format_italic.gif | Bin 77 -> 0 bytes .../htmlarea/images/ed_format_strike.gif | Bin 78 -> 0 bytes lib/editor/htmlarea/images/ed_format_sub.gif | Bin 78 -> 0 bytes lib/editor/htmlarea/images/ed_format_sup.gif | Bin 77 -> 0 bytes .../htmlarea/images/ed_format_underline.gif | Bin 85 -> 0 bytes lib/editor/htmlarea/images/ed_help.gif | Bin 70 -> 0 bytes lib/editor/htmlarea/images/ed_hr.gif | Bin 70 -> 0 bytes lib/editor/htmlarea/images/ed_html.gif | Bin 75 -> 0 bytes lib/editor/htmlarea/images/ed_image.gif | Bin 148 -> 0 bytes lib/editor/htmlarea/images/ed_indent_less.gif | Bin 87 -> 0 bytes lib/editor/htmlarea/images/ed_indent_more.gif | Bin 87 -> 0 bytes .../htmlarea/images/ed_left_to_right.gif | Bin 89 -> 0 bytes lib/editor/htmlarea/images/ed_link.gif | Bin 97 -> 0 bytes lib/editor/htmlarea/images/ed_list_bullet.gif | Bin 80 -> 0 bytes lib/editor/htmlarea/images/ed_list_num.gif | Bin 82 -> 0 bytes lib/editor/htmlarea/images/ed_nolink.gif | Bin 181 -> 0 bytes lib/editor/htmlarea/images/ed_paste.gif | Bin 164 -> 0 bytes lib/editor/htmlarea/images/ed_redo.gif | Bin 80 -> 0 bytes lib/editor/htmlarea/images/ed_replace.gif | Bin 124 -> 0 bytes .../htmlarea/images/ed_right_to_left.gif | Bin 88 -> 0 bytes lib/editor/htmlarea/images/ed_show_border.gif | Bin 104 -> 0 bytes lib/editor/htmlarea/images/ed_splitcel.gif | Bin 925 -> 0 bytes lib/editor/htmlarea/images/ed_undo.gif | Bin 81 -> 0 bytes lib/editor/htmlarea/images/ed_unlink.gif | Bin 889 -> 0 bytes lib/editor/htmlarea/images/ed_wordclean.gif | Bin 158 -> 0 bytes lib/editor/htmlarea/images/em.icon.smile.gif | Bin 962 -> 0 bytes lib/editor/htmlarea/images/folderup.gif | Bin 196 -> 0 bytes .../htmlarea/images/fullscreen_maximize.gif | Bin 97 -> 0 bytes .../htmlarea/images/fullscreen_minimize.gif | Bin 97 -> 0 bytes lib/editor/htmlarea/images/icon_ins_char.gif | Bin 169 -> 0 bytes lib/editor/htmlarea/images/icon_smile.gif | Bin 244 -> 0 bytes lib/editor/htmlarea/images/insert_table.gif | Bin 121 -> 0 bytes lib/editor/htmlarea/images/kbhelp.gif | Bin 341 -> 0 bytes lib/editor/htmlarea/images/spell-check.gif | Bin 107 -> 0 bytes lib/editor/htmlarea/index.html | 0 lib/editor/htmlarea/lang/en.js | 63 - lib/editor/htmlarea/lang/en.php | 91 - lib/editor/htmlarea/license.txt | 13 - .../htmlarea/plugins/GetHtml/get-html.js | 203 -- .../plugins/SpellChecker/img/spell-check.gif | Bin 107 -> 0 bytes .../htmlarea/plugins/SpellChecker/lang/en.js | 37 - .../htmlarea/plugins/SpellChecker/lang/ro.js | 37 - .../plugins/SpellChecker/readme-tech.html | 115 - .../SpellChecker/spell-check-logic.cgi | 155 - .../SpellChecker/spell-check-style.css | 10 - .../plugins/SpellChecker/spell-check-ui.html | 119 - .../plugins/SpellChecker/spell-check-ui.js | 334 -- .../plugins/SpellChecker/spell-checker.js | 72 - .../TableOperations/img/cell-delete.gif | Bin 101 -> 0 bytes .../TableOperations/img/cell-insert-after.gif | Bin 118 -> 0 bytes .../img/cell-insert-before.gif | Bin 118 -> 0 bytes .../TableOperations/img/cell-merge.gif | Bin 896 -> 0 bytes .../plugins/TableOperations/img/cell-prop.gif | Bin 155 -> 0 bytes .../TableOperations/img/cell-split.gif | Bin 907 -> 0 bytes .../TableOperations/img/col-delete.gif | Bin 100 -> 0 bytes .../TableOperations/img/col-insert-after.gif | Bin 111 -> 0 bytes .../TableOperations/img/col-insert-before.gif | Bin 110 -> 0 bytes .../plugins/TableOperations/img/col-split.gif | Bin 908 -> 0 bytes .../TableOperations/img/row-delete.gif | Bin 104 -> 0 bytes .../TableOperations/img/row-insert-above.gif | Bin 116 -> 0 bytes .../TableOperations/img/row-insert-under.gif | Bin 115 -> 0 bytes .../plugins/TableOperations/img/row-prop.gif | Bin 149 -> 0 bytes .../plugins/TableOperations/img/row-split.gif | Bin 895 -> 0 bytes .../TableOperations/img/table-prop.gif | Bin 145 -> 0 bytes .../plugins/TableOperations/lang/en.js | 90 - .../plugins/TableOperations/lang/fi.js | 66 - .../plugins/TableOperations/lang/ro.js | 90 - .../plugins/TableOperations/makefile.xml | 7 - .../TableOperations/table-operations.js | 1167 ------- lib/editor/htmlarea/popupdiv.js | 369 --- lib/editor/htmlarea/popups/about.html | 55 - lib/editor/htmlarea/popups/blank.html | 2 - lib/editor/htmlarea/popups/createanchor.php | 73 - lib/editor/htmlarea/popups/dialog.css | 72 - lib/editor/htmlarea/popups/dlg_ins_char.php | 147 - lib/editor/htmlarea/popups/dlg_ins_smile.php | 131 - lib/editor/htmlarea/popups/editor_help.html | 16 - lib/editor/htmlarea/popups/fullscreen.php | 174 - lib/editor/htmlarea/popups/insert_image.php | 338 -- .../htmlarea/popups/insert_image_std.php | 230 -- lib/editor/htmlarea/popups/insert_table.php | 178 -- lib/editor/htmlarea/popups/link.php | 155 - lib/editor/htmlarea/popups/link_std.php | 187 -- lib/editor/htmlarea/popups/popup.js | 86 - lib/editor/htmlarea/popups/preview.php | 31 - .../htmlarea/popups/searchandreplace.php | 147 - lib/editor/htmlarea/popups/select_color.php | 363 --- lib/editor/htmlarea/popupwin.js | 127 - lib/editor/htmlarea/release-notes.html | 82 - 111 files changed, 4 insertions(+), 12205 deletions(-) delete mode 100644 lib/editor/htmlarea/coursefiles.php delete mode 100644 lib/editor/htmlarea/dialog.js delete mode 100644 lib/editor/htmlarea/htmlarea.class.php delete mode 100644 lib/editor/htmlarea/htmlarea.css delete mode 100644 lib/editor/htmlarea/htmlarea.php delete mode 100644 lib/editor/htmlarea/htmlarea_bak.php delete mode 100644 lib/editor/htmlarea/images/ed_about.gif delete mode 100644 lib/editor/htmlarea/images/ed_align_center.gif delete mode 100644 lib/editor/htmlarea/images/ed_align_justify.gif delete mode 100644 lib/editor/htmlarea/images/ed_align_left.gif delete mode 100644 lib/editor/htmlarea/images/ed_align_right.gif delete mode 100644 lib/editor/htmlarea/images/ed_anchor.gif delete mode 100644 lib/editor/htmlarea/images/ed_blank.gif delete mode 100644 lib/editor/htmlarea/images/ed_charmap.gif delete mode 100644 lib/editor/htmlarea/images/ed_color_bg.gif delete mode 100644 lib/editor/htmlarea/images/ed_color_fg.gif delete mode 100644 lib/editor/htmlarea/images/ed_copy.gif delete mode 100644 lib/editor/htmlarea/images/ed_custom.gif delete mode 100644 lib/editor/htmlarea/images/ed_cut.gif delete mode 100644 lib/editor/htmlarea/images/ed_delete.gif delete mode 100644 lib/editor/htmlarea/images/ed_format_bold.gif delete mode 100644 lib/editor/htmlarea/images/ed_format_italic.gif delete mode 100644 lib/editor/htmlarea/images/ed_format_strike.gif delete mode 100644 lib/editor/htmlarea/images/ed_format_sub.gif delete mode 100644 lib/editor/htmlarea/images/ed_format_sup.gif delete mode 100644 lib/editor/htmlarea/images/ed_format_underline.gif delete mode 100644 lib/editor/htmlarea/images/ed_help.gif delete mode 100644 lib/editor/htmlarea/images/ed_hr.gif delete mode 100644 lib/editor/htmlarea/images/ed_html.gif delete mode 100644 lib/editor/htmlarea/images/ed_image.gif delete mode 100644 lib/editor/htmlarea/images/ed_indent_less.gif delete mode 100644 lib/editor/htmlarea/images/ed_indent_more.gif delete mode 100644 lib/editor/htmlarea/images/ed_left_to_right.gif delete mode 100644 lib/editor/htmlarea/images/ed_link.gif delete mode 100644 lib/editor/htmlarea/images/ed_list_bullet.gif delete mode 100644 lib/editor/htmlarea/images/ed_list_num.gif delete mode 100644 lib/editor/htmlarea/images/ed_nolink.gif delete mode 100644 lib/editor/htmlarea/images/ed_paste.gif delete mode 100644 lib/editor/htmlarea/images/ed_redo.gif delete mode 100644 lib/editor/htmlarea/images/ed_replace.gif delete mode 100644 lib/editor/htmlarea/images/ed_right_to_left.gif delete mode 100644 lib/editor/htmlarea/images/ed_show_border.gif delete mode 100644 lib/editor/htmlarea/images/ed_splitcel.gif delete mode 100644 lib/editor/htmlarea/images/ed_undo.gif delete mode 100644 lib/editor/htmlarea/images/ed_unlink.gif delete mode 100644 lib/editor/htmlarea/images/ed_wordclean.gif delete mode 100644 lib/editor/htmlarea/images/em.icon.smile.gif delete mode 100644 lib/editor/htmlarea/images/folderup.gif delete mode 100644 lib/editor/htmlarea/images/fullscreen_maximize.gif delete mode 100644 lib/editor/htmlarea/images/fullscreen_minimize.gif delete mode 100644 lib/editor/htmlarea/images/icon_ins_char.gif delete mode 100644 lib/editor/htmlarea/images/icon_smile.gif delete mode 100644 lib/editor/htmlarea/images/insert_table.gif delete mode 100644 lib/editor/htmlarea/images/kbhelp.gif delete mode 100644 lib/editor/htmlarea/images/spell-check.gif delete mode 100644 lib/editor/htmlarea/index.html delete mode 100644 lib/editor/htmlarea/lang/en.js delete mode 100644 lib/editor/htmlarea/lang/en.php delete mode 100644 lib/editor/htmlarea/license.txt delete mode 100644 lib/editor/htmlarea/plugins/GetHtml/get-html.js delete mode 100644 lib/editor/htmlarea/plugins/SpellChecker/img/spell-check.gif delete mode 100644 lib/editor/htmlarea/plugins/SpellChecker/lang/en.js delete mode 100644 lib/editor/htmlarea/plugins/SpellChecker/lang/ro.js delete mode 100644 lib/editor/htmlarea/plugins/SpellChecker/readme-tech.html delete mode 100644 lib/editor/htmlarea/plugins/SpellChecker/spell-check-logic.cgi delete mode 100644 lib/editor/htmlarea/plugins/SpellChecker/spell-check-style.css delete mode 100644 lib/editor/htmlarea/plugins/SpellChecker/spell-check-ui.html delete mode 100644 lib/editor/htmlarea/plugins/SpellChecker/spell-check-ui.js delete mode 100644 lib/editor/htmlarea/plugins/SpellChecker/spell-checker.js delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/cell-delete.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/cell-insert-after.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/cell-insert-before.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/cell-merge.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/cell-prop.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/cell-split.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/col-delete.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/col-insert-after.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/col-insert-before.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/col-split.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/row-delete.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/row-insert-above.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/row-insert-under.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/row-prop.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/row-split.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/img/table-prop.gif delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/lang/en.js delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/lang/fi.js delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/lang/ro.js delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/makefile.xml delete mode 100644 lib/editor/htmlarea/plugins/TableOperations/table-operations.js delete mode 100644 lib/editor/htmlarea/popupdiv.js delete mode 100644 lib/editor/htmlarea/popups/about.html delete mode 100644 lib/editor/htmlarea/popups/blank.html delete mode 100644 lib/editor/htmlarea/popups/createanchor.php delete mode 100644 lib/editor/htmlarea/popups/dialog.css delete mode 100644 lib/editor/htmlarea/popups/dlg_ins_char.php delete mode 100644 lib/editor/htmlarea/popups/dlg_ins_smile.php delete mode 100644 lib/editor/htmlarea/popups/editor_help.html delete mode 100644 lib/editor/htmlarea/popups/fullscreen.php delete mode 100644 lib/editor/htmlarea/popups/insert_image.php delete mode 100644 lib/editor/htmlarea/popups/insert_image_std.php delete mode 100644 lib/editor/htmlarea/popups/insert_table.php delete mode 100644 lib/editor/htmlarea/popups/link.php delete mode 100644 lib/editor/htmlarea/popups/link_std.php delete mode 100644 lib/editor/htmlarea/popups/popup.js delete mode 100644 lib/editor/htmlarea/popups/preview.php delete mode 100644 lib/editor/htmlarea/popups/searchandreplace.php delete mode 100644 lib/editor/htmlarea/popups/select_color.php delete mode 100644 lib/editor/htmlarea/popupwin.js delete mode 100644 lib/editor/htmlarea/release-notes.html diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php index 874aacafe2..b1ff88954d 100644 --- a/admin/settings/appearance.php +++ b/admin/settings/appearance.php @@ -61,6 +61,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page $temp->add(new admin_setting_emoticons()); $ADMIN->add('htmleditor', $temp); +/* TODO: before deleting these settings migrate or drop config values! $temp = new admin_settingpage('htmlarea', get_string('htmlarea', 'admin')); $temp->add(new admin_setting_configtext('editorbackgroundcolor', get_string('editorbackgroundcolor', 'admin'), get_string('edhelpbgcolor'), '#ffffff', PARAM_NOTAGS)); $temp->add(new admin_setting_configtext('editorfontfamily', get_string('editorfontfamily', 'admin'), get_string('edhelpfontfamily'), 'Trebuchet MS,Verdana,Arial,Helvetica,sans-serif', PARAM_NOTAGS)); @@ -73,12 +74,13 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page } $temp->add(new admin_setting_special_editorhidebuttons()); $ADMIN->add('htmleditor', $temp); +*/ - $temp = new admin_settingpage('tinymce', get_string('tinymce', 'admin')); + $temp = new admin_settingpage('tinymce', 'TinyMCE'); // add tinymce configuration options here $ADMIN->add('htmleditor', $temp); - // "htmlsettings" settingpage + // "htmlsettings" settingpage $temp = new admin_settingpage('htmlsettings', get_string('htmlsettings', 'admin')); $temp->add(new admin_setting_configcheckbox('formatstringstriptags', get_string('stripalltitletags', 'admin'), get_string('configstripalltitletags', 'admin'), 1)); $ADMIN->add('appearance', $temp); diff --git a/lib/editor/htmlarea/coursefiles.php b/lib/editor/htmlarea/coursefiles.php deleted file mode 100644 index bb9d928886..0000000000 --- a/lib/editor/htmlarea/coursefiles.php +++ /dev/null @@ -1,815 +0,0 @@ -libdir.'/filelib.php'); - -error('Not reimplemented yet, sorry'); - - $id = required_param('id', PARAM_INT); - $file = optional_param('file', '', PARAM_PATH); - $wdir = optional_param('wdir', '', PARAM_PATH); - $action = optional_param('action', '', PARAM_ACTION); - $name = optional_param('name', '', PARAM_FILE); - $oldname = optional_param('oldname', '', PARAM_FILE); - $usecheckboxes = optional_param('usecheckboxes', 1, PARAM_INT); - $save = optional_param('save', 0, PARAM_BOOL); - $text = optional_param('text', '', PARAM_RAW); - $confirm = optional_param('confirm', 0, PARAM_BOOL); - - - if (! $course = $DB->get_record("course", array("id"=>$id))) { - print_error('invalidcourseid'); - } - - require_login($course); - require_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $id)); - - function html_footer() { - echo "\n\n\n"; - } - - function html_header($course, $wdir, $formfield=""){ - - global $CFG; - - ?> - - - - - coursefiles - - - - - - id")) { - print_error('cannotcreateuploaddir'); - } - - $baseweb = $CFG->wwwroot; - -// End of configuration and access control - - - if ($wdir == '') { - $wdir='/'; - } - - switch ($action) { - - case "upload": - html_header($course, $wdir); - require_once($CFG->dirroot.'/lib/uploadlib.php'); - - if ($save and confirm_sesskey()) { - $um = new upload_manager('userfile',false,false,$course,false,0); - $dir = "$basedir$wdir"; - if ($um->process_file_uploads($dir)) { - notify(get_string('uploadedfile')); - } - // um will take care of error reporting. - displaydir($wdir); - } else { - $upload_max_filesize = get_max_upload_file_size($CFG->maxbytes); - $filesize = display_size($upload_max_filesize); - - $struploadafile = get_string("uploadafile"); - $struploadthisfile = get_string("uploadthisfile"); - $strmaxsize = get_string("maxsize", "", $filesize); - $strcancel = get_string("cancel"); - - echo "

$struploadafile ($strmaxsize) --> $wdir"; - echo "\n\n\n
\n"; - echo "
\n"; - upload_print_form_fragment(1,array('userfile'),null,false,null,$course->maxbytes,0,false); - echo " \n"; - echo " \n"; - echo " \n"; - echo " sesskey\" />\n"; - echo "
"; - echo " \n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo "
\n"; - } - html_footer(); - break; - - case "delete": - if ($confirm and confirm_sesskey()) { - html_header($course, $wdir); - foreach ($USER->filelist as $file) { - $fullfile = $basedir.$file; - if (! fulldelete($fullfile)) { - echo "
Error: Could not delete: $fullfile"; - } - } - clearfilelist(); - displaydir($wdir); - html_footer(); - - } else { - html_header($course, $wdir); - if (setfilelist($_POST)) { - echo "

".get_string("deletecheckwarning").":

"; - print_simple_box_start("center"); - printfilelist($USER->filelist); - print_simple_box_end(); - echo "
"; - $frameold = $CFG->framename; - $CFG->framename = "ibrowser"; - notice_yesno (get_string("deletecheckfiles"), - "coursefiles.php?id=$id&wdir=$wdir&action=delete&confirm=1&sesskey=$USER->sesskey", - "coursefiles.php?id=$id&wdir=$wdir&action=cancel"); - $CFG->framename = $frameold; - } else { - displaydir($wdir); - } - html_footer(); - } - break; - - case "move": - html_header($course, $wdir); - if ($count = setfilelist($_POST) and confirm_sesskey()) { - $USER->fileop = $action; - $USER->filesource = $wdir; - echo "

"; - print_string("selectednowmove", "moodle", $count); - echo "

"; - } - displaydir($wdir); - html_footer(); - break; - - case "paste": - html_header($course, $wdir); - if (isset($USER->fileop) and $USER->fileop == "move" and confirm_sesskey()) { - foreach ($USER->filelist as $file) { - $shortfile = basename($file); - $oldfile = $basedir.$file; - $newfile = $basedir.$wdir."/".$shortfile; - if (!rename($oldfile, $newfile)) { - echo "

Error: $shortfile not moved"; - } - } - } - clearfilelist(); - displaydir($wdir); - html_footer(); - break; - - case "rename": - if (!empty($name) and confirm_sesskey()) { - html_header($course, $wdir); - $name = clean_filename($name); - if (file_exists($basedir.$wdir."/".$name)) { - echo "Error: $name already exists!"; - } else if (!@rename($basedir.$wdir."/".$oldname, $basedir.$wdir."/".$name)) { - echo "Error: could not rename $oldname to $name"; - } - displaydir($wdir); - - } else { - $strrename = get_string("rename"); - $strcancel = get_string("cancel"); - $strrenamefileto = get_string("renamefileto", "moodle", $file); - html_header($course, $wdir, "form.name"); - echo "

$strrenamefileto:"; - echo "\n\n\n
\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " sesskey\" />\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo "
\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
"; - echo "
\n"; - } - html_footer(); - break; - - case "mkdir": - if (!empty($name) and confirm_sesskey()) { - html_header($course, $wdir); - $name = clean_filename($name); - if (file_exists("$basedir$wdir/$name")) { - echo "Error: $name already exists!"; - } else if (! make_upload_directory("$course->id/$wdir/$name")) { - echo "Error: could not create $name"; - } - displaydir($wdir); - - } else { - $strcreate = get_string("create"); - $strcancel = get_string("cancel"); - $strcreatefolder = get_string("createfolder", "moodle", $wdir); - html_header($course, $wdir, "form.name"); - echo "

$strcreatefolder:"; - echo "\n\n\n
\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " sesskey\" />\n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo "
\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo "
\n"; - } - html_footer(); - break; - - case "edit": - html_header($course, $wdir); - if (($text != '') and confirm_sesskey()) { - $fileptr = fopen($basedir.$file,"w"); - fputs($fileptr, $text); - fclose($fileptr); - displaydir($wdir); - - } else { - $streditfile = get_string("edit", "", "$file"); - $fileptr = fopen($basedir.$file, "r"); - $contents = fread($fileptr, filesize($basedir.$file)); - fclose($fileptr); - - print_heading("$streditfile"); - - echo "\n\n\n\n
\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " "; - echo " \n"; - echo " sesskey\" />\n"; - print_textarea(false, 25, 80, 680, 400, "text", $contents); - echo "
\n"; - echo " \n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo "
\n"; - - if ($usehtmleditor) { - use_html_editor("text"); - } - - - } - html_footer(); - break; - - case "zip": - if (!empty($name) and confirm_sesskey()) { - html_header($course, $wdir); - $name = clean_filename($name); - - $files = array(); - foreach ($USER->filelist as $file) { - $files[] = "$basedir/$file"; - } - - if (!zip_files($files,"$basedir/$wdir/$name")) { - print_error('zipfileserror'); - } - - clearfilelist(); - displaydir($wdir); - - } else { - html_header($course, $wdir, "form.name"); - - if (setfilelist($_POST)) { - echo "

".get_string("youareabouttocreatezip").":

"; - print_simple_box_start("center"); - printfilelist($USER->filelist); - print_simple_box_end(); - echo "
"; - echo "

".get_string("whattocallzip"); - echo "\n\n\n\n\n
\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " sesskey\" />\n"; - echo " \n"; - echo " "; - echo "
\n"; - echo "
\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo "
\n"; - } else { - displaydir($wdir); - clearfilelist(); - } - } - html_footer(); - break; - - case "unzip": - html_header($course, $wdir); - if (!empty($file) and confirm_sesskey()) { - $strok = get_string("ok"); - $strunpacking = get_string("unpacking", "", $file); - - echo "

$strunpacking:

"; - - $file = basename($file); - - if (!unzip_file("$basedir/$wdir/$file")) { - print_error("unzipfileserror","error"); - } - - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo "
\n"; - } else { - displaydir($wdir); - } - html_footer(); - break; - - case "listzip": - html_header($course, $wdir); - if (!empty($file) and confirm_sesskey()) { - $strname = get_string("name"); - $strsize = get_string("size"); - $strmodified = get_string("modified"); - $strok = get_string("ok"); - $strlistfiles = get_string("listfiles", "", $file); - - echo "

$strlistfiles:

"; - $file = basename($file); - - require_once($CFG->libdir.'/pclzip/pclzip.lib.php'); - $archive = new PclZip("$basedir/$wdir/$file"); - if (!$list = $archive->listContent("$basedir/$wdir")) { - notify($archive->errorInfo(true)); - - } else { - echo "\n"; - echo "\n"; - foreach ($list as $item) { - echo ""; - print_cell("left", $item['filename']); - if (! $item['folder']) { - print_cell("right", display_size($item['size'])); - } else { - echo "\n"; - } - $filedate = userdate($item['mtime'], get_string("strftimedatetime")); - print_cell("right", $filedate); - echo "\n"; - } - echo "
$strname$strsize$strmodified
 
\n"; - } - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " sesskey\" />\n"; - echo " \n"; - echo "
\n"; - echo "
\n"; - } else { - displaydir($wdir); - } - html_footer(); - break; - - case "cancel": - clearfilelist(); - - default: - html_header($course, $wdir); - displaydir($wdir); - html_footer(); - break; -} - - -/// FILE FUNCTIONS /////////////////////////////////////////////////////////// - - -function setfilelist($VARS) { - global $USER; - - $USER->filelist = array (); - $USER->fileop = ""; - - $count = 0; - foreach ($VARS as $key => $val) { - if (substr($key,0,4) == "file") { - $count++; - $val = rawurldecode($val); - if (!detect_munged_arguments($val, 0)) { - $USER->filelist[] = $val; - } - } - } - return $count; -} - -function clearfilelist() { - global $USER; - - $USER->filelist = array (); - $USER->fileop = ""; -} - - -function printfilelist($filelist) { - global $basedir, $CFG; - - foreach ($filelist as $file) { - if (is_dir($basedir.$file)) { - echo "pixpath/f/folder.gif\" class=\"icon\" alt=\"".get_string('folder')."\" /> $file
"; - $subfilelist = array(); - $currdir = opendir($basedir.$file); - while (false !== ($subfile = readdir($currdir))) { - if ($subfile <> ".." && $subfile <> ".") { - $subfilelist[] = $file."/".$subfile; - } - } - printfilelist($subfilelist); - - } else { - $icon = mimeinfo("icon", $file); - echo "pixpath/f/$icon\" class=\"icon\" alt=\"".get_string('file')."\" /> $file
"; - } - } -} - - -function print_cell($alignment="center", $text=" ") { - echo "\n"; - echo "$text"; - echo "\n"; -} - -function get_image_size($filepath) { -/// This function get's the image size - - /// Check if file exists - if(!file_exists($filepath)) { - return false; - } else { - /// Get the mime type so it really an image. - if(mimeinfo("icon", basename($filepath)) != "image.gif") { - return false; - } else { - $array_size = getimagesize($filepath); - return $array_size; - } - } - unset($filepath,$array_size); -} - -function displaydir ($wdir) { -// $wdir == / or /a or /a/b/c/d etc - - global $basedir; - global $usecheckboxes; - global $id; - global $USER, $CFG; - - $fullpath = $basedir.$wdir; - - $directory = opendir($fullpath); // Find all files - while (false !== ($file = readdir($directory))) { - if ($file == "." || $file == "..") { - continue; - } - - if (is_dir($fullpath."/".$file)) { - $dirlist[] = $file; - } else { - $filelist[] = $file; - } - } - closedir($directory); - - $strfile = get_string("file"); - $strname = get_string("name"); - $strsize = get_string("size"); - $strmodified = get_string("modified"); - $straction = get_string("action"); - $strmakeafolder = get_string("makeafolder"); - $struploadafile = get_string("uploadafile"); - $strwithchosenfiles = get_string("withchosenfiles"); - $strmovetoanotherfolder = get_string("movetoanotherfolder"); - $strmovefilestohere = get_string("movefilestohere"); - $strdeletecompletely = get_string("deletecompletely"); - $strcreateziparchive = get_string("createziparchive"); - $strrename = get_string("rename"); - $stredit = get_string("edit"); - $strunzip = get_string("unzip"); - $strlist = get_string("list"); - $strchoose = get_string("choose"); - - - echo "
\n"; - echo "\n"; - - if ($wdir == "/") { - $wdir = ""; - } else { - $bdir = str_replace("/".basename($wdir),"",$wdir); - if($bdir == "/") { - $bdir = ""; - } - print "\n\n\n"; - } - - $count = 0; - - if (!empty($dirlist)) { - asort($dirlist); - foreach ($dirlist as $dir) { - - $count++; - - $filename = $fullpath."/".$dir; - $fileurl = $wdir."/".$dir; - $filedate = userdate(filemtime($filename), "%d %b %Y, %I:%M %p"); - - echo ""; - - if ($usecheckboxes) { - print_cell("center", ""); - } - print_cell("left", "pixpath/f/folder.gif\" class=\"icon\" alt=\"".get_string('folder')."\" />".htmlspecialchars($dir).""); - print_cell("right", " "); - print_cell("right", $filedate); - - echo ""; - } - } - - - if (!empty($filelist)) { - asort($filelist); - foreach ($filelist as $file) { - - $icon = mimeinfo("icon", $file); - $imgtype = mimeinfo("type",$file); - - $count++; - $filename = $fullpath."/".$file; - $fileurl = "$wdir/$file"; - $filedate = userdate(filemtime($filename), "%d %b %Y, %I:%M %p"); - - $dimensions = get_image_size($filename); - if($dimensions) { - $imgwidth = $dimensions[0]; - $imgheight = $dimensions[1]; - } else { - $imgwidth = "Unknown"; - $imgheight = "Unknown"; - } - unset($dimensions); - echo "\n"; - - if ($usecheckboxes) { - print_cell("center", ""); - } - echo "\n"; - - if ($icon == "zip.gif") { - $edittext = "sesskey\">$strunzip "; - $edittext .= "sesskey\">$strlist "; - } else { - $edittext = " "; - } - print_cell("right", "$edittext "); - print_cell("right", $filedate); - - echo "\n"; - } - } - echo "
"; - print ""; - print "wwwroot/lib/editor/htmlarea/images/folderup.gif\" height=\"14\" width=\"24\" border=\"0\" alt=\"".get_string('parentfolder')."\" />"; - print "
"; - $ffurl = get_file_url($id.$fileurl); - link_to_popup_window ($ffurl, "display", - "pixpath/f/$icon\" class=\"icon\" alt=\"$strfile\" />", - 480, 640); - $file_size = filesize($filename); - - echo "$file"; - echo "
\n"; - - if (empty($wdir)) { - $wdir = "/"; - } - - echo "\n"; - echo "\n\n"; - echo "
"; - echo "\n"; - echo "\n"; - echo "sesskey\" />\n"; - $options = array ( - "move" => "$strmovetoanotherfolder", - "delete" => "$strdeletecompletely", - "zip" => "$strcreateziparchive" - ); - if (!empty($count)) { - choose_from_menu ($options, "action", "", "$strwithchosenfiles...", "javascript:getElementById('dirform').submit()"); - } - if (!empty($USER->fileop) and ($USER->fileop == "move") and ($USER->filesource <> $wdir)) { - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " sesskey\" />\n"; - echo " \n"; - echo ""; - } - echo "
\n"; - echo "\n"; -} -?> diff --git a/lib/editor/htmlarea/dialog.js b/lib/editor/htmlarea/dialog.js deleted file mode 100644 index 2a9f8a30f1..0000000000 --- a/lib/editor/htmlarea/dialog.js +++ /dev/null @@ -1,80 +0,0 @@ -// $Id$ -// Though "Dialog" looks like an object, it isn't really an object. Instead -// it's just namespace for protecting global symbols. - -function Dialog(url, action, init) { - if (typeof init == "undefined") { - init = window; // pass this window object by default - } - Dialog._geckoOpenModal(url, action, init); -}; - -Dialog._parentEvent = function(ev) { - if (Dialog._modal && !Dialog._modal.closed) { - Dialog._modal.focus(); - HTMLArea._stopEvent(ev); - } -}; - -// should be a function, the return handler of the currently opened dialog. -Dialog._return = null; - -// constant, the currently opened dialog -Dialog._modal = null; - -// the dialog will read it's args from this variable -Dialog._arguments = null; - -Dialog._geckoOpenModal = function(url, action, init) { - - var file = url.substring(url.lastIndexOf('/') + 1, url.lastIndexOf('.')); - var x,y; - switch(file) { - case "insert_image": x = 730; y = 560; break; - case "dlg_ins_smile": x = 330; y = 320; break; - case "dlg_ins_char": x = 480; y = 290; break; - case "select_color": x = 238; y = 195; break; - case "insert_table": x = 420; y = 250; break; - case "link_std": x = 420; y = 230; break; - case "insert_image_std": x = 450; y = 240; break; - case "createanchor": x = 300; y = 140; break; - case "searchandreplace": x = 400; y = 250; break; - default: x = 50; y = 50; - } - - var lx = (screen.width - x) / 2; - var tx = (screen.height - y) / 2; - var dlg = window.open(url, "ha_dialog", "toolbar=no,menubar=no,personalbar=no, width="+ x +",height="+ y +",scrollbars=no,resizable=no, left="+ lx +", top="+ tx +""); - Dialog._modal = dlg; - Dialog._arguments = init; - - // capture some window's events - function capwin(w) { - HTMLArea._addEvent(w, "click", Dialog._parentEvent); - HTMLArea._addEvent(w, "mousedown", Dialog._parentEvent); - HTMLArea._addEvent(w, "focus", Dialog._parentEvent); - }; - // release the captured events - function relwin(w) { - HTMLArea._removeEvent(w, "click", Dialog._parentEvent); - HTMLArea._removeEvent(w, "mousedown", Dialog._parentEvent); - HTMLArea._removeEvent(w, "focus", Dialog._parentEvent); - }; - capwin(window); - // capture other frames - if(document.all) { - for (var i = 0; i < window.frames.length; capwin(window.frames[i++])); - } - // make up a function to be called when the Dialog ends. - Dialog._return = function (val) { - relwin(window); - // capture other frames - if(document.all) { - for (var i = 0; i < window.frames.length; relwin(window.frames[i++])); - } - if (val && action) { - action(val); - } - Dialog._modal = null; - }; -}; diff --git a/lib/editor/htmlarea/htmlarea.class.php b/lib/editor/htmlarea/htmlarea.class.php deleted file mode 100644 index f4f288caa8..0000000000 --- a/lib/editor/htmlarea/htmlarea.class.php +++ /dev/null @@ -1,370 +0,0 @@ - 'string', 'height' => 'string', 'statusBar' => 'bool', - 'undoSteps' => 'int', 'undoTimeout' => 'int', - 'sizeIncludeToolbar' => 'bool', 'fullPage' => 'bool', - 'pageStyle' => 'string', 'killWordOnPaste' => 'bool', - 'toolbar' => 'array', 'fontname' => 'assoc', 'fontsize' => 'assoc', - 'formatblock' => 'assoc', 'customSelects' => 'array'); - - /** - * Array of default configuration set via editor settings. - * @var array $defaults - */ - var $defaults = array(); - - /** - * PHP4 style class constructor. - * - * @param int $courseid Courseid. - */ - function htmlarea($courseid) { - parent::editorObject(); - $this->courseid = clean_param($courseid, PARAM_INT); - - $pagestyle = 'body {'; - $pagestyle .= !empty($this->cfg->editorbackgroundcolor) ? - ' background-color: '. $this->cfg->editorbackgroundcolor .'; ' : ''; - $pagestyle .= !empty($this->cfg->editorfontfamily) ? - ' font-family: '. $this->cfg->editorfontfamily .';' : ''; - $pagestyle .= !empty($this->cfg->editorfontsize) ? - ' font-size: '. $this->cfg->editorfontsize .';' : ''; - $pagestyle .= '}'; - - $this->defaults['pageStyle'] = $pagestyle; - $this->defaults['killWordOnPaste'] = !empty($this->cfg->editorkillword) ? true : false; - - $fontlist = isset($this->cfg->editorfontlist) ? explode(';', $this->cfg->editorfontlist) : array(); - $fonts = array(); - foreach ( $fontlist as $fontline ) { - if ( !empty($fontline) ) { - list($fontkey, $fontvalue) = split(":", $fontline); - $fonts[$fontkey] = $fontvalue; - } - } - $this->defaults['fontname'] = $fonts; - $this->defaults['hideSomeButtons'] = !empty($this->cfg->editorhidebuttons) ? - ' '. $this->cfg->editorhidebuttons .' ' : ''; - - } - - /** - * PHP5 style class constructor. - * @param int $courseid Course id. - */ - function __construct($courseid) { - $this->htmlarea($courseid); - } - - /** - * Check if passed configuration key is valid. - * @param string $key - * @return bool Return true if key is valid and false if it's not. - */ - function __is_valid_key($key) { - if ( in_array($key, $this->htmlareaconfkeys) ) { - return true; - } - return false; - } - - /** - * Check if passed value's type is valid. - * @param string $key Configuration key name. - * @param mixed $value Configuration value. - * @return bool Returns true if value is valid type and false if it's not. - */ - function __is_valid_value_type($key, $value) { - - if ( !empty($this->htmlareaconfkeytypes[$key]) ) { - $keytype = $this->htmlareaconfkeytypes[$key]; - - switch ( $keytype ) { - case 'bool': - if ( is_bool($value) ) { - return true; - } - break; - case 'string': - if ( is_string($value) ) { - return true; - } - break; - case 'int': - if ( is_int($value) ) { - return true; - } - break; - case 'array': - if ( is_array($value) ) { - return true; - } - break; - case 'assoc': - if ( is_array($value) ) { - // Check first key. - $key = key($value); - if ( preg_match("/[a-z]+/i", $key) ) { - return true; - } - } - break; - default: - } - } - return false; - } - - /** - * Sets configuration key and value pairs. - * Passed parameters can be key and value pair or - * an associative array of keys and values. - * @todo code example - */ - function setconfig() { - - $numargs = func_num_args(); - - switch ( $numargs ) { - case 1: // Must be an array. - $args = func_get_arg(0); - if ( !is_array($args) ) { - $this->error("Passed argument is not an array!!!"); - } - foreach ( $args as $key => $value ) { - if ( !preg_match("/[a-z]+/i", $key) && !$this->__is_valid_key($key) ) { - $this->error("Invalid configuration key!!!"); - } - if ( $this->__is_valid_value_type($key, $value) ) { - $this->htmlareaconf[$key] = $value; - } else { - $this->error("Invalid key, value pair!!!"); - } - } - break; - case 2: // Must be key, value pair. - $key = func_get_arg(0); - $value = func_get_arg(1); - if ( empty($key) or !isset($value) ) { - $this->error("Empty key or value passed!!!"); - } - if ( !preg_match("/[a-z]+/i", $key) ) { - $this->error("Configuration key must be a string!!"); - } - - if ( !$this->__is_valid_key($key) ) { - $this->error("Invalid configuration key!!!"); - } - - if ( $this->__is_valid_value_type($key, $value) ) { - $this->htmlareaconf[$key] = $value; - } else { - $this->error("Invalid key, value pair!!!"); - } - break; - default: - if ( $numargs > 2 ) { - $this->error("Too many arguments!!!"); - } - if ( $numargs < 1 ) { - $this->error("No arguments passed!!!"); - } - } - } - - /** - * For internal usage. Print out configuration arrays. - * @param string $conftype Type of configuration. - * @return void - */ - function __printconfig($conftype='') { - - $conf = NULL; - $assocs = array('fontname','fontsize','formatblocks'); - - switch( $conftype ) { - case 'merge': // New config overrides defaults if found. - $conf = array_merge($this->defaults,$this->htmlareaconf); - break; - case 'append': // Append mode leave default value if found. - $conf = $this->defaults; - $keys = array_keys($this->defaults); - foreach ( $this->htmlareaconf as $key => $value ) { - if ( in_array($key, $keys) ) { - continue; - } else { - $conf[$key] = $value; - } - } - break; - case 'default': // Use only default config. - $conf = $this->defaults; - break; - default: // Print what's in htmlareaconf. - $conf = $this->htmlareaconf; - } - - echo "\n"; - echo ''."\n"; - - } - - /** - * Print out code that start up the editor. - * @param string $conftype Configuration type to print. - */ - function starteditor($configtype='') { - $this->__printconfig($configtype); - } - - /** - * For backward compatibility only. - * @param string $name - * @param string $editorhidesomebuttons - */ - function use_html_editor ( $name='', $editorhidebuttons='' ) { - - if ( !empty($editorhidesomebuttons) ) { - $this->defaults['hideSomeButtons'] = $editorhidesomebuttons; - } - - if (empty($name)) { - $this->starteditor('default'); - } else { - $this->starteditor('default'); - } - - if ( !empty($this->cfg->editorsrc) ) { - unset($this->cfg->editorsrc); - } - - } - - /** - * Prints out needed code for spellchecking. - * @param bool $usehtmleditor - * @todo Deprecated? see lib/weblib.php::print_speller_code() - * @see lib/weblib.php::print_speller_code() - */ - function print_speller_code ($usehtmleditor=false) { - echo "\n".''."\n"; - - } - -} -?> diff --git a/lib/editor/htmlarea/htmlarea.css b/lib/editor/htmlarea/htmlarea.css deleted file mode 100644 index 23bdf7d9db..0000000000 --- a/lib/editor/htmlarea/htmlarea.css +++ /dev/null @@ -1,180 +0,0 @@ -.htmlarea { background: #fff; } - -.htmlarea .toolbar { - cursor: default; - background: ButtonFace; - padding: 1px 1px 2px 1px; - border: 1px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; -} -.htmlarea .toolbar table { font-family: tahoma,verdana,sans-serif; font-size: 11px; } -.htmlarea .toolbar img { border: none; } -.htmlarea .toolbar .label { padding: 0px 3px; } - -.htmlarea .toolbar .button { - background: ButtonFace; - color: ButtonText; - border: 1px solid ButtonFace; - padding: 1px; - margin: 0px; -} -.htmlarea .toolbar .buttonHover { - border: 1px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; -} -.htmlarea .toolbar .buttonActive, .htmlarea .toolbar .buttonPressed { - padding: 2px 0px 0px 2px; - border: 1px solid; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; -} -.htmlarea .toolbar .buttonPressed { - background: ButtonHighlight; -} -.htmlarea .toolbar .indicator { - padding: 0px 3px; - overflow: hidden; - width: 20px; - text-align: center; - cursor: default; - border: 1px solid ButtonShadow; -} - -.htmlarea .toolbar .buttonDisabled { background-color: #aaa; } - -.htmlarea .toolbar .buttonDisabled img { - filter: alpha(opacity = 25); - -moz-opacity: 25%; -} - -.htmlarea .toolbar .separator { - position: relative; - margin: 3px; - border-left: 1px solid ButtonShadow; - border-right: 1px solid ButtonHighlight; - width: 0px; - height: 16px; - padding: 0px; -} - -.htmlarea .toolbar .space { width: 5px; } - -.htmlarea .toolbar select { font: 11px Tahoma,Verdana,sans-serif; } - -.htmlarea .toolbar select, -.htmlarea .toolbar select:hover, -.htmlarea .toolbar select:active { background: FieldFace; color: ButtonText; } - -.htmlarea .statusBar { - border: 1px solid; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; - padding: 2px 4px; - background-color: ButtonFace; - color: ButtonText; - font: 11px Tahoma,Verdana,sans-serif; -} - -.htmlarea .statusBar .statusBarTree a { - padding: 2px 5px; - color: #00f; -} - -.htmlarea .statusBar .statusBarTree a:visited { color: #00f; } -.htmlarea .statusBar .statusBarTree a:hover { - background-color: Highlight; - color: HighlightText; - padding: 1px 4px; - border: 1px solid HighlightText; -} - - -/* Hidden DIV popup dialogs (PopupDiv) */ - -.dialog { - color: ButtonText; - background: ButtonFace; -} - -.dialog .content { padding: 2px; } - -.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table { - font: 11px Tahoma,Verdana,sans-serif; -} - -.dialog table { border-collapse: collapse; } - -.dialog .title { - background: #008; - color: #ff8; - border-bottom: 1px solid #000; - padding: 1px 0px 2px 5px; - font-size: 12px; - font-weight: bold; - cursor: default; -} - -.dialog .title .button { - float: right; - border: 1px solid #66a; - padding: 0px 1px 0px 2px; - margin-right: 1px; - color: #fff; - text-align: center; -} - -.dialog .title .button-hilite { border-color: #88f; background: #44c; } - -.dialog button { - width: 5em; - padding: 0px; -} - -.dialog .buttonColor { - padding: 1px; - cursor: default; - border: 1px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; -} - -.dialog .buttonColor-hilite { - border-color: #000; -} - -.dialog .buttonColor .chooser, .dialog .buttonColor .nocolor { - height: 0.6em; - border: 1px solid; - padding: 0px 1em; - border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; -} - -.dialog .buttonColor .nocolor { padding: 0px; } -.dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; } - -.dialog .label { text-align: right; width: 6em; } -.dialog .value input { width: 100%; } -.dialog .buttons { text-align: right; padding: 2px 4px 0px 4px; } - -.dialog legend { font-weight: bold; } -.dialog fieldset table { margin: 2px 0px; } - -.popupdiv { - border: 2px solid; - border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; -} - -.popupwin { - padding: 0px; - margin: 0px; -} - -.popupwin .title { - background: #fff; - color: #000; - font-weight: bold; - font-size: 120%; - padding: 3px 10px; - margin-bottom: 10px; - border-bottom: 1px solid black; - letter-spacing: 2px; -} - -form { margin: 0px; border: none; } diff --git a/lib/editor/htmlarea/htmlarea.php b/lib/editor/htmlarea/htmlarea.php deleted file mode 100644 index 5c2c1aaf00..0000000000 --- a/lib/editor/htmlarea/htmlarea.php +++ /dev/null @@ -1,2822 +0,0 @@ -dirroot.'/lib/languages.php'); - - $id = optional_param('id', SITEID, PARAM_INT); - $httpsrequired = optional_param('httpsrequired', 0, PARAM_BOOL); //flag indicating editor on page with required https - - require_course_login($id); - - $lastmodified = filemtime("htmlarea.php"); - $lifetime = 1800; - - // Commenting this out since it's creating problems - // where solution seem to be hard to find... - // http://moodle.org/mod/forum/discuss.php?d=34376 - //if ( function_exists('ob_gzhandler') ) { - // ob_start("ob_gzhandler"); - //} - - header("Content-type: application/x-javascript; charset: utf-8"); // Correct MIME type - header("Last-Modified: " . gmdate("D, d M Y H:i:s", $lastmodified) . " GMT"); - header("Expires: " . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT"); - header("Cache-control: max_age = $lifetime"); - header("Pragma: "); - - $lang = current_language(); - - if (empty($lang)) { - $lang = "en"; - } - - if ($httpsrequired) { - // this is an ugly hack to allow partial operation of editor on pages that require https when loginhttps enabled - // please note that some popups still show nonsecurre items and fullscreen may not function properly in IE - $url = preg_replace('|https?://[^/]+|', '', $CFG->wwwroot).'/lib/editor/htmlarea/'; - } else { - $url = $CFG->wwwroot.'/lib/editor/htmlarea/'; - } - - $strheading = get_string("heading", "editor"); - $strnormal = get_string("normal", "editor"); - $straddress = get_string("address", "editor"); - $strpreformatted = get_string("preformatted", "editor"); - $strlang = get_string('lang', 'editor'); - $strmulti = get_string('multi', 'editor'); -?> - -// htmlArea v3.0 - Copyright (c) 2002, 2003 interactivetools.com, inc. -// This copyright notice MUST stay intact for use (see license.txt). -// -// Portions (c) dynarch.com, 2003-2004 -// -// A free WYSIWYG editor replacement for - - - diff --git a/lib/editor/htmlarea/popups/insert_image.php b/lib/editor/htmlarea/popups/insert_image.php deleted file mode 100644 index 3a3c4c3476..0000000000 --- a/lib/editor/htmlarea/popups/insert_image.php +++ /dev/null @@ -1,338 +0,0 @@ -maxbytes); - -?> - - - - -<?php print_string("insertimage","editor");?> - - - - - -
-
-
-
-
- - - - - - - - - - - -
: -
: -
-
- - - - - - -
-
-
- - - - - - - - - -
: -
: -
-
 
-
-
- - - - - - - - - -
: - -
: -
-
-
- - - - - - - - - -
: - -
: -
-
- - - - - -
"; - echo ""; - ?> - :
- -
- - - - - - - - -
- - - - - - - -
:
- " onclick="return submit_form('delete');" />
- " onclick="return submit_form('move');" />
- " onclick="return submit_form('zip');" />
- - - - - - " />
-
- -
- -
-
-   : - - : -
-
-
-
- - - - - - " onclick="return checkvalue('foldername','cfolder');" /> -
-
-
- - - - - - - " /> -
-
-

 

- - diff --git a/lib/editor/htmlarea/popups/insert_image_std.php b/lib/editor/htmlarea/popups/insert_image_std.php deleted file mode 100644 index 6f12d9cc63..0000000000 --- a/lib/editor/htmlarea/popups/insert_image_std.php +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - <?php print_string("insertimage","editor");?> - - - - - - - - - -
- -
- - - - - - - - - - - - -
: - -
:
- -

-

- - -
- -
:
- - -

- -

:
- - -
- -
- -
- - -
- -
:
- - -

- -

:
- - -
- -
- -
-
- - -
-
- - diff --git a/lib/editor/htmlarea/popups/insert_table.php b/lib/editor/htmlarea/popups/insert_table.php deleted file mode 100644 index 1055855476..0000000000 --- a/lib/editor/htmlarea/popups/insert_table.php +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - <?php print_string("inserttable","editor");?> - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - -
:
::
- -

- -

- - -
- -
:
- - -

- -

:
- - -
- -
- -
- - -
- -
:
- - -

- -

:
- - -
- -
- -
-
- - -
-
- - diff --git a/lib/editor/htmlarea/popups/link.php b/lib/editor/htmlarea/popups/link.php deleted file mode 100644 index fd9b451520..0000000000 --- a/lib/editor/htmlarea/popups/link.php +++ /dev/null @@ -1,155 +0,0 @@ - - - - -<?php print_string("insertlink","editor");?> - - - - - -
- - - - -
- - -
- ": - ""; ?> -

-

-
-
 
- - - - - -
- - - - - - - -
:
- " onclick="return submit_form('delete');" />
- " onclick="return submit_form('move');" />
- " onclick="return submit_form('zip');" />
- - - - - - " />
-
- -
- - - - -
-
- - - - - - " onclick="return checkvalue('foldername','cfolder');" /> -
-
- - - - - - - " /> -
- -
-

 

- - diff --git a/lib/editor/htmlarea/popups/link_std.php b/lib/editor/htmlarea/popups/link_std.php deleted file mode 100644 index f3f354ad7e..0000000000 --- a/lib/editor/htmlarea/popups/link_std.php +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - <?php print_string("insertlink","editor");?> - - - - - -
- - - - - - - - - - - - - - - - - - -
:
:
: -
:
- -
- ".get_string("browse","editor")."..."; - } - ?> - - -
- - - diff --git a/lib/editor/htmlarea/popups/popup.js b/lib/editor/htmlarea/popups/popup.js deleted file mode 100644 index 8c3afe45aa..0000000000 --- a/lib/editor/htmlarea/popups/popup.js +++ /dev/null @@ -1,86 +0,0 @@ -// htmlArea v3.0 - Copyright (c) 2002, 2003 interactivetools.com, inc. -// This copyright notice MUST stay intact for use (see license.txt). -// -// Portions (c) dynarch.com, 2003 -// -// A free WYSIWYG editor replacement for