socialforge/app/views/courses/join_course_multi_role.js.erb

93 lines
8.5 KiB
Plaintext
Raw Normal View History

2016-11-17 11:10:48 +08:00
<%# if @object_id && @state != 6 && @state !=4 %>
//$("#join_in_course_header").html("<%#= escape_javascript(join_in_course_header(@course, @user)) %>");
<%# end %>
2016-07-29 19:19:58 +08:00
<% if @state %>
<% if @state == 0 %>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">加入成功</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 1 %>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">密码错误</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 2 %>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">班级已过期<br/>请联系班级管理员重启班级。(在配置班级处)</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 3 %>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经加入了班级</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 4 %>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您输入的邀请码错误</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 5 %>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您还未登录</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 6 %>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">申请成功,请等待审核</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 7%>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经发送过申请了,请耐心等待</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 8%>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经是该班级的教师了</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 9%>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经是该班级的教辅了</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 10%>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经是该班级的管理员了</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 11%>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">该班级已归档,请联系老师</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 12 %>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经发送过申请了,请耐心等待</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% elsif @state == 13 %>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">申请成功,请等待审核</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 14 %>
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">此二维码已停用,请与老师联系</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% else %>
2016-11-17 11:10:48 +08:00
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">未知错误,请稍后再试</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_blue mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
2016-11-17 11:10:48 +08:00
pop_box_new(htmlvalue, 300, 140);
2016-07-29 19:19:58 +08:00
<% end %>
<% end %>
2016-11-17 11:10:48 +08:00
function refresh_current_course(){
hideModal();
<% if @course %>
window.location.href= "<%=course_path(@course.id) %>";
<% end %>
}