Wall: Add attachment type picker

This commit is contained in:
Celestora 2021-10-13 20:48:36 +03:00
parent b1ebfcac22
commit 722690474e
3 changed files with 36 additions and 5 deletions

3
.gitmodules vendored
View file

@ -1,3 +1,6 @@
[submodule "locales"]
path = locales
url = https://github.com/openvk/locales
[submodule "Web/static/img/oxygen-icons"]
path = Web/static/img/oxygen-icons
url = https://github.com/KDE/oxygen-icons5.git

View file

@ -34,11 +34,18 @@
<input type="hidden" name="hash" value="{$csrfToken}" />
<br/>
<input type="submit" value="{_'write'}" class="button" />
<div style="float: right;">
<div style="float: right; display: flex; flex-direction: column;">
<a href="javascript:void(u('#wallAttachmentMenu').toggleClass('hidden'));">
Прикрепить
</a>
<div id="wallAttachmentMenu" class="hidden">
<a href="javascript:void(document.querySelector('input[name=_pic_attachment]').click());">
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-x-egon.png" />
{_attach_photo}
</a>
</div>
</div>
</div>
</form>
</div>

View file

@ -24,8 +24,8 @@ span {
color: gray;
}
nobold {
font-weight: normal;
.hidden {
display: none;
}
a {
@ -1378,3 +1378,24 @@ body.scrolled .toTop:hover {
display: flex;
padding: 1px;
}
#wallAttachmentMenu {
position: absolute;
margin-top: 20px;
border: 1px solid darkgrey;
background-color: white;
}
#wallAttachmentMenu > a {
display: block;
padding: 2px 6px;
cursor: pointer;
}
#wallAttachmentMenu > a > img {
vertical-align: middle;
}
#wallAttachmentMenu > a:hover {
background-color: #f0f0f0;
}