Browse Source

Make file selector work, add to config

Conflicts:
	inc/instance-config.php
	templates/post_form.html
pull/40/head
8chan 9 years ago
committed by czaks
parent
commit
f26256f55a
  1. 4
      js/file-selector.js
  2. 2
      templates/post_form.html

4
js/file-selector.js

@ -5,7 +5,7 @@
* $config['additional_javascript'][] = 'js/jquery.min.js';
* $config['additional_javascript'][] = 'js/file-selector.js';
*/
function init_file_selector() {
function init_file_selector(max_images) {
$(document).ready(function () {
// add options panel item
@ -20,7 +20,7 @@ $(document).ready(function () {
}
});
if (localStorage.file_dragdrop === 'undefined') localStorage.file_dragdrop = 'true';
if (typeof localStorage.file_dragdrop === 'undefined') localStorage.file_dragdrop = 'true';
if (localStorage.file_dragdrop === 'true') $('#file-drag-drop>input').prop('checked', true);
}
});

2
templates/post_form.html

@ -106,7 +106,7 @@
</div>
</div>
<script type="text/javascript">if (typeof init_file_selector !== 'undefined') init_file_selector();</script>
<script type="text/javascript">if (typeof init_file_selector !== 'undefined') init_file_selector({{ config.max_images }});</script>
{% if config.allow_upload_by_url %}
<div style="float:none;text-align:left" id="upload_url">

Loading…
Cancel
Save