reworked the exercise edit dialog. Moved javascript part from editor_edit.js.erb to exercises.js.erb.
Manipulated some further javascript as necessary. It is not super elegant, but this is due to the former structure of the code which uses cloned dummy forms. Integrating the ace editor made some strange calls necessary. Also fixed toggling the input area and the file upload dialog
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
= form.label(attribute, label)
|
||||
|
|
||||
a.toggle-input data={text_initial: t('shared.upload_file'), text_toggled: t('shared.back')} href='#' = t('shared.upload_file')
|
||||
= form.text_area(attribute, class: 'code-field form-control original-input', rows: 16, style: "display:none;")
|
||||
= form.text_area(attribute, class: 'code-field form-control', rows: 16, style: "display:none;")
|
||||
= form.file_field(attribute, class: 'alternative-input form-control', disabled: true)
|
||||
= render partial: 'editor_edit', locals: { exercise: @exercise }
|
||||
|
Reference in New Issue
Block a user