实训界面扩大缩小功能

This commit is contained in:
daiao 2017-03-20 17:14:05 +08:00
parent 5e7dd60194
commit 1d22b7e2b9
3 changed files with 98 additions and 40 deletions

View File

@ -4,12 +4,33 @@
<div id="code_results">
</div>
<script id="t:exec_results" type="text/html">
<div class="col-width fl mt15 content-half-fix undis" style="margin-top:125px;">
<div class="panel-header clearfix">
<h3 class="fl">测评历史</h3>
<div class="fr mt5">
<a href="#"><i class="fa fa-minus font-14 mr10 fl color-grey"></i></a>
<a href="javascript:void(0)" onclick="hide_windows();"><i class="fa fa-compress font-14 fl color-grey"></i></a>
</div>
</div>
<div class="content-history-inner" style="height: 100px;">
<div class="clearfix history-success mb10">
<span class="icon-success fl mr5">2</span>
<p class="fl">恭喜,您已经完成了本任务!</p>
<a href="#" class="fr mr10">详情</a>
</div>
<div class="clearfix history-fail mb10">
<span class="icon-fail fl mr5">1</span>
<p class="fl">错误结果!</p>
<a href="#" class="fr mr10">详情</a>
</div>
</div>
</div>
<div class="col-width fl content-history mt15" >
<div class="panel-header clearfix">
<h3 class="fl">测评历史</h3>
<div class="fr mt5">
<a href="#"><i class="fa fa-minus font-14 mr10 fl color-grey"></i></a>
<a href="#"><i class="fa fa-minus-square font-14 fl color-grey"></i></a>
<a href="javascript:void(0)" onclick="extend_window()"><i class="fa fa-minus-square font-14 fl color-grey"></i></a>
</div>
</div>
<div class="content-history-inner">
@ -86,4 +107,36 @@
})
}
function extend_window(){
var web_h = window.innerHeight;
if($.browser.msie) {
$(".content-half-fix").css("width", "42%");
$(".content-half-fix").css("height", web_h - 168 + "px");
}
else if($.browser.safari)
{
$(".content-half-fix").css("width", "42%");
$(".content-half-fix").css("height", web_h - 168 + "px");
}
else if($.browser.mozilla)
{
$(".content-half-fix").css("width", "42%");
$(".content-half-fix").css("height", web_h - 168 + "px");
}
else if($.browser.opera) {
$(".content-half-fix").css("width", "42%");
}else if($.browser.chrome){
if(window.navigator.userAgent.indexOf("MetaSr") == -1){
$(".content-half-fix").css("width", "42.5%");
$(".content-half-fix").css("height", web_h - 160 + "px");
}else{
$(".content-half-fix").css("width", "42.5%");
$(".content-half-fix").css("height", web_h - 155 + "px");
}
}
$(".content-half-fix").show();
}
function hide_windows(){
$(".content-half-fix").hide();
}
</script>

View File

@ -158,3 +158,8 @@ textarea.task-textarea-pd{ padding-bottom: 0px; padding-top:0px;}
.task-pd15-box{ padding:15px;}
.mb20{margin-bottom: 20px;}
input.knowledge_frame{height:30px;line-height:30px;border:none;background:#f3f5f7;}
/* TPi全屏展示css */
.content-all-fix{ width:98%; min-width:800px; margin:0; position: absolute; top:15px; z-index:99; }
.content-all-fix .tab-info-inner{}
.content-half-fix{ min-width:450px; margin:0; position: absolute; top:15px; z-index:99;}
.content-half-fix02{width:42.5%; min-width:450px; margin:0; min-height:936px; position: absolute; top:15px; z-index:99; right:15px;}