mirror of
https://github.com/openvk/openvk
synced 2024-12-22 08:31:18 +03:00
fix(ajax): fix photo picker
This commit is contained in:
parent
9ceeee9bd5
commit
d504067722
2 changed files with 4 additions and 2 deletions
|
@ -1381,6 +1381,7 @@ u(document).on("click", "#__photoAttachment", async (e) => {
|
|||
// add photo
|
||||
u(".ovk-diag-body .attachment_selector").on("click", ".album-photo", async (ev) => {
|
||||
ev.preventDefault()
|
||||
ev.stopPropagation()
|
||||
|
||||
const target = u(ev.target).closest('.album-photo')
|
||||
const dataset = target.nodes[0].dataset
|
||||
|
@ -1906,6 +1907,7 @@ u(document).on('click', `.vertical-attachment #small_remove_button`, (e) => {
|
|||
|
||||
u(document).on('click', '.post-buttons .upload-item', (e) => {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
})
|
||||
|
||||
u(document).on('click', '.post.post-nsfw .post-content', (e) => {
|
||||
|
|
|
@ -152,7 +152,7 @@ window.router = new class {
|
|||
return false
|
||||
}
|
||||
|
||||
if(!url || url == '') {
|
||||
if(!url || url == '' || url == '/') {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -315,7 +315,7 @@ u(document).on('submit', 'form', async (e) => {
|
|||
|
||||
const url_object = new URL(url)
|
||||
if(method == 'get' || method == 'GET') {
|
||||
url_object.searchParams.append('hash', window.router.csrf)
|
||||
//url_object.searchParams.append('hash', window.router.csrf)
|
||||
$(form).serializeArray().forEach(param => {
|
||||
url_object.searchParams.append(param.name, param.value)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue