Skip to content

Commit

Permalink
项目展示页的左侧栏将采用固定布局
Browse files Browse the repository at this point in the history
  • Loading branch information
star7th committed Sep 16, 2017
1 parent 4ddfa4b commit 9db4a52
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 32 deletions.
24 changes: 13 additions & 11 deletions Application/Home/View/Item/show_regular.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<include file="Common/header" />
<link rel="stylesheet" href="__PUBLIC__/css/item/show.css?1.1d.1thdddefghi" />
<link rel="stylesheet" href="__PUBLIC__/css/item/show.css?1.1d.1thdddefghi1" />

<div class="doc-head row" >
<div class="left "><h2>{$item.item_name}</h2></div>
Expand Down Expand Up @@ -54,6 +54,17 @@
</div>
</form>

<!-- 新建栏 -->
<div class="doc-left-newbar">

<if condition="$ItemPermn && !$item['is_archived']">
<div><a title="{$Think.Lang.new_page}" href="{:U('Home/Page/edit',array('item_id'=>$item['item_id'],'type'=>'new'))}" id="new-like"><i class="icon-plus"></i>&nbsp;</a>
<a title="{$Think.Lang.new_or_edit_catalog}" href="{:U('Home/Catalog/edit',array('item_id'=>$item['item_id']))}" id="dir-like" ><i class="icon-folder-open"></i></a>
</div>
</if>

</div>

<ul class="nav nav-list bs-docs-sidenav">

<!-- 一级目录的页面在前面 -->
Expand Down Expand Up @@ -89,16 +100,7 @@
</foreach>

</ul>
<!-- 新建栏 -->
<div class="doc-left-newbar">

<if condition="$ItemPermn && !$item['is_archived']">
<div><a href="{:U('Home/Page/edit',array('item_id'=>$item['item_id'],'type'=>'new'))}" id="new-like"><i class="icon-plus"></i>&nbsp;{$Think.Lang.new_page}</a></div>
<div><a href="{:U('Home/Catalog/edit',array('item_id'=>$item['item_id']))}" id="dir-like" ><i class="icon-folder-open"></i>{$Think.Lang.new_catalog}</a></div>

</if>

</div>

<input type="hidden" id="item_id" value="{$item.item_id}">
<input type="hidden" id="item_domain" value="{$item.item_domain}">
Expand Down Expand Up @@ -182,4 +184,4 @@ <h3>{$Think.Lang.share_page}</h3>
<script src="__PUBLIC__/js/jquery.hotkeys.js"></script>
<script src="__PUBLIC__/jquery.zclip/jquery.zclip.js"></script>

<script src="__PUBLIC__/js/item/show.js?v=1.2121234567890123456"></script>
<script src="__PUBLIC__/js/item/show.js?v=1.21212345678901234567"></script>
3 changes: 3 additions & 0 deletions Application/Home/View/Page/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
margin: 10px;

}
#edit-cat{
width: 750px;
}
</style>
<div id="edit-cat" class="modal hide fade">
<div class="modal-header">
Expand Down
28 changes: 20 additions & 8 deletions Public/css/item/show.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
padding-bottom: 10px;
padding-left: 10px;
border-bottom: 1px solid #eee;
position: fixed;
width: 100%;
background-color: #FFFFFF;
z-index: 999;
height: 60px;
}

.doc-head .left{
Expand All @@ -19,15 +24,19 @@
}
.doc-left{
width: 240px;
position: relative;
padding-top: 10px;
min-height: 100%;
margin-top: 81px;
height: calc(100% - 90px);
border-right-color: rgb(221, 221, 221);
border-right-width: 1px;
border-right-style: solid;
overflow-y: auto;
display: block;
background: rgb(245, 245, 245);
/*background: rgb(245, 245, 245);*/
position: fixed;
}

.doc-left .form-search{
padding-top: 15px;
}

.doc-left ul li{
Expand All @@ -42,7 +51,10 @@
text-shadow: 0 -1px 0 rgba(0,0,0,0.2);
background-color: #08c;
}

.doc-right{
margin-top: 81px;
margin-left: 260px;
}
.child-ul{
list-style: none;
padding-left: 10px;
Expand All @@ -63,9 +75,9 @@
}

.doc-left-newbar{
float: right;
margin-right: 20px;
margin-top: 20px;
/*float: right;*/
margin-left: 180px;
margin-top: 10px;
}

.page-edit-link{
Expand Down
17 changes: 4 additions & 13 deletions Public/js/item/show.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ $(function(){
$(".doc-left").css("width",'100%');
$(".doc-left").css("height",'initial');
$(".doc-left").css("min-height",'0px');
$(".doc-left").css("position",'static');
$(".doc-right").css("margin-top",'0px');
$(".doc-right").css("margin-left",'0px');
$(".doc-right").removeClass("span12");
$(".doc-head .right").hide();
$(".page-edit-link").html('');
Expand Down Expand Up @@ -225,19 +228,7 @@ function iFrameHeight() { 
ifr.onload = function() {
var iDoc = ifr.contentDocument || ifr.document;
var height = calcPageHeight(iDoc);
ifr.style.height = height + 'px';


if(!isMobile() && $(window).width() > 1000){
//调节左侧栏背景的最小高度
if(height > document.body.clientHeight){
$(".doc-left").css("min-height",(height+60) + 'px');
}else{
$(".doc-left").css("min-height",'100%');
}
}


ifr.style.height = height + 'px';
}
 }

Expand Down

0 comments on commit 9db4a52

Please sign in to comment.