Browse Source

Merge pull request 'fix-1985' (#2140) from fix-1985 into V20220519

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/2140
Reviewed-by: wangj <wangj@noreply.localhost>
V20220519
wangj 3 years ago
parent
commit
4c40212c9b
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      web_src/js/features/contexmenu.js

+ 4
- 0
web_src/js/features/contexmenu.js View File

@@ -48,6 +48,10 @@ export default async function initContextMenu() {
let btn = a.currentTarget.parentNode.nextElementSibling.getElementsByTagName("button")[0]
btn.addEventListener('click', function (e) {
let postUrl = btn.getAttribute('data-postbasepath')
const postUrlArr = postUrl.split('/')
postUrlArr[postUrlArr.length - 1] = encodeURIComponent(postUrlArr[postUrlArr.length - 1])
postUrl = postUrlArr.join('/')
console.log(postUrl)
let last_commit = btn.getAttribute('data-commit')
let tree_path = btn.getAttribute('data-treepath') + e.target.parentNode.previousElementSibling.getElementsByTagName("input")[0].value
let csrf = $("input[name='_csrf']").val()


Loading…
Cancel
Save