Skip to content
Snippets Groups Projects
Commit cc3b98d0 authored by srosse's avatar srosse
Browse files

Merge OpenOLAT 10.3 to OpenOLAT default branch with 5ecc3946a26868c286659c712b462f3f27b2df50

parents d9d5fbab 0b64c3aa
No related branches found
No related tags found
No related merge requests found
...@@ -388,6 +388,10 @@ public class RichTextConfiguration implements Disposable { ...@@ -388,6 +388,10 @@ public class RichTextConfiguration implements Disposable {
public void disableMathEditor() { public void disableMathEditor() {
tinyConfig = tinyConfig.disableMathEditor(); tinyConfig = tinyConfig.disableMathEditor();
} }
public void disableImageAnMovie() {
tinyConfig = tinyConfig.disableImageAndMedia();
}
/** /**
* Enable / disable the full-screen plugin * Enable / disable the full-screen plugin
...@@ -524,6 +528,15 @@ public class RichTextConfiguration implements Disposable { ...@@ -524,6 +528,15 @@ public class RichTextConfiguration implements Disposable {
linkBrowserBaseContainer = vfsContainer; linkBrowserBaseContainer = vfsContainer;
linkBrowserCustomTreeModel = customLinkTreeModel; linkBrowserCustomTreeModel = customLinkTreeModel;
} }
public void disableFileBrowserCallback() {
linkBrowserImageSuffixes = null;
linkBrowserMediaSuffixes = null;
linkBrowserFlashPlayerSuffixes = null;
linkBrowserBaseContainer = null;
linkBrowserCustomTreeModel = null;
nonQuotedConfigValues.remove(FILE_BROWSER_CALLBACK);
}
/** /**
* Set an optional path relative to the vfs container of the file browser * Set an optional path relative to the vfs container of the file browser
......
...@@ -114,6 +114,16 @@ public class TinyConfig { ...@@ -114,6 +114,16 @@ public class TinyConfig {
.enableFeature("olatmovieviewer"); .enableFeature("olatmovieviewer");
} }
/**
* Disable image, media and movie plugins.
* @return
*/
public TinyConfig disableImageAndMedia() {
return disableFeature("image")
.disableFeature("media")
.disableFeature("olatmovieviewer");
}
/** /**
* Remove media + olatmovie * Remove media + olatmovie
* @return * @return
......
...@@ -79,6 +79,8 @@ public class EditHTMLTaskController extends FormBasicController { ...@@ -79,6 +79,8 @@ public class EditHTMLTaskController extends FormBasicController {
descriptionEl = uifactory.addTextAreaElement("descr", "task.description", 2048, 10, -1, true, description, formLayout); descriptionEl = uifactory.addTextAreaElement("descr", "task.description", 2048, 10, -1, true, description, formLayout);
contentEditor = new HTMLEditorController(ureq, getWindowControl(), taskContainer, task.getFilename(), null, "media", true, false, false, mainForm); contentEditor = new HTMLEditorController(ureq, getWindowControl(), taskContainer, task.getFilename(), null, "media", true, false, false, mainForm);
contentEditor.getRichTextConfiguration().disableImageAnMovie();
contentEditor.getRichTextConfiguration().disableFileBrowserCallback();
listenTo(contentEditor); listenTo(contentEditor);
FormItem editorItem = contentEditor.getInitialFormItem(); FormItem editorItem = contentEditor.getInitialFormItem();
editorItem.setLabel("task.file", null); editorItem.setLabel("task.file", null);
......
...@@ -279,6 +279,8 @@ public class GTASampleSolutionsEditController extends FormBasicController { ...@@ -279,6 +279,8 @@ public class GTASampleSolutionsEditController extends FormBasicController {
solutionContainer, documentName, "media", true, true); solutionContainer, documentName, "media", true, true);
newSolutionEditorCtrl.setNewFile(true); newSolutionEditorCtrl.setNewFile(true);
newSolutionEditorCtrl.setUserObject(solution); newSolutionEditorCtrl.setUserObject(solution);
newSolutionEditorCtrl.getRichTextConfiguration().disableImageAnMovie();
newSolutionEditorCtrl.getRichTextConfiguration().disableFileBrowserCallback();
listenTo(newSolutionEditorCtrl); listenTo(newSolutionEditorCtrl);
cmc = new CloseableModalController(getWindowControl(), "close", newSolutionEditorCtrl.getInitialComponent()); cmc = new CloseableModalController(getWindowControl(), "close", newSolutionEditorCtrl.getInitialComponent());
...@@ -291,6 +293,8 @@ public class GTASampleSolutionsEditController extends FormBasicController { ...@@ -291,6 +293,8 @@ public class GTASampleSolutionsEditController extends FormBasicController {
editSolutionEditorCtrl = WysiwygFactory.createWysiwygController(ureq, getWindowControl(), editSolutionEditorCtrl = WysiwygFactory.createWysiwygController(ureq, getWindowControl(),
solutionContainer, documentName, "media", true, true); solutionContainer, documentName, "media", true, true);
editSolutionEditorCtrl.getRichTextConfiguration().disableImageAnMovie();
editSolutionEditorCtrl.getRichTextConfiguration().disableFileBrowserCallback();
listenTo(editSolutionEditorCtrl); listenTo(editSolutionEditorCtrl);
cmc = new CloseableModalController(getWindowControl(), "close", editSolutionEditorCtrl.getInitialComponent()); cmc = new CloseableModalController(getWindowControl(), "close", editSolutionEditorCtrl.getInitialComponent());
......
...@@ -401,6 +401,8 @@ class SubmitDocumentsController extends FormBasicController { ...@@ -401,6 +401,8 @@ class SubmitDocumentsController extends FormBasicController {
newDocumentEditorCtrl = WysiwygFactory.createWysiwygController(ureq, getWindowControl(), newDocumentEditorCtrl = WysiwygFactory.createWysiwygController(ureq, getWindowControl(),
documentsContainer, documentName, "media", true, true); documentsContainer, documentName, "media", true, true);
newDocumentEditorCtrl.getRichTextConfiguration().disableImageAnMovie();
newDocumentEditorCtrl.getRichTextConfiguration().disableFileBrowserCallback();
newDocumentEditorCtrl.setNewFile(true); newDocumentEditorCtrl.setNewFile(true);
listenTo(newDocumentEditorCtrl); listenTo(newDocumentEditorCtrl);
...@@ -415,6 +417,8 @@ class SubmitDocumentsController extends FormBasicController { ...@@ -415,6 +417,8 @@ class SubmitDocumentsController extends FormBasicController {
editDocumentEditorCtrl = WysiwygFactory.createWysiwygController(ureq, getWindowControl(), editDocumentEditorCtrl = WysiwygFactory.createWysiwygController(ureq, getWindowControl(),
documentsContainer, documentName, "media", true, true); documentsContainer, documentName, "media", true, true);
editDocumentEditorCtrl.getRichTextConfiguration().disableImageAnMovie();
editDocumentEditorCtrl.getRichTextConfiguration().disableFileBrowserCallback();
listenTo(editDocumentEditorCtrl); listenTo(editDocumentEditorCtrl);
cmc = new CloseableModalController(getWindowControl(), "close", editDocumentEditorCtrl.getInitialComponent()); cmc = new CloseableModalController(getWindowControl(), "close", editDocumentEditorCtrl.getInitialComponent());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment