Merge branch 'dev_shixun_project' of https://git.trustie.net/jacknudt/trustieforge into dev_shixun_project

This commit is contained in:
huang 2017-03-30 09:53:49 +08:00
commit 1e37c83d63
10 changed files with 49 additions and 1 deletions

View File

@ -118,6 +118,11 @@
$("#ajax-indicator").hide(); $("#ajax-indicator").hide();
var html = bt('t:exec_results',{status: data.status, output: data.output, results: data.results, had_done: data.had_done}); var html = bt('t:exec_results',{status: data.status, output: data.output, results: data.results, had_done: data.had_done});
$("#code_results").html(html); $("#code_results").html(html);
if(data.status == 2){
var htmlvalue = "<%= j (render :partial => 'games/pass_game_show', :locals => { :game=> @game, :myshixun => @myshixun}) %>";
// 传递具体屏幕的宽高,实现不同浏览器与不同分辨率都能撑满屏幕
pop_box_new2(htmlvalue, window.innerWidth, window.innerHeight);
}
} }
if(i == 30){ if(i == 30){
$.ajax({ $.ajax({

View File

@ -0,0 +1,12 @@
<%= stylesheet_link_tag 'css/bigdata-common', 'css/bigdata-popup' %>
<div class="task-popup-warp" style="background-color: rgba(0,0,0,0.7);">
<div class="task-popup-box task-box1">
<a href="javascript:void(0)" class="task-popup-close" onclick="hideModal();"></a>
<div class="task-su-con">
<p class="task-su-p">恭喜您通过本关</p>
<%= link_to "下 一 步", {:controller => 'games', :action => "next_step", :id => game, :myshixun_id => myshixun}, :class => "task-su-btn", :remote => true %>
</div>
</div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -1797,6 +1797,24 @@ function pop_box_new(value, Width, Height){
new Drag("popupWrap"); new Drag("popupWrap");
}); });
} }
// 与pop_box_new不同之处在与去除拖拽属性
function pop_box_new2(value, Width, Height){
w = ($(window).width() - Width)/2;
h = ($(window).height() - Height)/2;
var container =$('<div></div>');
container.attr('id','popupWrap');
$(document.body).append(container);
$("#popupWrap").html(value);
$("#popupWrap").show();
$('#popupWrap').css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed","z-index":"99999","background-color":"#fff","box-shadow": "0px 2px 8px rgba(146, 153, 169, 0.5)"});
$('#popupWrap').find("a[class*='close']").click(function(){
$("#popupWrap").hide();
});
$("#popupWrap input, #popupWrap textarea, #popupWrap ul, #popupWrap a").mousedown(function(event){
event.stopPropagation();
new Drag("popupWrap");
});
}
function close_modal(){ function close_modal(){
$("#popupWrap").hide(); $("#popupWrap").hide();

View File

@ -4,3 +4,16 @@
.task-popup-title{ border-bottom: 1px solid #eee; padding:10px 15px; } .task-popup-title{ border-bottom: 1px solid #eee; padding:10px 15px; }
.task-popup-content{ padding:15px;} .task-popup-content{ padding:15px;}
.task-popup-submit{ margin:15px auto; width: 200px;} .task-popup-submit{ margin:15px auto; width: 200px;}
/************实训弹窗****************/
.task-popup-warp{ width: 100%; height:100%; background:black; position:fixed;}
.task-popup-box{ position: relative; margin:150px auto; }
.task-box1{ width:428px; height:420px;background:url(/images/task/task-success.png) 0px 0px no-repeat;}
.task-box2{ width:496px; height:373px;background:url(/images/task/task-success02.png) 0px 50px no-repeat;}
a.task-popup-close{ display: block; background:url(/images/task/task-close.png) 0px 0px no-repeat; width: 31px; height: 31px; position:absolute; right:5px; top:100px;}
a:hover.task-popup-close{background:url(/images/task/task-close.png) -40px 0px no-repeat; }
.task-su-con{ text-align: center; padding-top:285px;}
.task-su-p{ font-size: 20px; color:#ee4a1f; font-weight: bold;}
a.task-su-btn{display: block;background:url(/images/task/task-su-btn.png) 0px -64px no-repeat; width: 138px; height: 57px;color:#ee4a1f; line-height: 50px; text-align: center; font-size: 16px; margin:20px auto;}
a:hover.task-su-btn{background:url(/images/task/task-su-btn.png) 0px 0px no-repeat; }
a.task-su-btn-white{ display: inline-block; padding:8px 25px; border:1px solid #fff; color:#fff; text-align: center; border-radius:5px; font-size:14px;}
a:hover.task-su-btn-white{ color: #ee4a1f; border:1px solid #ee4a1f; }