Browse Source

Merge pull request '修改1250关联的1607 1605' (#1618) from fix-1250 into V20220314

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1618
Reviewed-by: zhoupzh <zhoupzh@pcl.ac.cn>
tags/V1.22.3.1^2
wangjr 3 years ago
parent
commit
46f08251d4
2 changed files with 29 additions and 4 deletions
  1. +1
    -1
      options/locale/locale_zh-CN.ini
  2. +28
    -3
      templates/org/home.tmpl

+ 1
- 1
options/locale/locale_zh-CN.ini View File

@@ -2105,7 +2105,7 @@ select_again = 选择超过9个,请重新选择!
custom_select_projects = 自定义精选项目
customize = 自定义
selected_project=精选项目
fold = 折叠
fold = 收起
unfold = 展开

form.name_reserved=组织名称 '%s' 是被保留的。


+ 28
- 3
templates/org/home.tmpl View File

@@ -29,16 +29,17 @@
<div class="ui mobile reversed stackable grid">
<div class="ui sixteen wide tablet sixteen wide computer column margin-bottom20 pad-botom maxheight" id='key_tag'>
{{if .OrgTopics}}
<a class="{{if eq $.Keyword "" }} tag_bg {{end}} tag_key ui small tag_lable topic omit" href="{{$.Link}}?" >{{$.i18n.Tr "org.all_org_topics"}}</span></a>
<a class="{{if eq $.Keyword "" }} tag_bg {{end}} tag_key ui small tag_lable topic omit" href="{{$.Link}}?" onclick="iscontinueStatus()" id="tag_a">{{$.i18n.Tr "org.all_org_topics"}}</a>
{{end}}

{{range .OrgTopics}}
{{if ne .Name ""}}
<a class="{{if eq $.Keyword .Name }} tag_bg {{end}} tag_key ui small tag_lable topic omit" href="{{$.Link}}?q={{.Name}}" >
<a class="{{if eq $.Keyword .Name }} tag_bg {{end}} tag_key ui small tag_lable topic omit" href="{{$.Link}}?q={{.Name}}" onclick="iscontinueStatus()">
{{.Name}}
</a>
{{end}}
{{end}}

{{if .OrgTopics}}
<a class=" tag_key ui small tag_lable topic omit icon_a" onclick="isUnfold()" id="icon_btn" >
<i class="ri-arrow-down-s-line" style="display:inline-block;vertical-align:top"></i>
@@ -136,14 +137,38 @@
<script>

function isUnfold(){
// var isTrue = document.getElementById("tag_a").getAttribute("data-tag")
var isContain= document.querySelector("#key_tag").classList.contains("maxheight");
if(isContain){
if(isContain){
document.querySelector("#key_tag").classList.remove("maxheight");
document.getElementById("icon_btn").innerHTML="<i class=\"ri-arrow-up-s-line\" style=\"display:inline-block;vertical-align:top\"></i> &nbsp {{.i18n.Tr "org.fold"}}"
localStorage.setItem("isunfold",true)
}else{
document.querySelector("#key_tag").classList.add("maxheight");
document.getElementById("icon_btn").innerHTML="<i class=\"ri-arrow-down-s-line\" style=\"display:inline-block;vertical-align:top\"></i> &nbsp {{.i18n.Tr "org.unfold"}}"
localStorage.setItem("isunfold",false)
}
}

function isShowIconBtn(){
var key_height = document.getElementById("key_tag").offsetHeight
var parent = document.getElementById("key_tag")
var child = document.getElementById("icon_btn")
if (key_height < 88){
parent.removeChild(child)
}
}
function iscontinueStatus(){
var isunfold = localStorage.getItem("isunfold")
if (isunfold == "true" || isunfold == true){
document.querySelector("#key_tag").classList.remove("maxheight");
document.getElementById("icon_btn").innerHTML="<i class=\"ri-arrow-up-s-line\" style=\"display:inline-block;vertical-align:top\"></i> &nbsp {{.i18n.Tr "org.fold"}}"
}else{
document.querySelector("#key_tag").classList.add("maxheight");
document.getElementById("icon_btn").innerHTML="<i class=\"ri-arrow-down-s-line\" style=\"display:inline-block;vertical-align:top\"></i> &nbsp {{.i18n.Tr "org.unfold"}}"
}
}
isShowIconBtn()
iscontinueStatus()
</script>

Loading…
Cancel
Save