i think i finally solved it, i found the issue being a certain file upload gem forcing textbox to .js files (remotipart), i tracked down their github issues and found a user that made a fix to this bug, copied his code ant it works, turns out it was a & symbol type escaped string breaking the javascript

This commit is contained in:
Zanz2 2017-09-19 16:07:54 +02:00
parent 7aba782639
commit ed64ce814a
2 changed files with 6 additions and 3 deletions

View file

@ -8,7 +8,7 @@
#kaj dela: .remove("\"") na stringih, sanitize_input ampak pokvari stran
%>
<%= hidden_field_tag :banana, (@json_object['steps'][0]['components'][0]) %>
<%= hidden_field_tag :banana, (@json_object['steps']) %>
<%# end %>

View file

@ -1,6 +1,9 @@
$('#modal-import-json-protocol').modal('hide');
$('#protocolsio-preview-modal-target').html("<%= j(render(:partial => 'protocols/import_export/import_json_protocol_preview_modal')) %>")
<% if remotipart_submitted? %>
$('#protocolsio-preview-modal-target').html("<%= j "#{render(:partial => 'protocols/import_export/import_json_protocol_preview_modal')}" %>");
<% else %>
$('#protocolsio-preview-modal-target').html("<%= j render(:partial => 'protocols/import_export/import_json_protocol_preview_modal') %>");
<% end %>
$('#modal-import-json-protocol-preview').modal('show');