版本库刷新页面时“git操作指南”展开收起保持一致

This commit is contained in:
whimlex 2015-05-06 17:41:18 +08:00
parent a7b2ac860b
commit 3c72af69ea
3 changed files with 24 additions and 1 deletions

View File

@ -30,7 +30,7 @@
</p>
</div>
</div>
<div class="repos_more"><a id="showgithelp" value="hide_help" onclick ="showhelpAndScrollTo('repos_git_more'); " class="c_dblue lh23">收起Git操作指南</a></div>
<div class="repos_more"><a id="showgithelp" value="show_help" onclick ="showhelpAndScrollTo('repos_git_more'); " class="c_dblue lh23">展开Git操作指南</a></div>
<div id="repos_git_more">
<br>
<div class=" c_dark f14">

View File

@ -71,13 +71,35 @@ function showhelpAndScrollTo(id) {
{
cookiesave("repositories_visiable", true,'','','');
}
var information = $("#showgithelp");
var val = information.attr("value");
if(val=="show_help")
{
$("#showgithelp").text("收起Git操作指南");
information.attr("value", "hide_help");
}
else
{
$("#showgithelp").text("展开Git操作指南");
information.attr("value", "show_help");
}
}
$(function(){
var information = $("#showgithelp");
var val = information.attr("value");
if(cookieget("repositories_visiable") == "true")
{
$('#repos_git_more').hide();
}
else
{
$('#repos_git_more').show();
$("#showgithelp").text("收起Git操作指南");
information.attr("value", "hide_help");
}
});

View File

@ -180,6 +180,7 @@ a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; col
/* 版本库展示Git操作文档 */
.repos_more{height:23px; width:100%; border:1px solid #CCC; background:#F6F6F6; text-align:center; font-size:12px; padding-top:2px;}
.lh23{line-height: 23px;}
.repos_git_more{display: none;}
/* 弹框 新样式还没设计出来,暂时用的课程那边的样式 */
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}