#2136 fix issue

Merged
liuzx merged 2 commits from fix-1985 into V20220519 2 years ago
  1. +1
    -1
      templates/repo/cloudbrain/benchmark/show.tmpl
  2. +2
    -4
      web_src/js/features/contexmenu.js

+ 1
- 1
templates/repo/cloudbrain/benchmark/show.tmpl View File

@@ -485,7 +485,7 @@

<td class="ti-text-form-content">
<div class="text-span text-span-w" id="{{.VersionName}}-mirror">
{{if .User.Name}}
{{if .User}}
{{.User.Name}}
{{else}}
--


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

@@ -40,7 +40,8 @@ export default async function initContextMenu() {
if (a.currentTarget.parentNode.nextElementSibling) {
a.currentTarget.parentNode.style.setProperty('display', 'none', 'important')
a.currentTarget.parentNode.nextElementSibling.style.display = 'table-row'
a.currentTarget.parentNode.nextElementSibling.getElementsByTagName("input")[0].setAttribute("value", a.currentTarget.getElementsByTagName("a")[0].getAttribute('title'))
let renameFile = a.currentTarget.getElementsByTagName("a")[0].getAttribute('title')
a.currentTarget.parentNode.nextElementSibling.getElementsByTagName("input")[0].setAttribute("value", renameFile.substr(0, renameFile.indexOf('/')))

}
let btn = a.currentTarget.parentNode.nextElementSibling.getElementsByTagName("button")[0]
@@ -55,9 +56,6 @@ export default async function initContextMenu() {
contentType: "application/x-www-form-urlencoded",
data: { last_commit: last_commit, tree_path: tree_path, _csrf: csrf },
success: function (res) {
console.log("--------------")
console.log(res.Code)
console.log(res.Message)
if (res.Code === 0) {
document.getElementById("mask").style.display = "block"
location.reload()


Loading…
Cancel
Save