bcv
This commit is contained in:
parent
9a4f2bb539
commit
35a9cd1bfe
8 changed files with 15 additions and 11 deletions
|
@ -39,4 +39,8 @@ function post_toast(url, reload, data) {
|
|||
|
||||
xhr.send(form);
|
||||
|
||||
}
|
||||
|
||||
function changename(s1,s2) {
|
||||
document.getElementById(s1).innerHTML = document.getElementById(s2).files[0].name.substr(0, 20);
|
||||
}
|
|
@ -29,8 +29,8 @@ document.onpaste = function(event) {
|
|||
document.getElementById('file-upload').addEventListener('change', function(){
|
||||
f=document.getElementById('file-upload');
|
||||
document.getElementById('urlblock').classList.add('d-none');
|
||||
document.getElementById('filename-show').textContent = document.getElementById('file-upload').files[0].name;
|
||||
filename = f.files[0].name.toLowerCase()
|
||||
document.getElementById('filename-show').textContent = document.getElementById('file-upload').files[0].name.substr(0, 20);
|
||||
filename = f.files[0].name.toLowerCase().substr(0, 20)
|
||||
if (filename.endsWith(".jpg") || filename.endsWith(".jpeg") || filename.endsWith(".png") || filename.endsWith(".webp") || filename.endsWith(".webp"))
|
||||
{
|
||||
var fileReader = new FileReader();
|
||||
|
|
|
@ -316,7 +316,7 @@
|
|||
|
||||
<label class="btn btn-secondary format m-0" for="file-edit-reply-{{c.id}}">
|
||||
<div id="filename-edit-reply-{{c.id}}"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image/video';" hidden>
|
||||
<input autocomplete="off" id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-edit-reply-{{c.id}}','file-edit-reply-{{c.id}}')" hidden>
|
||||
</label>
|
||||
</div>
|
||||
<a id="edit-btn-{{c.id}}" role="button" form="comment-edit-form-{{c.id}}" class="btn btn-primary ml-2 fl-r commentmob" onclick="comment_edit('{{c.id}}')">Save Edit</a>
|
||||
|
@ -553,7 +553,7 @@
|
|||
|
||||
<label class="btn btn-secondary format m-0" for="file-upload-reply-{{c.fullname}}">
|
||||
<div id="filename-show-reply-{{c.fullname}}"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-reply-{{c.fullname}}').innerHTML='image/video';" hidden>
|
||||
<input autocomplete="off" id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-reply-{{c.fullname}}','file-upload-reply-{{c.fullname}}')" hidden>
|
||||
</label>
|
||||
</div>
|
||||
<a id="save-reply-to-{{c.fullname}}" class="btn btn-primary ml-2 fl-r commentmob" onclick="post_comment('{{c.fullname}}', '{{c.post.id}}');" role="button">Comment</a>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<textarea autocomplete="off" maxlength="10000" id="input-message" form="contactform" name="message" class="form-control" required></textarea>
|
||||
<label class="btn btn-secondary m-0 mt-3" for="file-upload">
|
||||
<div id="filename"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename').innerHTML='image/video';" hidden>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename','file-upload')" hidden>
|
||||
</label>
|
||||
<input autocomplete="off" type="submit" value="Submit" class="btn btn-primary mt-3">
|
||||
</form>
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
</div>
|
||||
</nav>
|
||||
|
||||
<script src="/static/assets/js/header.js?a=240"></script>
|
||||
<script src="/static/assets/js/header.js?a=242"></script>
|
||||
|
||||
<style>
|
||||
.notif-count {
|
||||
|
|
|
@ -537,7 +537,7 @@
|
|||
|
||||
<label class="btn btn-secondary format d-inline-block m-0">
|
||||
<div id="filename-show"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*, video/*" onchange="document.getElementById('filename-show').innerHTML='image/video';" hidden>
|
||||
<input autocomplete="off" id="file-upload" type="file" name="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*, video/*" onchange="changename('filename-show','file-upload')" hidden>
|
||||
</label>
|
||||
</div>
|
||||
<pre></pre>
|
||||
|
|
|
@ -557,7 +557,7 @@
|
|||
|
||||
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-edit-{{p.id}}">
|
||||
<div id="filename-show-edit-{{p.id}}"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload-edit-{{p.id}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-edit-{{p.id}}').innerHTML='image/video';" hidden>
|
||||
<input autocomplete="off" id="file-upload-edit-{{p.id}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-edit-{{p.id}}','file-upload-edit-{{p.id}}')" hidden>
|
||||
</label>
|
||||
|
||||
<small class="format d-none"><i class="fas fa-link" aria-hidden="true"></i></small>
|
||||
|
@ -840,7 +840,7 @@
|
|||
</label>
|
||||
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-reply-{{p.fullname}}">
|
||||
<div id="filename-show-reply-{{p.fullname}}"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload-reply-{{p.fullname}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-reply-{{p.fullname}}').innerHTML='image/video';" hidden>
|
||||
<input autocomplete="off" id="file-upload-reply-{{p.fullname}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-reply-{{p.fullname}}','file-upload-reply-{{p.fullname}}')" hidden>
|
||||
</label>
|
||||
</div>
|
||||
<a id="save-reply-to-{{p.fullname}}" role="button" form="reply-to-{{p.fullname}}" class="btn btn-primary text-whitebtn ml-auto fl-r" onclick="post_comment('{{p.fullname}}', '{{p.id}}')">Comment</a>
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
|
||||
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-submit">
|
||||
<div id="filename-show-submit"><i class="far fa-image"></i></div>
|
||||
<input autocomplete="off" id="file-upload-submit" type="file" name="file2" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-submit').innerHTML='image/video';" hidden>
|
||||
<input autocomplete="off" id="file-upload-submit" type="file" name="file2" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-submit','file-upload-submit')" hidden>
|
||||
</label>
|
||||
|
||||
<pre></pre>
|
||||
|
@ -241,7 +241,7 @@
|
|||
|
||||
<script src="/static/assets/js/marked.js?a=240"></script>
|
||||
<script src="/static/assets/js/formatting.js?a=240"></script>
|
||||
<script src="/static/assets/js/submit.js?a=240"></script>
|
||||
<script src="/static/assets/js/submit.js?a=242"></script>
|
||||
{% include "emoji_modal.html" %}
|
||||
{% include "gif_modal.html" %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue