revert collapsed file forms in edit mode, this caused too much trouble. Added some comments concerning that.
This commit is contained in:
@ -12,6 +12,9 @@ $(function() {
|
|||||||
$('#files li:last select[name*="file_type_id"]').val(getSelectedExecutionEnvironment().file_type_id);
|
$('#files li:last select[name*="file_type_id"]').val(getSelectedExecutionEnvironment().file_type_id);
|
||||||
$('#files li:last select').chosen(window.CodeOcean.CHOSEN_OPTIONS);
|
$('#files li:last select').chosen(window.CodeOcean.CHOSEN_OPTIONS);
|
||||||
$('body, html').scrollTo('#add-file');
|
$('body, html').scrollTo('#add-file');
|
||||||
|
// if we collapse the file forms by default, we need to click on the new element in order to open it.
|
||||||
|
// however, this crashes for more files (if we add several ones by clicking the add button more often), since the elements are probably not correctly added to the files list.
|
||||||
|
//$('#files li:last>div:first>a>div').click();
|
||||||
};
|
};
|
||||||
|
|
||||||
var ajaxError = function() {
|
var ajaxError = function() {
|
||||||
|
@ -4,7 +4,7 @@ li.panel.panel-default
|
|||||||
a.file-heading data-toggle="collapse" data-parent="#files" href="#collapse#{id}"
|
a.file-heading data-toggle="collapse" data-parent="#files" href="#collapse#{id}"
|
||||||
div.clearfix role="button"
|
div.clearfix role="button"
|
||||||
span = f.object.name
|
span = f.object.name
|
||||||
.panel-collapse.collapse id="collapse#{id}" role="tabpanel"
|
.panel-collapse.collapse-in id="collapse#{id}" role="tabpanel"
|
||||||
.panel-body
|
.panel-body
|
||||||
.clearfix = link_to(t('shared.destroy'), '#', class:'btn btn-warning btn-sm discard-file pull-right')
|
.clearfix = link_to(t('shared.destroy'), '#', class:'btn btn-warning btn-sm discard-file pull-right')
|
||||||
.form-group
|
.form-group
|
||||||
|
Reference in New Issue
Block a user