Hi all,
I'm using FluoEditor with Rails (3.2, ruby 1.9.3)
I have a model in rails (StudyPlan) including a process definition, and in
the classic form of rails, I include FluoEditor to edit / update the
process definition.
I would like to have just Ajax request when I use button of FluoEditor, but
unfortunately, I have a complete html request.
Do you not how to setup just a Ajax request and not the complete html
request with FluoEditor ?
Here is some parts of my code
# views/study_plans/_form_html.erb
<%= form_for(@study_plan, :remote => true ) do |f| %>
….
<%= f.hidden_field :definition_input %>
<div id="editor" style="margin-left: 10px; margin-top: 10px;"></div>
<%= f.submit :onclick => "return validate_form();" %>
<% end %>
<script>
var editor = document.getElementById('editor');
var tree = <%= raw(@study_plan.definition_input) %>;
FluoEditor.renderFlow(editor, tree);
// Here is my question : I have button with FluoEditor, but click on these
// buttons generate a full html request (a link_to and not a update)
// Console Log when FluoEditor is click :
// Started GET "/study_plans/1/edit" for 127.0.0.1 at 2012-09-30 10:45:54
+0200
// Processing by StudyPlansController#edit as HTML
….
function validate_form(){
var spdi = document.getElementById('study_plan_definition_input');
spdi.value = RuoteFluoEditor.asJson('editor');
}
</script>
Thanks for your help & bests regards,
Laurent
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en