Browse Source

Merge branch 'V20220601' of git.openi.org.cn:OpenI/aiforge into grampus

tags/v1.22.6.2
lewis 3 years ago
parent
commit
70716aff43
2 changed files with 6 additions and 1 deletions
  1. +2
    -1
      templates/repo/view_list.tmpl
  2. +4
    -0
      web_src/js/features/contexmenu.js

+ 2
- 1
templates/repo/view_list.tmpl View File

@@ -131,7 +131,8 @@
<div class="ui column form" method="POST">
<div class="two fields" style="margin: 0;">
<div class="five wide field">
<input class="ui input" name="new_filename" type="text" value="">
<input class="ui input" name="new_filename" type="text" value=""
onkeyup="this.value=this.value.replace(/[, ]/g,'')">
</div>
<div class="five wide field">
<button class="ui blue button popup-save" type="button"


+ 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