dev_xiangzheng
huang 10 years ago
commit 98ee22a3b6

@ -303,6 +303,7 @@ class CoursesService
#@state == 7 您已经发送过申请了,请耐心等待 #@state == 7 您已经发送过申请了,请耐心等待
#@state == 8 您已经是该课程的教师了 #@state == 8 您已经是该课程的教师了
#@state == 9 您已经是该课程的教辅了 #@state == 9 您已经是该课程的教辅了
#@state == 10 您已经是该课程的管理员了
#@state 其他 未知错误,请稍后再试 #@state 其他 未知错误,请稍后再试
def join_course params,current_user def join_course params,current_user
course = Course.find_by_id params[:object_id] course = Course.find_by_id params[:object_id]
@ -325,6 +326,8 @@ class CoursesService
#如果加入的角色教辅并且当前为教辅 #如果加入的角色教辅并且当前为教辅
elsif params[:role] == "7" && roleName == "TeachingAsistant" elsif params[:role] == "7" && roleName == "TeachingAsistant"
@state = 9 @state = 9
elsif roleName == "Manager"
@state = 10
#如果加入角色为教师或者教辅,并且当前是学生,或者是要成为教辅,当前不是教辅,或者要成为教师,当前不是教师。那么要发送请求 #如果加入角色为教师或者教辅,并且当前是学生,或者是要成为教辅,当前不是教辅,或者要成为教师,当前不是教师。那么要发送请求
elsif (params[:role] != "10" && roleName == "Student") || (params[:role] == "7" && roleName != "TeachingAsistant" ) || (params[:role] == "9" && roleName != "Teacher" ) elsif (params[:role] != "10" && roleName == "Student") || (params[:role] == "7" && roleName != "TeachingAsistant" ) || (params[:role] == "9" && roleName != "Teacher" )
#如果已经发送过消息了,那么就要给个提示 #如果已经发送过消息了,那么就要给个提示

@ -86,6 +86,9 @@
} }
function register(){ function register(){
if($("#loginUpButton").hasClass('loginUpDisableButton')){
return;
}
if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){ if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){
$("#main_reg_form").submit(); $("#main_reg_form").submit();
}else{ }else{
@ -182,6 +185,16 @@
$('#main_login_form').submit(); $('#main_login_form').submit();
} }
} }
function changeRegisterBtn(checkbox){
if(checkbox.checked == true){
$("#loginUpButton").removeClass('loginUpDisableButton');
$("#loginUpButton").addClass('loginUpButton');
}else{
$("#loginUpButton").removeClass('loginUpButton')
$("#loginUpButton").addClass('loginUpDisableButton');
}
}
</script> </script>
<div class="loginContentContainer"> <div class="loginContentContainer">
<div class="loginContent"> <div class="loginContent">
@ -270,11 +283,11 @@
</div> </div>
<div class="loginSignOption"> <div class="loginSignOption">
<div class="fl mt3 mr5"> <div class="fl mt3 mr5">
<input type="checkbox" id="read_and_confirm"/> <input type="checkbox" id="read_and_confirm" onchange="changeRegisterBtn(this);"/>
</div> </div>
我已阅读并接受<a href="<%= agreement_path %>" class="newsBlue"><u>Trustie服务协议</u></a>条款</div> 我已阅读并接受<a href="<%= agreement_path %>" class="newsBlue"><u>Trustie服务协议</u></a>条款</div>
<div class="loginUpButton"> <div class="loginUpDisableButton" id="loginUpButton">
<a href="javascript:void(0);" class="c_white db" id="regist_btn" onclick="register();">注册</a> <a href="javascript:void(0);" class="c_white db" id="regist_btn" onclick="register();" >注册</a>
</div> </div>
<% end %> <% end %>

@ -32,6 +32,10 @@ window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @co
alert("您已经是该课程的教辅了"); alert("您已经是该课程的教辅了");
hidden_join_course_form(); hidden_join_course_form();
window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
<% elsif @state == 10%>
alert("您已经是该课程的管理员了");
hidden_join_course_form();
window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
<% else %> <% else %>
alert("未知错误,请稍后再试"); alert("未知错误,请稍后再试");
<% end %> <% end %>

