app/views/shared/_init_editor.html.erb in adminpanel-1.2.12 vs app/views/shared/_init_editor.html.erb in adminpanel-2.0.0

- old
+ new

@@ -10,15 +10,18 @@ 'quote', 'unorderedlist' ] }); -$(document).ready(function(){ +var ready = function(){ $("#<%= field_var %>").on("focusout", function(){ //alert(document.getElementById("<%= field_var %>-field").value); //.value = <%= field_var %>.serialize()["editable"]["value"]; //$("#<%= field_var %>-field").value = <%= field_var %>.serialize()["editable"]["value"]; document.getElementById("<%= field_var %>-field").value = <%= field_var %>.serialize()["<%= field_var %>"]["value"]; }); -}); +} + +$(document).ready(ready); +$(document).on('page:load', ready);