实训路径中点击实训弹出新的页面

This commit is contained in:
huang 2017-08-31 16:25:01 +08:00
parent 93bc2ae4dd
commit e3ce07dacc
2 changed files with 23 additions and 4 deletions

View File

@ -2,13 +2,18 @@
sure_box_redirect('#{security_settings_path}', '开启实训,请先绑定邮箱');
<% else %>
<% if @is_modify.blank? %>
//为了防止浏览器阻挡
//为了防止浏览器阻挡,在实训路径中需要弹出新的页面,而实训首页又不需要弹出新的页面
<% if @is_subject %>
var newTab=window.open("/loading.html");
$.ajax().done(function() {
// 重定向到目标页面
newTab.location.href = "<%= shixun_exec_shixun_path(@shixun) %>";
});
<% else %>
$(".loading_all").show();
window.location.href="<%= shixun_exec_shixun_path(@shixun) %>";
$("#ajax-indicator").hide();
//var tempwindow = window.open();
//tempwindow.location = '<%#= shixun_exec_shixun_path(@shixun) %>';
//window.open("<%#= shixun_exec_shixun_path(@shixun) %>");
<% end %>
<% else %>
sure_box_redirect('<%= myshixun_reset_myshixun_path(@myshixun) %>', '实训已经更新啦,系统正在为您重置');
<% end %>

14
public/loading.html Normal file
View File

@ -0,0 +1,14 @@
<style type="text/css">
/*模拟实战---加载等待*/
.loading_all{background:#ffffff;z-index: 100000;width: 100%;height: 100%;position: fixed;left: 0px;top:0px;text-align: center;}
.loading_main img{border-radius: 4px;}
.loading_main span{font-size: 44px;font-weight: bold;color: #ff7500;letter-spacing: 5px;margin-left: 5px;}
.load{width: auto;top:50%;margin-top:-100px;position: relative;}
.loading_seconde{color: #ff7500;letter-spacing: 3px;font-size: 16px;}
</style>
<div class="loading_all">
<div class="load">
<div class="loading_main"><img src="/images/../images/bigdata/bigdata-logo.png?1502328187" /><span>EDUCODER</span></div>
<p class="loading_seconde">LOADING<img src="/images/../images/bigdata/shenglue-ring.gif" /></p>
</div>
</div>