@ -247,7 +247,7 @@
tagId = id; tagId = id;
taggableType = type; taggableType = type;
width = parseInt(domEle.css('width').replace('px', '')) >= 100 ? parseInt(domEle.css('width').replace('px', '')) : 100 width = parseInt(domEle.css('width').replace('px', '')) >= 100 ? parseInt(domEle.css('width').replace('px', '')) : 100
domEle.html('<input name="" id="renameTagName" maxlength="<%=Setting.tags_max_length%>" minlength="<%= Setting.tags_min_length%>" style="width:' + width + 'px;" value="' + name + '"/>'); domEle.html('<input name="" id="renameTagName" maxlength="120" minlength="1" style="width:' + width + 'px;" value="' + name + '"/>');
domEle.parent().css("border", "1px solid #ffffff"); domEle.parent().css("border", "1px solid #ffffff");
$("#renameTagName").focus(); $("#renameTagName").focus();
} }
@ -295,8 +295,8 @@
// }else{ //否则就要更新tag名称了 // }else{ //否则就要更新tag名称了
//// if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){ 去掉询问 //// if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){ 去掉询问
// $.post( // $.post(
// '<%= update_tag_name_path %>', // '<%#= update_tag_name_path %>',
// {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%= @course.id%>} // {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%#= @course.id%>}
// ) // )
//// }else{ //// }else{
//// ele.parent().css("border",""); //// ele.parent().css("border","");

@ -21,12 +21,11 @@
</a> </a>
<% end %> <% end %>
</div> </div>
<div class="mt5"> <div class="mt5" style="color: #269ac9;cursor: default">
<!--<a target="hiddentab" href="http://wpa.qq.com/msgrd?v=1&uin=1554253403&site=qq&menu=yes" style="color: #269ac9;">--> <!--<a target="hiddentab" href="http://wpa.qq.com/msgrd?v=1&uin=1554253403&site=qq&menu=yes" style="color: #269ac9;">-->
<%#= l(:label_technical_support) %> <%#= l(:label_technical_support) %>
<!--白&nbsp;&nbsp;&nbsp;羽</a> http://shang.qq.com/wpa/qunwpa?idkey=4fe2d63a4527cddce038f04f0b1d728a62082074fb4a74870a5444ee1a6910ad--> <!--白&nbsp;&nbsp;&nbsp;羽</a> http://shang.qq.com/wpa/qunwpa?idkey=4fe2d63a4527cddce038f04f0b1d728a62082074fb4a74870a5444ee1a6910ad-->
<a href="javascript:void(0);" style="color: #269ac9;"> <p style="text-align: center"> 请加入师姐师兄答疑群</p> <p style="text-align: center">QQ群号173184401</p>
<p style="text-align: center"> 请加入师姐师姐答疑群</p> <p style="text-align: center">173184401</p> </a>
</div> </div>
</div> </div>
<div class="side_bottom"></div> <div class="side_bottom"></div>

