Browse Source

fix issue

tags/v1.21.12.1^2
zhoupzh 3 years ago
parent
commit
7ed336271e
3 changed files with 11 additions and 4 deletions
  1. +6
    -1
      templates/repo/header.tmpl
  2. +4
    -2
      templates/repo/modelmanage/showinfo.tmpl
  3. +1
    -1
      web_src/js/components/Model.vue

+ 6
- 1
templates/repo/header.tmpl View File

@@ -97,16 +97,21 @@
<span>{{svg "octicon-code" 16}} {{.i18n.Tr "repo.code"}} <i class="dropdown icon"></i></span>
</a>
<div class="dropdown-content">
{{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }}
<a style="border: none;" class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
{{svg "octicon-tag" 16}} {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .NumReleases}}gray{{else}}blue{{end}} small label">{{.NumReleases}}</span>
</a>
{{end}}
{{if or (.Permission.CanRead $.UnitTypeWiki) (.Permission.CanRead $.UnitTypeExternalWiki)}}
<a style="border: none;" class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki" {{if (.Permission.CanRead $.UnitTypeExternalWiki)}} target="_blank" rel="noopener noreferrer" {{end}}>
{{svg "octicon-book" 16}} {{.i18n.Tr "repo.wiki"}}
</a>
{{end}}
{{if and (.Permission.CanReadAny $.UnitTypePullRequests $.UnitTypeIssues $.UnitTypeReleases) (not .IsEmptyRepo)}}
<a style="border: none;" class="{{if .PageIsActivity}}active{{end}} item" href="{{.RepoLink}}/activity">
{{svg "octicon-pulse" 16}} {{.i18n.Tr "repo.activity"}}
</a>
{{end}}
</div>
</div>


+ 4
- 2
templates/repo/modelmanage/showinfo.tmpl View File

@@ -93,7 +93,7 @@
<tr>
<td class="ti-text-form-label text-width80">标签</td>
<td class="ti-text-form-content">
<div id="Label">
<div id="Label" style="overflow: hidden;width: 95%;">
</div>
@@ -219,6 +219,7 @@ function tranSize(value){
return size+unitArr[index];
}
function editorFn(context){
debugger
let id= context.dataset.id
let text = context.dataset.desc
$('#edit-td').replaceWith("<div id='edit-div' style='width:80%;display: inline-block;'><textarea id='textarea-value' value='' rows='3' maxlength='255' style='width:80%;' id='edit-text'>"+text+"</textarea><i class='check icon' style='color: #50d4ab;' onclick='editorSure(\"" + text + "\",\"" + id + "\")'></i><i class='times icon' style='color: #f66f6a;' onclick='editorCancel(\"" + text + "\",\"" + id + "\")'></i></div>");
@@ -228,6 +229,7 @@ function editorCancel(text,id){
$('#edit-div').replaceWith(`<div id="edit-td" style="display:flex;"><span id="Description" title="${text}" class="iword-elipsis">${text}</span><i id="edit-pencil" data-id="${id}" data-desc="${text}" class="pencil alternate icon" style="cursor:pointer;vertical-align: top;" id="editor" onclick="editorFn(this)"></div>`)
}
function editorSure(text,id){
debugger
let description=$('#textarea-value').val()
let data = {
ID:id,
@@ -258,7 +260,7 @@ function renderInfo(obj,accObj,id){
let labelArray = obj[key].trim().replace(/ +/g,' ').split(' ')
let html=''
for(let i=0;i<labelArray.length;i++){
html += `<a class="ui label">${labelArray[i]}</a>`
html += `<a class="ui label" title="${labelArray[i]}">${labelArray[i]}</a>`
}
$('#Label').append(html)
}


+ 1
- 1
web_src/js/components/Model.vue View File

@@ -458,7 +458,7 @@ export default {
margin-right: 3px;
font-size: 12px;
}
/deep/ .el-table_1_column_1.is-left .cell {padding-right: 0px !important;}
/deep/ .el-table_1_column_1.is-left .cell {padding-right: 0px !important;white-space: nowrap;}
/deep/ .el-table__expand-icon .el-icon-arrow-right{
font-family: element-icons!important;
speak: none;


Loading…
Cancel
Save