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"] [submodule "locales"]
path = locales path = locales
url = https://github.com/openvk/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,10 +34,17 @@
<input type="hidden" name="hash" value="{$csrfToken}" /> <input type="hidden" name="hash" value="{$csrfToken}" />
<br/> <br/>
<input type="submit" value="{_'write'}" class="button" /> <input type="submit" value="{_'write'}" class="button" />
<div style="float: right;"> <div style="float: right; display: flex; flex-direction: column;">
<a href="javascript:void(document.querySelector('input[name=_pic_attachment]').click());"> <a href="javascript:void(u('#wallAttachmentMenu').toggleClass('hidden'));">
{_attach_photo} Прикрепить
</a> </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>
</div> </div>
</form> </form>

View file

@ -24,8 +24,8 @@ span {
color: gray; color: gray;
} }
nobold { .hidden {
font-weight: normal; display: none;
} }
a { a {
@ -1378,3 +1378,24 @@ body.scrolled .toTop:hover {
display: flex; display: flex;
padding: 1px; 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;
}