@ -61,14 +61,14 @@
function addTag(){ function addTag(){
if(<%=@forum.creator.id == User.current.id%>) { if(<%=@forum.creator.id == User.current.id%>) {
if ($("input[name='addTag']").val().trim() != "" ) { if ($("input[name='addTag']").val().trim() != "" ) {
if($("input[name='addTag']").val().trim().length <= 14) { if($("input[name='addTag']").val().trim().length <= 120) {
$.get( $.get(
'<%= add_forum_tag_forum_path(@forum)%>' + "?tag_str=" + $("input[name='addTag']").val(), '<%= add_forum_tag_forum_path(@forum)%>' + "?tag_str=" + $("input[name='addTag']").val(),
{} {}
); );
$("input[name='addTag']").val(''); $("input[name='addTag']").val('');
}else{ }else{
alert("标签名字长度不能超过14个字符"); alert("标签名字长度不能超过120个字符");
} }
} }
} }

@ -259,7 +259,7 @@ tags_min_length:
default: 1 default: 1
tags_max_length: tags_max_length:
format: int format: int
default: 14 default: 120
tags_show_search_results: tags_show_search_results:
format: int format: int
default: 5 default: 5

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

@ -552,27 +552,27 @@ function addFileCourseSource(inputEl, file, eagerUpload,checkBox) {
fileSpan.append( fileSpan.append(
$('<input>', { $('<input>', {
'type': 'text', 'type': 'text',
'class': 'filename readonly', 'class': 'upload_filename readonly',
'name': 'attachments[' + attachmentId + '][filename]', 'name': 'attachments[' + attachmentId + '][filename]',
'readonly': 'readonly' 'readonly': 'readonly'
}).val(file.name), }).val(file.name),
$('<input>', { // $('<input>', {
'type': 'text', // 'type': 'text',
'class': 'description', // 'class': 'description',
'name': 'attachments[' + attachmentId + '][description]', // 'name': 'attachments[' + attachmentId + '][description]',
'maxlength': 254, // 'maxlength': 254,
'placeholder': $(inputEl).data('descriptionPlaceholder') // 'placeholder': $(inputEl).data('descriptionPlaceholder')
}).toggle(!eagerUpload), // }).toggle(!eagerUpload),
$('<span >' + $(inputEl).data('fieldIsPublic') + ':</span>').attr({ // $('<span >' + $(inputEl).data('fieldIsPublic') + ':</span>').attr({
'class': 'ispublic-label' // 'class': 'ispublic-label'
}), // }),
$('<input>', { // $('<input>', {
'type': 'checkbox', // 'type': 'checkbox',
'class': 'is_public_checkbox', // 'class': 'is_public_checkbox',
'value': 1, // 'value': 1,
'name': 'attachments[' + attachmentId + '][is_public_checkbox]', // 'name': 'attachments[' + attachmentId + '][is_public_checkbox]',
checked: 'checked' // checked: 'checked'
}).toggle(!eagerUpload), // }).toggle(!eagerUpload),
$('<a>&nbsp</a>').attr({ $('<a>&nbsp</a>').attr({
'href': "#", 'href': "#",
'class': 'remove-upload' 'class': 'remove-upload'

@ -2745,15 +2745,31 @@ h2 img { vertical-align:middle; }
/*added by william*/ /*added by william*/
#tag { #tag {
background: url(../images/issue_tag.png) no-repeat right -19px; /*background: url(../images/issue_tag.png) no-repeat right -19px;*/
/*border-radius: 3px;*/
/*color: #3a587d !important;*/
/*padding: 1px 4px 2px 4px;*/
/*margin: 3px;*/
/*display: inline-block;*/
/*font-size: 13px; *//*modified by linchun*/
/*text-decoration: none;*/
/*cursor: pointer;*/
border-radius: 3px; border-radius: 3px;
color: #3a587d !important; color: #3a587d !important;
padding: 1px 4px 2px 4px; padding: 1px 4px 2px 4px;
margin: 3px; margin: 3px;
display: inline-block; display: inline-block;
font-size: 13px; /*modified by linchun*/ font-size: 13px;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
width: auto;
padding: 0 5px;
padding-top: 2px;
border: 1px solid #f8df8c;
background: #fffce6;
margin-right: 5px;
word-wrap: break-word;
word-break: break-all;
} }
/*tanxianbo*/ /*tanxianbo*/

@ -56,7 +56,7 @@ a:hover.subnav_green{ background:#14ad5a;}
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} .isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } .re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all }
.re_tag a{ color:#0d90c3;} .re_tag a{ color:#0d90c3;}
.tag_h{ } .tag_h{ }
.tag_h span,.tag_h a{ margin-bottom:5px;} .tag_h span,.tag_h a{ margin-bottom:5px;}

@ -726,6 +726,8 @@ a.loginChooseTab {color:#484848; height:30px; display:block;}
.loginUpButton {width:315px; height:40px; background-color:#269ac9; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:30px;} .loginUpButton {width:315px; height:40px; background-color:#269ac9; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:30px;}
.loginInButton:hover {background-color: #297fb8} .loginInButton:hover {background-color: #297fb8}
.loginUpButton:hover {background-color: #297fb8} .loginUpButton:hover {background-color: #297fb8}
.loginUpDisableButton {width:315px; height:40px; background-color:#C1C1C1; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:30px;}
.loginUpDisableButton:hover {background-color: #C1C1C1}
.loginChooseBorder {width:295px; height:30px; border-bottom:1px solid #e3e3e3;} .loginChooseBorder {width:295px; height:30px; border-bottom:1px solid #e3e3e3;}
.loginSign {width:405px; background-color:#ffffff;} .loginSign {width:405px; background-color:#ffffff;}
.loginSignBox {width:308px; height:38px; margin-left:46px; border:1px solid #98a1a6; outline:none;} .loginSignBox {width:308px; height:38px; margin-left:46px; border:1px solid #98a1a6; outline:none;}

@ -59,7 +59,7 @@ a:hover.subnav_green{ background:#14ad5a;}
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} .isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } .re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all }
.re_tag a{ color:#0d90c3;} .re_tag a{ color:#0d90c3;}
.tag_h{ } .tag_h{ }
.tag_h span,.tag_h a{ margin-bottom:5px;} .tag_h span,.tag_h a{ margin-bottom:5px;}

@ -56,7 +56,7 @@ a:hover.subnav_green{ background:#14ad5a;}
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit{height:21px;border:0; cursor:pointer; background:url(images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .submit{height:21px;border:0; cursor:pointer; background:url(images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} .isTxt{background:#fbfbfb url(images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } .re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all }
.re_tag a{ color:#0d90c3;} .re_tag a{ color:#0d90c3;}
.tag_h{ } .tag_h{ }
.tag_h span,.tag_h a{ margin-bottom:5px;} .tag_h span,.tag_h a{ margin-bottom:5px;}

Loading…
Cancel
Save