diff options
author | Vitaly Takmazov | 2017-11-01 01:57:08 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-11-01 01:57:08 +0300 |
commit | 3e87cc6a73fbfc165f81d5f7a3d7d1f76e7feb9a (patch) | |
tree | 68023133cec4261e38fa9ed56d26626553847e21 /juick-www/src/main/static/scripts.js | |
parent | 20e19b4242f888aafe3c55f9dabe3af46728cbab (diff) |
www: /post should not throw if img or attach is present
Diffstat (limited to 'juick-www/src/main/static/scripts.js')
-rw-r--r-- | juick-www/src/main/static/scripts.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js index 7dc24dd2..e33d1929 100644 --- a/juick-www/src/main/static/scripts.js +++ b/juick-www/src/main/static/scripts.js @@ -292,7 +292,9 @@ function newMessage(evt) { document.querySelectorAll('#newmessage .dialogtxt').forEach(t => { t.remove(); }); - if (document.querySelector('#newmessage textarea').value.length == 0) { + if (document.querySelector('#newmessage textarea').value.length == 0 + && document.querySelector('#newmessage .img').value.length == 0 + && !document.querySelector('#newmessage input[type="file"]')) { document.querySelector('#newmessage').insertAdjacentHTML('afterbegin', `<p class="dialogtxt">${i18n('postForm.pleaseInputMessageText')}</p>`); evt.preventDefault(); } |