Search in sources :

Example 11 with ChangePartEvent

use of org.olat.modules.portfolio.ui.editor.event.ChangePartEvent in project openolat by klemens.

the class TitleEditorController method doSave.

private void doSave(UserRequest ureq) {
    String content = titleItem.getValue();
    title.setContent(content);
    staticItem.setValue(content);
    fireEvent(ureq, new ChangePartEvent(title));
}
Also used : ChangePartEvent(org.olat.modules.portfolio.ui.editor.event.ChangePartEvent)

Example 12 with ChangePartEvent

use of org.olat.modules.portfolio.ui.editor.event.ChangePartEvent in project OpenOLAT by OpenOLAT.

the class FileUploadEditorController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == fileLimitEl) {
        doSetMaxUploadSize();
    } else if (source == mimeTypesEl) {
        doSetMimeTypes();
    }
    fileUploadCtrl.update();
    fireEvent(ureq, new ChangePartEvent(fileUpload));
    super.formInnerEvent(ureq, source, event);
}
Also used : ChangePartEvent(org.olat.modules.portfolio.ui.editor.event.ChangePartEvent)

Example 13 with ChangePartEvent

use of org.olat.modules.portfolio.ui.editor.event.ChangePartEvent in project OpenOLAT by OpenOLAT.

the class TextInputEditorController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    if (StringHelper.containsNonWhitespace(rowsEl.getValue())) {
        try {
            int rows = Integer.parseInt(rowsEl.getValue());
            textInput.setRows(rows);
        } catch (NumberFormatException e) {
            logError("Cannot parse integer: " + rowsEl.getValue(), null);
        }
    }
    textInputCtrl.update();
    fireEvent(ureq, new ChangePartEvent(textInput));
    fireEvent(ureq, new ClosePartEvent(textInput));
}
Also used : ClosePartEvent(org.olat.modules.portfolio.ui.editor.event.ClosePartEvent) ChangePartEvent(org.olat.modules.portfolio.ui.editor.event.ChangePartEvent)

Example 14 with ChangePartEvent

use of org.olat.modules.portfolio.ui.editor.event.ChangePartEvent in project OpenOLAT by OpenOLAT.

the class HTMLRawEditorController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (htmlItem == source) {
        String content = htmlItem.getValue();
        html.setContent(content);
        staticItem.setValue(content);
        fireEvent(ureq, new ChangePartEvent(html));
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : ChangePartEvent(org.olat.modules.portfolio.ui.editor.event.ChangePartEvent)

Example 15 with ChangePartEvent

use of org.olat.modules.portfolio.ui.editor.event.ChangePartEvent in project OpenOLAT by OpenOLAT.

the class HTMLRawEditorController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    String content = htmlItem.getValue();
    html.setContent(content);
    String formattedContent = Formatter.formatLatexFormulas(content);
    staticItem.setValue(formattedContent);
    fireEvent(ureq, new ChangePartEvent(html));
}
Also used : ChangePartEvent(org.olat.modules.portfolio.ui.editor.event.ChangePartEvent)

Aggregations

ChangePartEvent (org.olat.modules.portfolio.ui.editor.event.ChangePartEvent)22 ClosePartEvent (org.olat.modules.portfolio.ui.editor.event.ClosePartEvent)6 SliderType (org.olat.modules.forms.model.xml.Rubric.SliderType)2 Slider (org.olat.modules.forms.model.xml.Slider)2 AddElementEvent (org.olat.modules.portfolio.ui.editor.event.AddElementEvent)2