Skip to content

Commit

Permalink
MDL-19184, MDL-19212 - refactoring, cleanup and improvements in text …
Browse files Browse the repository at this point in the history
…editors support; localization support is not finished, inline docs incomplete, expect more commits soon
  • Loading branch information
skodak committed May 16, 2009
1 parent f9e57c6 commit 5ca3c83
Show file tree
Hide file tree
Showing 511 changed files with 5,106 additions and 11,929 deletions.
10 changes: 6 additions & 4 deletions admin/settings/appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,21 @@
$temp->add(new admin_setting_configtext('calendar_exportsalt', get_string('calendarexportsalt','admin'), get_string('configcalendarexportsalt', 'admin'), random_string(60)));
$ADMIN->add('appearance', $temp);

/* TODO: reimplement editor settings and preferences, editors are now full plugins ;-)
// "htmleditor" settingpage
$ADMIN->add('appearance', new admin_category('htmleditor', get_string('htmleditor', 'admin')));
$temp = new admin_settingpage('htmleditorsettings', get_string('htmleditorsettings', 'admin'));
$htmleditors = get_available_html_editors();
$htmleditors = get_available_editors();
$temp->add(new admin_setting_configselect('defaulthtmleditor', get_string('defaulthtmleditor', 'admin'), null, 'tinymce', $htmleditors));
$temp->add(new admin_setting_configcheckbox('htmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1));
$temp->add(new admin_setting_emoticons());
$ADMIN->add('htmleditor', $temp);
/* TODO: before deleting these settings migrate or drop config values!
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));
Expand All @@ -69,13 +71,13 @@
$temp->add(new admin_setting_configcheckbox('editorkillword', get_string('editorkillword', 'admin'), get_string('edhelpcleanword'), 1));
$temp->add(new admin_setting_special_editorhidebuttons());
$ADMIN->add('htmleditor', $temp);
*/
$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);
Expand Down
3 changes: 3 additions & 0 deletions lang/en_utf8/editor_textarea.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

$string['modulename'] = 'Plain text area';
7 changes: 2 additions & 5 deletions lang/en_utf8/tinymce.php → lang/en_utf8/editor_tinymce.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php // $Id$
// tinymce.php - created by the automatic import script

<?php

$string['main/common:edit_confirm'] = 'Do you want to use the WYSIWYG mode for this textarea?';
$string['main/common:apply'] = 'Apply';
Expand Down Expand Up @@ -99,6 +97,7 @@
$string['main/spellchecker:no_sug'] = 'No suggestions';
$string['main/spellchecker:no_mpell'] = 'No misspellings found.';
$string['main/pagebreak:desc'] = 'Insert page break.';
$string['modulename'] = 'TinyMCE editor';
$string['plugins/advhr_dlg:width'] = 'Width';
$string['plugins/advhr_dlg:size'] = 'Height';
$string['plugins/advhr_dlg:noshade'] = 'No shadow';
Expand Down Expand Up @@ -706,5 +705,3 @@
$string['themes/simple:undo_desc'] = 'Undo (Ctrl+Z)';
$string['themes/simple:redo_desc'] = 'Redo (Ctrl+Y)';
$string['themes/simple:cleanup_desc'] = 'Cleanup messy code';

?>
8 changes: 8 additions & 0 deletions lib/accesslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3069,6 +3069,10 @@ function load_capability_def($component) {
$defpath = $CFG->dirroot.'/course/'.$component.'/db/access.php';
$varprefix = $compparts[0].'_'.$compparts[1];

} else if ($compparts[0] == 'editor') {
$defpath = $CFG->dirroot.'/lib/editor/'.$compparts[1].'/db/access.php';
$varprefix = $compparts[0].'_'.$compparts[1];

} else if ($compparts[0] == 'gradeimport') {
$defpath = $CFG->dirroot.'/grade/import/'.$compparts[1].'/db/access.php';
$varprefix = $compparts[0].'_'.$compparts[1];
Expand Down Expand Up @@ -3914,6 +3918,10 @@ function get_capability_string($capabilityname) {
$string = get_string($stringname, 'format_'.$componentname);
break;

case 'format':
$string = get_string($stringname, 'editor_'.$componentname);
break;

case 'gradeexport':
$string = get_string($stringname, 'gradeexport_'.$componentname);
break;
Expand Down
1 change: 1 addition & 0 deletions lib/adminlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function get_plugin_types() {
'auth' => 'auth',
'enrol' => 'enrol',
'format' => 'course/format',
'editor' => 'lib/editor',
'gradeexport' => 'grade/export',
'gradeimport' => 'grade/import',
'gradereport' => 'grade/report',
Expand Down
30 changes: 0 additions & 30 deletions lib/editor/common/dragmath/COPYRIGHT.html

This file was deleted.

Loading

0 comments on commit 5ca3c83

Please sign in to comment.