From 7545272fb5c12b7cf3c53219dc8aeee679e62759 Mon Sep 17 00:00:00 2001 From: wangjr Date: Tue, 25 Jan 2022 10:40:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA=E8=AF=AD?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=9C=AA=E7=99=BB=E5=BD=95=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/base/head.tmpl | 2 +- templates/base/head_fluid.tmpl | 2 +- templates/base/head_home.tmpl | 2 +- templates/base/head_pro.tmpl | 2 +- templates/org/header.tmpl | 4 +++- templates/org/home_courses.tmpl | 29 ++++++++++++++--------------- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index c3ee80530..859cacb62 100755 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -249,7 +249,7 @@ var _hmt = _hmt || []; document.getElementById("notic_content").style.display='none' } } - if( "{{.IsCourse}}" != true || "{{.IsCourse}}" =='') { + if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) { isShowNotice(); } diff --git a/templates/base/head_fluid.tmpl b/templates/base/head_fluid.tmpl index 47ee80add..92f606aa2 100644 --- a/templates/base/head_fluid.tmpl +++ b/templates/base/head_fluid.tmpl @@ -248,7 +248,7 @@ var _hmt = _hmt || []; document.getElementById("notic_content").style.display='none' } } - if( "{{.IsCourse}}" != true || "{{.IsCourse}}" =='') { + if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) { isShowNotice(); } \ No newline at end of file diff --git a/templates/base/head_home.tmpl b/templates/base/head_home.tmpl index f29240083..9792daf12 100644 --- a/templates/base/head_home.tmpl +++ b/templates/base/head_home.tmpl @@ -252,7 +252,7 @@ var _hmt = _hmt || []; document.getElementById("notic_content").style.display='none' } } - if( "{{.IsCourse}}" != true || "{{.IsCourse}}" =='') { + if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) { isShowNotice(); } \ No newline at end of file diff --git a/templates/base/head_pro.tmpl b/templates/base/head_pro.tmpl index 7793c7436..e6dbfc03e 100644 --- a/templates/base/head_pro.tmpl +++ b/templates/base/head_pro.tmpl @@ -249,7 +249,7 @@ var _hmt = _hmt || []; document.getElementById("notic_content").style.display='none' } } - if( "{{.IsCourse}}" != true || "{{.IsCourse}}" =='') { + if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) { isShowNotice(); } \ No newline at end of file diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl index bef9cd8b1..2dc1c35d1 100644 --- a/templates/org/header.tmpl +++ b/templates/org/header.tmpl @@ -47,7 +47,8 @@ } else { $('.alert').html(data.error_msg).removeClass('alert-success').addClass('alert-danger').show().delay(5000).fadeOut(); } - location.reload() + setTimeout("location.reload()",2000); + // location.reload() // if(data.code==0){ // alert("Join success") // location.reload() @@ -57,6 +58,7 @@ // } }, }); + } diff --git a/templates/org/home_courses.tmpl b/templates/org/home_courses.tmpl index 421ebf207..ef5d4b046 100644 --- a/templates/org/home_courses.tmpl +++ b/templates/org/home_courses.tmpl @@ -135,11 +135,11 @@
- -
+ - + {{end}} +
@@ -204,7 +204,9 @@ {{end}}
- {{.i18n.Tr "org.teams.join_teams"}} + {{if .IsSigned}} + {{.i18n.Tr "org.teams.join_teams"}} + {{end}}
{{if .IsOrganizationMember}} @@ -424,6 +426,7 @@ document.getElementById("recommend").innerHTML=rec +" : "+ show_num } + function jion_course_team(){ $.ajax({ type:"GET", @@ -437,15 +440,11 @@ } else { $('.alert').html(data.error_msg).removeClass('alert-success').addClass('alert-danger').show().delay(5000).fadeOut(); } - location.reload() - // if(data.code==0){ - // alert("Join success") - // location.reload() - - // }else{ - // alert("Join failure") - // } - } - }); + setTimeout("location.reload()",2000); + }, + + }); + } + \ No newline at end of file