Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_aliyun
杨树明 6 years ago
commit 411f7a511f

@ -82,7 +82,7 @@
second_section = stage.competition_stage_sections[1] second_section = stage.competition_stage_sections[1]
%> %>
<div class="enter_panel" style="<%= i.zero? ? "height: 1212px" : ''%>"> <div class="enter_panel" style="<%= i.zero? ? "height: 1212px" : ''%>">
<p class="challenge_title"><%= stage.name %></p> <p class="challenge_title"><%= index == 2 ? '经典算法阅读与标注' : index == 3 ? '自然语言处理NLP' : '深度学习框架' %></p>
<ul class="clearfix challenge_sub_title"> <ul class="clearfix challenge_sub_title">
<li class="fl"> <li class="fl">
<span class="mr20"><%= first_section.try(:name) %></span> <span class="mr20"><%= first_section.try(:name) %></span>

@ -0,0 +1,13 @@
class ModifyTestUserForSchool < ActiveRecord::Migration
def up
school_ids = School.where("id < 1500").pluck(:id)
users = User.where(is_test: true).includes(:user_extensions)
users.find_each do |u|
school_id = school_ids.sample
u.user_extensions.update_column(:school_id, school_id) if u.user_extensions.present?
end
end
def down
end
end

@ -263,7 +263,7 @@ function sure_box_redirect_btn(url, str,btnstr){
function sure_box_redirect_btn2(url, str, btnstr){ function sure_box_redirect_btn2(url, str, btnstr){
var htmlvalue = '<div class="task-popup" style="width:500px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3> <a href="javascript:void(0)" id="closeIcon" style="top: -48px;right: -20px;z-index: 100000;"><i class="iconfont icon-shanchudiao"></i></a></div>'+ var htmlvalue = '<div class="task-popup" style="width:500px;"><div class="task-popup-title clearfix">提示<a href="javascript:void(0)" id="closeIcon" style="top: -48px;right: -20px;z-index: 100000;"><i class="iconfont icon-shanchudiao"></i></a></div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-submit clearfix" style="width: 150px"><a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl">取消</a>'+ '<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-submit clearfix" style="width: 150px"><a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl">取消</a>'+
'<a href="'+ url +'" class="task-btn task-btn-orange fr" target="_blank" onclick="hideModal();">'+btnstr+'</a></div></div>'; '<a href="'+ url +'" class="task-btn task-btn-orange fr" target="_blank" onclick="hideModal();">'+btnstr+'</a></div></div>';
pop_box_new(htmlvalue, 578, 205); pop_box_new(htmlvalue, 578, 205);
@ -273,14 +273,14 @@ function sure_box_redirect_btn2(url, str, btnstr){
//提示框:只有一个知道啦按钮,点击打开新窗口 //提示框:只有一个知道啦按钮,点击打开新窗口
//<a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a> //<a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
function sure_box_redirect_without_newtab(url, str){ function sure_box_redirect_without_newtab(url, str){
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+ var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix">提示</div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-OK clearfix">'+ '<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-OK clearfix">'+
'<a href="'+ url +'" class="task-btn task-btn-orange" onclick="hideModal();" >知道啦</a></div></div>'; '<a href="'+ url +'" class="task-btn task-btn-orange" onclick="hideModal();" >知道啦</a></div></div>';
pop_box_new(htmlvalue, 480, 160); pop_box_new(htmlvalue, 480, 160);
} }
//按钮内容自定义 //按钮内容自定义
function sure_box_redirect_without_newtab_btn(url, str,btnstr){ function sure_box_redirect_without_newtab_btn(url, str,btnstr){
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+ var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix">提示</div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-OK clearfix">'+ '<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-OK clearfix">'+
'<a href="'+ url +'" class="task-btn task-btn-orange" onclick="hideModal();" >'+btnstr+'</a></div></div>'; '<a href="'+ url +'" class="task-btn task-btn-orange" onclick="hideModal();" >'+btnstr+'</a></div></div>';
pop_box_new(htmlvalue, 480, 160); pop_box_new(htmlvalue, 480, 160);
@ -289,7 +289,7 @@ function sure_box_redirect_without_newtab_btn(url, str,btnstr){
//提示框:只有一个确定按钮,点击跳转 //提示框:只有一个确定按钮,点击跳转
//<a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a> //<a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
function notice_box_redirect(url, str){ function notice_box_redirect(url, str){
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+ var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix">提示</div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+ '<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+
'<a href="'+ url +'" class="task-btn task-btn-orange" onclick="hideModal();">确定</a></div></div>'; '<a href="'+ url +'" class="task-btn task-btn-orange" onclick="hideModal();">确定</a></div></div>';
pop_box_new(htmlvalue, 480, 160); pop_box_new(htmlvalue, 480, 160);
@ -298,7 +298,7 @@ function notice_box_redirect(url, str){
//提示框:只有一个确定按钮,点击跳转(局部刷新) //提示框:只有一个确定按钮,点击跳转(局部刷新)
//<a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a> //<a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
function notice_box_redirect_remote(url, str){ function notice_box_redirect_remote(url, str){
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+ var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix">提示</div>'+
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+ '<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+
'<a href="'+ url +'" class="task-btn task-btn-orange" data-remote="true">确定</a></div></div>'; '<a href="'+ url +'" class="task-btn task-btn-orange" data-remote="true">确定</a></div></div>';
pop_box_new(htmlvalue, 480, 160); pop_box_new(htmlvalue, 480, 160);

Loading…
Cancel
Save