M => +0 -10
@@ 13,16 13,6 @@ function insert_image(image_id) {
$('#id_content').insertAtCaret(imagetag+'\n\n');
}
}
$(document).ready( function() {
$('.sidebar-form').each(function () {
$(this).submit( function() {
this.unsaved_article_title.value = $('#id_title').val();
this.unsaved_article_content.value = $('#id_content').val();
});
});
});
</script>
{% endaddtoblock %}
M => +13 -0
@@ 1,3 1,16 @@
{% addtoblock "js" %}
<script type="text/javascript">
$(document).ready( function() {
$('.sidebar-form').each(function () {
$(this).submit( function() {
this.unsaved_article_title.value = $('#id_title').val();
this.unsaved_article_content.value = $('#id_content').val();
});
});
});
</script>
{% endaddtoblock %}
<div class="accordion" id="accordion_{{ plugin.slug }}">
{% for plugin, plugin_form in sidebar %}