|
|
@@ -49,6 +49,15 @@ |
|
|
margin: 0px 5px 0px 0px !important; |
|
|
margin: 0px 5px 0px 0px !important; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|
|
|
<div id="mask"> |
|
|
|
|
|
<div id="loadingPage"> |
|
|
|
|
|
<div class="rect1"></div> |
|
|
|
|
|
<div class="rect2"></div> |
|
|
|
|
|
<div class="rect3"></div> |
|
|
|
|
|
<div class="rect4"></div> |
|
|
|
|
|
<div class="rect5"></div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
<table id="repo-files-table" class="ui single line table"> |
|
|
<table id="repo-files-table" class="ui single line table"> |
|
|
{{.CsrfTokenHtml}} |
|
|
{{.CsrfTokenHtml}} |
|
|
<thead> |
|
|
<thead> |
|
|
@@ -154,7 +163,7 @@ |
|
|
</td> |
|
|
</td> |
|
|
<td class="text right age three wide">{{TimeSince $commit.Committer.When $.Lang}}</td> |
|
|
<td class="text right age three wide">{{TimeSince $commit.Committer.When $.Lang}}</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr style="display: none;" class="context-menu-one"> |
|
|
|
|
|
|
|
|
<tr style="display: none !important;" class="context-menu-one"> |
|
|
<td colspan="12"> |
|
|
<td colspan="12"> |
|
|
<div class="ui column form" method="POST"> |
|
|
<div class="ui column form" method="POST"> |
|
|
<div class="two fields" style="margin: 0;"> |
|
|
<div class="two fields" style="margin: 0;"> |
|
|
@@ -162,7 +171,7 @@ |
|
|
<input class="ui input" name="new_filename" type="text" value=""> |
|
|
<input class="ui input" name="new_filename" type="text" value=""> |
|
|
</div> |
|
|
</div> |
|
|
<div class="five wide field"> |
|
|
<div class="five wide field"> |
|
|
<button class="ui blue button popup-save" type="button" data-postBasePath="{{$.RepoLink}}/_rename/{{EscapePound $.BranchName}}{{if $.TreePath}}/{{EscapePound $.TreePath}}{{end}}/{{$entry.Name}}" data-commit="{{$.LatestCommit.ID}}" data-treepath="{{if $.TreePath}}/{{EscapePound $.TreePath}}{{end}}/">保存</button> |
|
|
|
|
|
|
|
|
<button class="ui blue button popup-save" type="button" data-postBasePath="{{$.RepoLink}}/_rename/{{EscapePound $.BranchName}}{{if $.TreePath}}/{{EscapePound $.TreePath}}{{end}}/{{$entry.Name}}" data-commit="{{$.LatestCommit.ID}}" data-treepath="{{if $.TreePath}}{{EscapePound $.TreePath}}/{{end}}">保存</button> |
|
|
<button class="ui basic button popup-close" type="button">取消</button> |
|
|
<button class="ui basic button popup-close" type="button">取消</button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@@ -200,14 +209,27 @@ |
|
|
<script> |
|
|
<script> |
|
|
$('.popup-close').on('click',function(e){ |
|
|
$('.popup-close').on('click',function(e){ |
|
|
$(this).parents('tr').prev().css('display','table-row') |
|
|
$(this).parents('tr').prev().css('display','table-row') |
|
|
$(this).closest('tr').css("display",'none') |
|
|
|
|
|
|
|
|
$(this).closest('tr').css('cssText','display:none !important') |
|
|
}) |
|
|
}) |
|
|
$('.name.four.wide').on('contextmenu',function(e){ |
|
|
|
|
|
let ev = window.event || e; |
|
|
|
|
|
ev.preventDefault(); |
|
|
|
|
|
menu.show(e) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function test(){ |
|
|
|
|
|
$('.name.four.wide').on('contextmenu',function(e){ |
|
|
|
|
|
let ev = window.event || e; |
|
|
|
|
|
ev.preventDefault(); |
|
|
|
|
|
menu.show(e) |
|
|
|
|
|
}) |
|
|
|
|
|
// if({{.CanEditFile}}){ |
|
|
|
|
|
// $('.name.four.wide').on('contextmenu',function(e){ |
|
|
|
|
|
// let ev = window.event || e; |
|
|
|
|
|
// ev.preventDefault(); |
|
|
|
|
|
// menu.show(e) |
|
|
|
|
|
// }) |
|
|
|
|
|
// }else{ |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
test() |
|
|
// const ContextMenu = function (options) { |
|
|
// const ContextMenu = function (options) { |
|
|
// // 唯一实例 |
|
|
// // 唯一实例 |
|
|
// let instance; |
|
|
// let instance; |
|
|
@@ -376,7 +398,7 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if(a.currentTarget.parentNode.nextElementSibling){ |
|
|
if(a.currentTarget.parentNode.nextElementSibling){ |
|
|
a.currentTarget.parentNode.style.display = 'none' |
|
|
|
|
|
|
|
|
a.currentTarget.parentNode.style.setProperty('display','none','important') |
|
|
a.currentTarget.parentNode.nextElementSibling.style.display='table-row' |
|
|
a.currentTarget.parentNode.nextElementSibling.style.display='table-row' |
|
|
// a.target.parentNode.nextElementSibling = |
|
|
// a.target.parentNode.nextElementSibling = |
|
|
a.currentTarget.parentNode.nextElementSibling.getElementsByTagName("input")[0].setAttribute("value", a.currentTarget.getElementsByTagName("a")[0].getAttribute('title')) |
|
|
a.currentTarget.parentNode.nextElementSibling.getElementsByTagName("input")[0].setAttribute("value", a.currentTarget.getElementsByTagName("a")[0].getAttribute('title')) |
|
|
@@ -401,6 +423,8 @@ |
|
|
data:{last_commit:last_commit,tree_path:tree_path,_csrf:csrf}, |
|
|
data:{last_commit:last_commit,tree_path:tree_path,_csrf:csrf}, |
|
|
success:function(res){ |
|
|
success:function(res){ |
|
|
console.log(res) |
|
|
console.log(res) |
|
|
|
|
|
document.getElementById("mask").style.display = "block" |
|
|
|
|
|
location.reload() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
@@ -434,6 +458,6 @@ |
|
|
// } |
|
|
// } |
|
|
] |
|
|
] |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
console.log({{$.CanEditFile}}) |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |