diff --git a/js/upload-selection.js b/js/upload-selection.js index b342a134..c40b3383 100644 --- a/js/upload-selection.js +++ b/js/upload-selection.js @@ -9,10 +9,10 @@ * $config['additional_javascript'][] = 'js/jquery.min.js'; * //$config['additional_javascript'][] = 'js/wpaint.js'; * $config['additional_javascript'][] = 'js/upload-selection.js'; - * + * */ -$(function(){ +function init_upload_selection(){ var enabled_file = true; var enabled_url = $("#upload_url").length > 0; var enabled_embed = $("#upload_embed").length > 0; @@ -84,4 +84,4 @@ $(function(){ enable_file(); } -}); +} diff --git a/templates/post_form.html b/templates/post_form.html index 5cbe0d35..1d77443a 100644 --- a/templates/post_form.html +++ b/templates/post_form.html @@ -148,7 +148,10 @@ + {% if 'js/file-selector.js' in config.additional_javascript %} + {% endif %} + {% if config.allow_upload_by_url %}
@@ -210,6 +213,9 @@ +{% if 'js/upload-selection.js' in config.additional_javascript %} + +{% endif %}