This commit is contained in:
sw 2015-09-17 10:24:58 +08:00
commit 90d70e7c88
13 changed files with 2340 additions and 2318 deletions

View File

@ -1,50 +1,50 @@
<%= stylesheet_link_tag 'new_user'%>
<div class="homepageContent BgBox">
<h2 class="BgBox_h2">关于我们</h2>
<div class="AgreementBox">
<p class="AgreementTxt">
Trustie是一个面向高校创新实践的在线协作社区是在中国高校推行大规模开放在线研究Massive Open Online Research, MOORE的支撑平台也简称Trustie平台。老师、学生和科研人员可以在此开展各种在线协同学习、协同作业、协同开发等活动。
</p>
<p class="AgreementTxt">
MOORE是国防科学技术大学杨学军院士提出的一个面向高校科研教学活动的新型创新实践概念为全面支持高校人才培养和科学研究提供了一种新思路。MOORE是对大规模在线开放课程Massive Open Online Course, MOOC的拓展是课堂教学与创新实践深度结合的全新模式可以看作MOOC2.0。
</p>
<p class="AgreementTxt">
2005年开始Trustie研制团队围绕网络时代的软件开发效率和质量这一核心问题展开研究经过十年的磨砺与攻关逐步揭示出以大众化协同开发、开放式资源共享、持续性可信评估为核心的互联网大规模协同机理提出了全新的软件开发群体化方法。2008年起研制团队开始探索如何将这种协同机理引入软件人才培养。MOORE概念的提出为研制团队的人才培养实践提供了新的发展方向和应用模式使Trustie技术和工具能够更直接、更有效地与高校人才培养对接形成了今天已被大量师生接受的在线人才培养平台。
</p>
<p class="AgreementTxt">
研制团队认为MOORE的创新人才培养模式如图1左图是将互联网大规模协同机理与高校创新实践活动相结合的全新人才培养方法和模式研制团队并基于本平台的架构形成了对MOORE核心机理的三方面认识如图1右图
</p>
<div class="AgreementImg" >
<img src="images/aboutus_01.jpg" width="820" height="285" />
<p class="AgreementTxt T_C fb mt10">图1 基于MOORE的创新人才培养模式与核心机理</p>
</div>
<p class="AgreementTxt">
目前Trustie平台已经初步展现出大规模开放在线研究的生态系统蓝图其核心是在线教学实践平台和在线协同研究平台如图2。Trustie在线教学实践平台是支持教师和学生围绕课堂学习开展实践的平台如图2Trustie在线协同研究平台是支持开发小组围绕实践任务或研究工作开展分布式协作的平台如图2。两个核心平台为一名"新手"大学生成长为具有一定创新能力的"创客"提供了从学习到研究的一个渐进式成长环境如图2
</p>
<p class="AgreementTxt">
特别是根据师生的实际需要Trustie平台提供了私有模式和公开模式支持针对未公开成果实施有效知识产权保护为前提的交流分享如图2。随着越来越多的高校、课程和研究小组的加入MOORE创新实践模式的生态效益将不断显现出来。
</p>
<div class="AgreementImg" >
<img src="images/aboutus_02.jpg" width="756" height="496" />
<p class="AgreementTxt T_C fb mt10">图2 基于MOORE的支撑平台和生态系统</p>
</div>
<p class="AgreementTxt">
研制团队特别感谢高校老师和学生的积极反馈、无私创意。平台的很多实用便捷的功能都是老师们积极参与和设计的结果,汇聚了大量师生的宝贵贡献,是研制团队和用户群体共同成长的结果。
</p>
<p class="AgreementTxt">
Trustie平台的基本思路是将开源模式与中国高校人才培养活动相结合但其本质上是一种O2OOnline To Offline的创新人才培养模式只有在以下两个方面同步推进才能在持续解决实际需求的过程中快速发展<br />
&nbsp;&nbsp;&nbsp;&nbsp;1构建实践平台激活创新能力成为支持不同规模的团队进行协同研究和协同开发的实践平台支持各类可公开的课程实验任务、教研室科研任务的在线协同能够有效提升和评估学生的创新能力、协作能力和实践能力。<br />
&nbsp;&nbsp;&nbsp;&nbsp;2引入开源理念形成创客文化将互联网开源软件运动中的自由、对等、共享、创新的理念引入高校使"自主创意并亲自动手实现创意"的创客精神深入人才培养活动,在学生群体中形成大胆创意、大胆实践的创新文化。
</p>
<p class="AgreementTxt">
研制团队认为Trustie平台是一种"互联网+"思维在高校教育领域的大型探索性实践。作为一种互联网应用Trustie平台自身的开发也采取了互联网模式Trustie研制团队采用了"网构化软件开发模式",坚持"每周一更"的快速上线、快速体验模式以最大程度上贴近用户实际需求提升。欢迎高校师生一同投身创新实践共同见证MOORE创新生态的早日形成。
</p>
</div>
</div><!---BgBox end--->
<div class="footer"></div>
<%= stylesheet_link_tag 'new_user'%>
<div class="homepageContent BgBox">
<h2 class="BgBox_h2">关于我们</h2>
<div class="AgreementBox">
<p class="AgreementTxt">
Trustie是一个面向高校创新实践的在线协作社区是在中国高校推行大规模开放在线研究Massive Open Online Research, MOORE的支撑平台也简称Trustie平台。老师、学生和科研人员可以在此开展各种在线协同学习、协同作业、协同开发等活动。
</p>
<p class="AgreementTxt">
MOORE是国防科学技术大学杨学军院士提出的一个面向高校科研教学活动的新型创新实践概念为全面支持高校人才培养和科学研究提供了一种新思路。MOORE是对大规模在线开放课程Massive Open Online Course, MOOC的拓展是课堂教学与创新实践深度结合的全新模式可以看作MOOC2.0。
</p>
<p class="AgreementTxt">
2005年开始Trustie研制团队围绕网络时代的软件开发效率和质量这一核心问题展开研究经过十年的磨砺与攻关逐步揭示出以大众化协同开发、开放式资源共享、持续性可信评估为核心的互联网大规模协同机理提出了全新的软件开发群体化方法。2008年起研制团队开始探索如何将这种协同机理引入软件人才培养。MOORE概念的提出为研制团队的人才培养实践提供了新的发展方向和应用模式使Trustie技术和工具能够更直接、更有效地与高校人才培养对接形成了今天已被大量师生接受的在线人才培养平台。
</p>
<p class="AgreementTxt">
研制团队认为MOORE的创新人才培养模式如图1左图是将互联网大规模协同机理与高校创新实践活动相结合的全新人才培养方法和模式研制团队并基于本平台的架构形成了对MOORE核心机理的三方面认识如图1右图
</p>
<div class="AgreementImg" >
<img src="images/aboutus_01.jpg" width="619" height="215" />
<p class="AgreementTxt T_C fb mt10">图1 基于MOORE的创新人才培养模式与核心机理</p>
</div>
<p class="AgreementTxt">
目前Trustie平台已经初步展现出大规模开放在线研究的生态系统蓝图其核心是在线教学实践平台和在线协同研究平台如图2。Trustie在线教学实践平台是支持教师和学生围绕课堂学习开展实践的平台如图2Trustie在线协同研究平台是支持开发小组围绕实践任务或研究工作开展分布式协作的平台如图2。两个核心平台为一名"新手"大学生成长为具有一定创新能力的"创客"提供了从学习到研究的一个渐进式成长环境如图2
</p>
<p class="AgreementTxt">
特别是根据师生的实际需要Trustie平台提供了私有模式和公开模式支持针对未公开成果实施有效知识产权保护为前提的交流分享如图2。随着越来越多的高校、课程和研究小组的加入MOORE创新实践模式的生态效益将不断显现出来。
</p>
<div class="AgreementImg" >
<img src="images/aboutus_02.jpg" width="616" height="405" />
<p class="AgreementTxt T_C fb mt10">图2 基于MOORE的支撑平台和生态系统</p>
</div>
<p class="AgreementTxt">
研制团队特别感谢高校老师和学生的积极反馈、无私创意。平台的很多实用便捷的功能都是老师们积极参与和设计的结果,汇聚了大量师生的宝贵贡献,是研制团队和用户群体共同成长的结果。
</p>
<p class="AgreementTxt">
Trustie平台的基本思路是将开源模式与中国高校人才培养活动相结合但其本质上是一种O2OOnline To Offline的创新人才培养模式只有在以下两个方面同步推进才能在持续解决实际需求的过程中快速发展<br />
&nbsp;&nbsp;&nbsp;&nbsp;1构建实践平台激活创新能力成为支持不同规模的团队进行协同研究和协同开发的实践平台支持各类可公开的课程实验任务、教研室科研任务的在线协同能够有效提升和评估学生的创新能力、协作能力和实践能力。<br />
&nbsp;&nbsp;&nbsp;&nbsp;2引入开源理念形成创客文化将互联网开源软件运动中的自由、对等、共享、创新的理念引入高校使"自主创意并亲自动手实现创意"的创客精神深入人才培养活动,在学生群体中形成大胆创意、大胆实践的创新文化。
</p>
<p class="AgreementTxt">
研制团队认为Trustie平台是一种"互联网+"思维在高校教育领域的大型探索性实践。作为一种互联网应用Trustie平台自身的开发也采取了互联网模式Trustie研制团队采用了"网构化软件开发模式",坚持"每周一更"的快速上线、快速体验模式以最大程度上贴近用户实际需求提升。欢迎高校师生一同投身创新实践共同见证MOORE创新生态的早日形成。
</p>
</div>
</div><!---BgBox end--->
<div class="footer"></div>

View File

@ -1,286 +1,286 @@
<%= stylesheet_link_tag 'new_user'%>
<%= stylesheet_link_tag 'leftside'%>
<script type="text/javascript">
// $(document).ready(function(){
// $("#loginSignButton").click(function(){
// $("#signUpBox").css({display:"block"});
// $("#loginInBox").css({display:"none"});
// });
// $("#loginInButton").click(function(){
// $("#signUpBox").css({display:"none"});
// $("#loginInBox").css({display:"block"});
// });
// });
// $(function(){
// $("#username").keypress(function(e){
// alert(11);
// if (e.keyCode == '13') {
// $('#main_login_form').submit();
// }
// });
//
// $("#password").keypress(function(e){
// if (e.keyCode == '13') {
// $('#main_login_form').submit();
// }
// });
// });
$(document).ready(function(){
$(".homepageSearchIcon").click(function(){
var val=$('input:radio[name="search_type"]:checked').val();
if(val==null){
$("#navSearchAlert").css({display:"block"});
}
else {
$("#navSearchAlert").css({display:"none"});
}
});
// $("#loginInButton").click(function(){
// $("#signUpBox").css({display:"none"});
// $("#loginInBox").css({display:"block"});
// });
});
$(document).ready(function(){
$(".navHomepageSearchBoxcontainer").mouseover(function(){
$(".navSearchTypeBox").css({display:"block"});
});
$(".navHomepageSearchBoxcontainer").mouseout(function(){
$(".navSearchTypeBox").css({display:"none"});
});
})
$(document).ready(function(){
if(<%= @login%>){
$("#signUpBox").css({display:"none"});
$("#loginInBox").css({display:"block"});
}else{
$("#signUpBox").css({display:"block"});
$("#loginInBox").css({display:"none"});
}
});
// $('#regist_btn').bind('keyup', function(event) {
// if (event.keyCode == "13" && $("#signUpBox").css('display') == 'block')) {
// register();
// }
//});
function clearInfo(id, content) {
var text = $('#' + id);
if (text.val() == content) {
$('#' + id).val('');
}
}
function showInfo(id, content) {
var text = $('#' + id);
if (text.val() == '') {
$('#' + id).val(content);
}
}
function login(){
$('#main_login_form').submit(); //表单提交没有任何反应的原因js冲突
}
function register(){
if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){
$("#main_reg_form").submit();
}else{
$('#user_login').blur();
$('#user_mail').blur();
$('#user_password').blur();
$('#user_password_confirmation').blur();
}
}
var $login_correct = false;
var $mail_correct = false;
var $passwd_correct = false;
var $passwd_comfirm_correct = false;
jQuery(document).ready(function () {
var $login = $('#user_login')
var $mail = $('#user_mail')
var $password = $('#user_password')
var $password_confirmation = $('#user_password_confirmation')
$login.blur(function (event) {
if ($(this).is('#user_login')) {
$.get(
'<%=account_valid_ajax_path%>',
{ valid: "login",
value: this.value },
function (data) {
if (data.valid) {
$('#login_req').html('<span style="color: green">'+data.message+'</span>');
$login_correct = true;
} else {
$('#login_req').html( '<span style="color: red">'+data.message+'</span>');
$login_correct = false;
}
$('#login_req').css('display','block');
});
}
;
});
$mail.blur(function (event) {
if ($(this).is('#user_mail')) {
$.get('<%=account_valid_ajax_path%>',
{ valid: "mail",
value: this.value },
function (data) {
if (data.valid) {
$('#mail_req').html( '<span style="color: green">'+data.message+'</span>' );
$mail_correct = true;
} else {
$('#mail_req').html( '<span style="color: red">'+data.message+'</span>' );
$mail_correct = false;
}
$('#mail_req').css('display','block');
});
}
;
});
$password.blur(function () {
var pas1 = document.getElementById("user_password").value;
var password_min_length = <%= Setting.password_min_length.to_i %>
if (pas1.length >= password_min_length) {
$('#passwd_req').html('');
$passwd_correct = true;
}
else {
$('#passwd_req').html( '<span style="color: red">'+'<%= l(:setting_password_min_length_limit, :count => Setting.password_min_length.to_i) %>'+'</span>');
$passwd_correct = false;
}
$('#passwd_req').css('display','block');
});
$password_confirmation.blur(function () {
var password_min_length = <%= Setting.password_min_length.to_i %>
var pas1 = document.getElementById("user_password").value;
var pas2 = document.getElementById("user_password_confirmation").value;
if (pas1.length >= password_min_length && pas1 == pas2 ) {
$('#confirm_req').html('<span style="color: green">'+'<%= l(:setting_password_success) %>'+'</span>');
$passwd_comfirm_correct = true;
}
else {
$('#confirm_req').html('<span style="color: red">'+'<%= l(:setting_password_error) %>'+'</span>');
$passwd_comfirm_correct = false;
}
$('#confirm_req').css('display','block');
});
});
function user_name_keypress(e){
if (e.keyCode == '13') {
$('#main_login_form').submit();
}
}
</script>
<div class="loginContentContainer">
<div class="loginContent">
<div class="loginLeft">
<div class="loginLogo"><img src="images/trustie_big_log.png" width="100" height="88" alt="Trustie Logo" /></div>
<div class="loginInro">欢迎加入Trustie高校创新实践社区老师、学生和科研人员可以在此开展各种在线协同学习、协同作业、协同开发等活动。Trustie是在中国推行大规模开放在线研究模式MOORE的支撑平台。</div>
</div>
<div class="loginRight">
<div id="loginInBox">
<div class="loginChooseBox">
<div class="mb5">
<ul class="loginChooseList">
<li class="loginChoose fl"><span class="loginChooseTab">登录</span></li>
<li class="loginChooseBorder fl"></li>
</ul>
</div>
<div class="loginSignAlert" style="color: red"><%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %></div>
</div>
<div class="loginIn">
<%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %>
<%= back_url_hidden_field_tag %>
<div class="mb20">
<%= text_field_tag 'username', params[:username], :tabindex => '1' ,
:class=>'loginSignBox',:placeholder=>'请输入邮箱地址或昵称', :onkeypress => "user_name_keypress(event);"%>
<!--<input type="text" placeholder="请输入邮箱地址或昵称" class="loginSignBox" />-->
</div>
<% if Setting.openid? %>
<div class="mb20">
<%= text_field_tag "openid_url", nil, :tabindex => '3',:placeholder=>'请输入OpenId URL' %>
</div>
<% end %>
<div>
<!--<input type="text" placeholder="请输密码" class="loginSignBox" />-->
<%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码', :onkeypress => "user_name_keypress(event);"%>
</div>
<div class="loginSignOption">
<% if Setting.autologin? %>
<div class="fl mt3 mr5">
<%= check_box_tag 'autologin', 1, true, :tabindex => 4 %>
</div>
<%= l(:label_stay_logged_in) %>
<% end %>
<a href="<%= lost_password_path %>" class="newsBlue mr40 fr">
<% if Setting.lost_password? %>
<u>忘记密码?</u>
<% end %>
</a></div>
<% end %>
<div class="loginInButton" >
<a href="javascript:void(0);" id="login_btn" class="c_white db" onclick="$('#main_login_form').submit();">登录</a>
</div>
</div>
</div>
<div id="signUpBox">
<div class="loginChooseBox">
<ul class="loginChooseList">
<li class="loginChoose fl"><span class="loginChooseTab">注册<%= link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></a></span>
<li class="loginChooseBorder fl"></li>
</ul>
</div>
<div class="loginIn">
<%= form_for :user, :url => register_path,:method=>'post',:html=>{:id=>'main_reg_form'} do |f| %>
<%= error_messages_for 'user' %>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入邮箱地址" class="loginSignBox" />-->
<%= f.text_field :mail,:size => 25, :class=>'loginSignBox' ,:placeholder=>"请输入邮箱地址"%>
<div class="loginSignAlert" id="mail_req" style="display: none" >请输入有效邮箱地址</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入密码" class="loginSignBox" />-->
<%= f.password_field :password, :size => 25,:placeholder=>"请输入密码",:class=>'loginSignBox' %>
<div class="loginSignAlert" id="passwd_req" style="display: none">至少需要 6 个字符</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请再次输入密码" class="loginSignBox" />-->
<%= f.password_field :password_confirmation, :size => 25,:placeholder=>"请再次输入密码",:class=>'loginSignBox' %>
<div class="loginSignAlert" id="confirm_req" style="display: none">密码不一致</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入用户昵称" class="loginSignBox" />-->
<%= f.text_field :login, :size => 25,:placeholder=>"请输入用户昵称",:class=>'loginSignBox'%>
<div class="loginSignAlert" id="login_req" style="display: none">用户昵称为2-18个中英文数字或下划线</div>
</div>
<div class="loginSignOption">
<div class="fl mt3 mr5">
<input type="checkbox" id="read_and_confirm"/>
</div>
我已阅读并接受<a href="<%= agreement_path %>" class="newsBlue"><u>Trustie服务协议</u></a>条款</div>
<div class="loginUpButton">
<a href="javascript:void(0);" class="c_white db" id="regist_btn" onclick="register();">注册</a>
</div>
<% end %>
</div>
</div>
</div>
<div class="cl"></div>
</div>
</div>
<%= stylesheet_link_tag 'new_user'%>
<%= stylesheet_link_tag 'leftside'%>
<script type="text/javascript">
// $(document).ready(function(){
// $("#loginSignButton").click(function(){
// $("#signUpBox").css({display:"block"});
// $("#loginInBox").css({display:"none"});
// });
// $("#loginInButton").click(function(){
// $("#signUpBox").css({display:"none"});
// $("#loginInBox").css({display:"block"});
// });
// });
// $(function(){
// $("#username").keypress(function(e){
// alert(11);
// if (e.keyCode == '13') {
// $('#main_login_form').submit();
// }
// });
//
// $("#password").keypress(function(e){
// if (e.keyCode == '13') {
// $('#main_login_form').submit();
// }
// });
// });
$(document).ready(function(){
$(".homepageSearchIcon").click(function(){
var val=$('input:radio[name="search_type"]:checked').val();
if(val==null){
$("#navSearchAlert").css({display:"block"});
}
else {
$("#navSearchAlert").css({display:"none"});
}
});
// $("#loginInButton").click(function(){
// $("#signUpBox").css({display:"none"});
// $("#loginInBox").css({display:"block"});
// });
});
$(document).ready(function(){
$(".navHomepageSearchBoxcontainer").mouseover(function(){
$(".navSearchTypeBox").css({display:"block"});
});
$(".navHomepageSearchBoxcontainer").mouseout(function(){
$(".navSearchTypeBox").css({display:"none"});
});
})
$(document).ready(function(){
if(<%= @login%>){
$("#signUpBox").css({display:"none"});
$("#loginInBox").css({display:"block"});
}else{
$("#signUpBox").css({display:"block"});
$("#loginInBox").css({display:"none"});
}
});
// $('#regist_btn').bind('keyup', function(event) {
// if (event.keyCode == "13" && $("#signUpBox").css('display') == 'block')) {
// register();
// }
//});
function clearInfo(id, content) {
var text = $('#' + id);
if (text.val() == content) {
$('#' + id).val('');
}
}
function showInfo(id, content) {
var text = $('#' + id);
if (text.val() == '') {
$('#' + id).val(content);
}
}
function login(){
$('#main_login_form').submit(); //表单提交没有任何反应的原因js冲突
}
function register(){
if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){
$("#main_reg_form").submit();
}else{
$('#user_login').blur();
$('#user_mail').blur();
$('#user_password').blur();
$('#user_password_confirmation').blur();
}
}
var $login_correct = false;
var $mail_correct = false;
var $passwd_correct = false;
var $passwd_comfirm_correct = false;
jQuery(document).ready(function () {
var $login = $('#user_login')
var $mail = $('#user_mail')
var $password = $('#user_password')
var $password_confirmation = $('#user_password_confirmation')
$login.blur(function (event) {
if ($(this).is('#user_login')) {
$.get(
'<%=account_valid_ajax_path%>',
{ valid: "login",
value: this.value },
function (data) {
if (data.valid) {
$('#login_req').html('<span style="color: green">'+data.message+'</span>');
$login_correct = true;
} else {
$('#login_req').html( '<span style="color: red">'+data.message+'</span>');
$login_correct = false;
}
$('#login_req').css('display','block');
});
}
;
});
$mail.blur(function (event) {
if ($(this).is('#user_mail')) {
$.get('<%=account_valid_ajax_path%>',
{ valid: "mail",
value: this.value },
function (data) {
if (data.valid) {
$('#mail_req').html( '<span style="color: green">'+data.message+'</span>' );
$mail_correct = true;
} else {
$('#mail_req').html( '<span style="color: red">'+data.message+'</span>' );
$mail_correct = false;
}
$('#mail_req').css('display','block');
});
}
;
});
$password.blur(function () {
var pas1 = document.getElementById("user_password").value;
var password_min_length = <%= Setting.password_min_length.to_i %>
if (pas1.length >= password_min_length) {
$('#passwd_req').html('');
$passwd_correct = true;
}
else {
$('#passwd_req').html( '<span style="color: red">'+'<%= l(:setting_password_min_length_limit, :count => Setting.password_min_length.to_i) %>'+'</span>');
$passwd_correct = false;
}
$('#passwd_req').css('display','block');
});
$password_confirmation.blur(function () {
var password_min_length = <%= Setting.password_min_length.to_i %>
var pas1 = document.getElementById("user_password").value;
var pas2 = document.getElementById("user_password_confirmation").value;
if (pas1.length >= password_min_length && pas1 == pas2 ) {
$('#confirm_req').html('<span style="color: green">'+'<%= l(:setting_password_success) %>'+'</span>');
$passwd_comfirm_correct = true;
}
else {
$('#confirm_req').html('<span style="color: red">'+'<%= l(:setting_password_error) %>'+'</span>');
$passwd_comfirm_correct = false;
}
$('#confirm_req').css('display','block');
});
});
function user_name_keypress(e){
if (e.keyCode == '13') {
$('#main_login_form').submit();
}
}
</script>
<div class="loginContentContainer">
<div class="loginContent">
<div class="loginLeft">
<div class="loginLogo"><img src="images/trustie_big_log.png" width="100" height="88" alt="Trustie Logo" /></div>
<div class="loginInro">&nbsp;&nbsp;欢迎加入Trustie高校创新实践社区老师、学生和科研人员可以在此开展各种在线协同学习、协同作业、协同开发等活动。<br/><br/>&nbsp;&nbsp;Trustie是在中国推行大规模开放在线研究模式MOORE的支撑平台。</div>
</div>
<div class="loginRight">
<div id="loginInBox">
<div class="loginChooseBox">
<div class="mb5">
<ul class="loginChooseList">
<li class="loginChoose fl"><span class="loginChooseTab">登录</span></li>
<li class="loginChooseBorder fl"></li>
</ul>
</div>
<div class="loginSignAlert" style="color: red"><%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %></div>
</div>
<div class="loginIn">
<%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %>
<%= back_url_hidden_field_tag %>
<div class="mb20">
<%= text_field_tag 'username', params[:username], :tabindex => '1' ,
:class=>'loginSignBox',:placeholder=>'请输入邮箱地址或昵称', :onkeypress => "user_name_keypress(event);"%>
<!--<input type="text" placeholder="请输入邮箱地址或昵称" class="loginSignBox" />-->
</div>
<% if Setting.openid? %>
<div class="mb20">
<%= text_field_tag "openid_url", nil, :tabindex => '3',:placeholder=>'请输入OpenId URL' %>
</div>
<% end %>
<div>
<!--<input type="text" placeholder="请输密码" class="loginSignBox" />-->
<%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码', :onkeypress => "user_name_keypress(event);"%>
</div>
<div class="loginSignOption">
<% if Setting.autologin? %>
<div class="fl mt3 mr5">
<%= check_box_tag 'autologin', 1, true, :tabindex => 4 %>
</div>
<%= l(:label_stay_logged_in) %>
<% end %>
<a href="<%= lost_password_path %>" class="newsBlue mr40 fr">
<% if Setting.lost_password? %>
<u>忘记密码?</u>
<% end %>
</a></div>
<% end %>
<div class="loginInButton" >
<a href="javascript:void(0);" id="login_btn" class="c_white db" onclick="$('#main_login_form').submit();">登录</a>
</div>
</div>
</div>
<div id="signUpBox">
<div class="loginChooseBox">
<ul class="loginChooseList">
<li class="loginChoose fl"><span class="loginChooseTab">注册<%= link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></a></span>
<li class="loginChooseBorder fl"></li>
</ul>
</div>
<div class="loginIn">
<%= form_for :user, :url => register_path,:method=>'post',:html=>{:id=>'main_reg_form'} do |f| %>
<%= error_messages_for 'user' %>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入邮箱地址" class="loginSignBox" />-->
<%= f.text_field :mail,:size => 25, :class=>'loginSignBox' ,:placeholder=>"请输入邮箱地址"%>
<div class="loginSignAlert" id="mail_req" style="display: none" >请输入有效邮箱地址</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入密码" class="loginSignBox" />-->
<%= f.password_field :password, :size => 25,:placeholder=>"请输入密码",:class=>'loginSignBox' %>
<div class="loginSignAlert" id="passwd_req" style="display: none">至少需要 6 个字符</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请再次输入密码" class="loginSignBox" />-->
<%= f.password_field :password_confirmation, :size => 25,:placeholder=>"请再次输入密码",:class=>'loginSignBox' %>
<div class="loginSignAlert" id="confirm_req" style="display: none">密码不一致</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入用户昵称" class="loginSignBox" />-->
<%= f.text_field :login, :size => 25,:placeholder=>"请输入用户昵称",:class=>'loginSignBox'%>
<div class="loginSignAlert" id="login_req" style="display: none">用户昵称为2-18个中英文数字或下划线</div>
</div>
<div class="loginSignOption">
<div class="fl mt3 mr5">
<input type="checkbox" id="read_and_confirm"/>
</div>
我已阅读并接受<a href="<%= agreement_path %>" class="newsBlue"><u>Trustie服务协议</u></a>条款</div>
<div class="loginUpButton">
<a href="javascript:void(0);" class="c_white db" id="regist_btn" onclick="register();">注册</a>
</div>
<% end %>
</div>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -1,3 +1,3 @@
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>");
init_KindEditor_data('<%= @user_activity_id%>');
init_KindEditor_data('<%= @user_activity_id%>',"30px","85%");

View File

@ -1,3 +1,3 @@
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id}) %>");
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>");
init_KindEditor_data(<%= @user_activity_id%>);
init_KindEditor_data(<%= @user_activity_id%>,"30px","85%");

View File

@ -1,6 +1,6 @@
<%if @project%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>");
<%elsif @course%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>");
<%end%>
init_KindEditor_data(<%= @user_activity_id%>);
init_KindEditor_data(<%= @user_activity_id%>,"30px","85%");

View File

@ -24,7 +24,6 @@
发帖时间:<%= format_time(activity.created_on) %>
</div>
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">
<% if activity.parent_id.nil? %>
<%= activity.content.to_s.html_safe%>
@ -49,7 +48,7 @@
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<% count=0 %>
<div class="homepagePostReplyBannerCount">回复(
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">回复(
<% if activity.parent %>
<% count=activity.parent.children.count%>
<% else %>
@ -67,21 +66,6 @@
<% end %>
</div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px;"></div>
<a id="new_message_cancel_btn_<%= user_activity_id%>" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:6px;">取消</a>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:6px;">发送</a>
<% end%>
</div>
<div class="cl"></div>
</div>
<% activity= activity.parent ? activity.parent : activity%>
<% replies_all_i = 0 %>
<% if count > 0 %>
@ -112,5 +96,25 @@
</ul>
</div>
<% end %>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait mr15 imageFuzzy"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="margin-top:6px;">发送</a>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left; margin-left: 5px; padding-top:3px;"></div>
<div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
</div>
</div>

View File

@ -27,7 +27,7 @@
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<% count=activity.comments.count %>
<div class="homepagePostReplyBannerCount">
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">
回复(<%= count %>
</div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
@ -40,20 +40,6 @@
<% end %>
</div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px;"></div>
<a id="new_message_cancel_btn_<%= user_activity_id%>" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:6px;">取消</a>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:6px;">发送</a>
<% end%>
</div>
<div class="cl"></div>
</div>
<% replies_all_i = 0 %>
<% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>">
@ -81,5 +67,22 @@
</ul>
</div>
<% end %>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait mr15 imageFuzzy"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="margin-top:6px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%>
</div>
<div class="cl"></div>
</div>
</div>
</div>
</div>

View File

@ -67,7 +67,7 @@
<div class="homepagePostReplyBanner">
<% count = activity.journals.count %>
<div class="homepagePostReplyBannerCount">回复(<%= count %></div>
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">回复(<%= count %></div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
<% if count > 2 %>
<div class="homepagePostReplyBannerMore">
@ -78,20 +78,6 @@
<% end %>
</div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px;"></div>
<a id="new_message_cancel_btn_<%= user_activity_id%>" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:6px;">取消</a>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:6px;">发送</a>
<% end%>
</div>
<div class="cl"></div>
</div>
<% replies_all_i = 0 %>
<% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>">
@ -126,6 +112,24 @@
</ul>
</div>
<% end %>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" ><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="margin-top:6px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%>
</div>
<div class="cl"></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">

View File

@ -39,7 +39,7 @@
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<% count = 0 %>
<div class="homepagePostReplyBannerCount">回复(
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">回复(
<% if activity.parent %>
<% count=activity.parent.children.count%>
<% else %>
@ -53,21 +53,6 @@
<% end %>
</div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px;"></div>
<a id="new_message_cancel_btn_<%= user_activity_id%>" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:6px;">取消</a>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:6px;">发送</a>
<% end%>
</div>
<div class="cl"></div>
</div>
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
<% replies_all_i = 0 %>
<% if count > 0 %>
@ -96,5 +81,25 @@
</ul>
</div>
<% end %>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait mr15 imageFuzzy"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="margin-top:6px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%>
</div>
<div class="cl"></div>
</div>
</div>
</div>
</div>

View File

@ -1,73 +1,79 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %>
<style type="text/css">
/*回复框*/
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;}
.ke-inline-block{display: none;}
</style>
<% user_activities.each do |user_activity|
if user_activities %>
<script>
function expand_reply(container,btnid){
var target = $(container);
var btn = $(btnid);
if(btn.data('init')=='0'){
btn.data('init',1);
btn.html('收起回复('+btn.data('count')+')');
target.show();
}else{
btn.data('init',0);
btn.html('展开更多('+btn.data('count')+')');
target.hide();
target.eq(0).show();
target.eq(1).show();
}
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %>
<style type="text/css">
/*回复框*/
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;}
.ke-inline-block{display: none;}
div.ke-container{float:left;}
</style>
<% first_user_activity = user_activities.first.id %>
<% user_activities.each do |user_activity|
if user_activities %>
<script>
function expand_reply(container,btnid){
var target = $(container);
var btn = $(btnid);
if(btn.data('init')=='0'){
btn.data('init',1);
btn.html('收起回复('+btn.data('count')+')');
target.show();
}else{
btn.data('init',0);
btn.html('展开更多('+btn.data('count')+')');
target.hide();
target.eq(0).show();
target.eq(1).show();
}
}
function expand_reply_input(id) {
$(id).toggle();
}
$(function() {
init_KindEditor_data(<%= user_activity.id%>);
});
</script>
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
<% case user_activity.container_type.to_s %>
<% when 'Course' %>
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'HomeworkCommon' %>
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
<% when 'News' %>
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
<% when 'Message'%>
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
<% when 'Poll' %>
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id} %>
<% end %>
<% end %>
<% when 'Project' %>
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'Issue' %>
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
<% when 'Message' %>
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<% if user_activities.count == 10%>
<div id="show_more_activities" class="loadMore mt10 f_grey">展开更多<%=link_to "", user_activities_path(@user.id,:type => type,:page => page),:id => "more_activities_link",:remote => "true",:class => "none" %></div>
<%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end%>
<script type="text/javascript">
$("#show_more_activities").mouseover(function(){
$("#more_activities_link").click();
});
$(function() {
init_KindEditor_data(<%= user_activity.id%>,"30px","85%");
});
</script>
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
<% case user_activity.container_type.to_s %>
<% when 'Course' %>
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'HomeworkCommon' %>
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
<% when 'News' %>
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
<% when 'Message'%>
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
<% when 'Poll' %>
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
<% end %>
<% end %>
<% when 'Project' %>
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'Issue' %>
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
<% when 'Message' %>
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<% if user_activities.count == 10%>
<div id="show_more_activities" class="loadMore mt10 f_grey">展开更多<%=link_to "", user_activities_path(@user.id,:type => type,:page => page),:id => "more_activities_link",:remote => "true",:class => "none" %></div>
<%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end%>
<script type="text/javascript">
$("#show_more_activities").mouseover(function(){
$("#more_activities_link").click();
});
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,122 +1,126 @@
function init_editor(params){
// var minHeight; //最小高度
var paramsHeight = params.height; //设定的高度
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"100%",
height:"30px",// == undefined ? "30px":paramsHeight+"px",
minHeight:"30px",// == undefined ? "30px":paramsHeight+"px",
items:['emoticons'],
afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
var edit = this.edit;
var body = edit.doc.body;
edit.iframe.height(paramsHeight);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + (paramsHeight == undefined ? 30:paramsHeight), paramsHeight));
},
afterCreate:function(){
var toolbar = $("div[class='ke-toolbar']",params.div_form);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar);
//init
var edit = this.edit;
var body = edit.doc.body;
edit.iframe[0].scroll = 'no';
body.style.overflowY = 'hidden';
//reset height
var edit = this.edit;
var body = edit.doc.body;
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight;
edit.iframe.height(paramsHeight);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ (paramsHeight == undefined ? 30:paramsHeight) , paramsHeight));
}
}).loadPlugin('paste');
return editor;
}
function nh_check_field(params){
var result=true;
if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync();
if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'});
}
params.contentmsg.show();
}
}
return result;
}
function init_form(params){
params.form.submit(function(){
var flag = false;
if(params.form.attr('data-remote') != undefined ){
flag = true
}
var is_checked = nh_check_field({
issubmit:true,
content:params.editor,
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
if(flag){
return true;
}else{
$(this)[0].submit();
return false;
}
}
return false;
});
}
function nh_reset_form(params){
params.form[0].reset();
params.textarea.empty();
if(params.editor != undefined){
params.editor.html(params.textarea.html());
}
params.contentmsg.hide();
}
//第二个参数是高度,可以传,可以不传
function init_KindEditor_data(id){
var height = arguments[1] ? arguments[1] : undefined;
KindEditor.ready(function (K) {
$("div[nhname='new_message_" + id + "']").each(function () {
var params = {};
params.kindutil = K;
params.div_form = $(this);
params.form = $("form", params.div_form);
if (params.form == undefined || params.form.length == 0) {
return;
}
params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form);
params.contentmsg = $("p[nhname='contentmsg_" + id + "']", params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form);
params.cancel_btn = $("#new_message_cancel_btn_" + id);
params.submit_btn = $("#new_message_submit_btn_" + id);
params.height = height;
if (params.textarea.data('init') == undefined) {
params.editor = init_editor(params);
init_form(params);
params.cancel_btn.click(function () {
nh_reset_form(params);
});
params.submit_btn.click(function () {
params.form.submit();
});
params.textarea.data('init', 1);
$(this).show();
}
});
});
function init_editor(params){
// var minHeight; //最小高度
var paramsHeight = params.height; //设定的高度
var paramsWidth = params.width == undefined ? "100%" : params.width;
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:paramsWidth,
height:"30px",// == undefined ? "30px":paramsHeight+"px",
minHeight:"30px",// == undefined ? "30px":paramsHeight+"px",
items:['emoticons'],
afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
var edit = this.edit;
var body = edit.doc.body;
edit.iframe.height(paramsHeight);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + (paramsHeight == undefined ? 30:paramsHeight), paramsHeight));
},
afterCreate:function(){
var toolbar = $("div[class='ke-toolbar']",params.div_form);
toolbar.css('width',24);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar);
//init
var edit = this.edit;
var body = edit.doc.body;
edit.iframe[0].scroll = 'no';
body.style.overflowY = 'hidden';
//reset height
var edit = this.edit;
var body = edit.doc.body;
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight;
edit.iframe.height(paramsHeight);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ (paramsHeight == undefined ? 30:paramsHeight) , paramsHeight));
}
}).loadPlugin('paste');
return editor;
}
function nh_check_field(params){
var result=true;
if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync();
if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'});
}
params.contentmsg.show();
}
}
return result;
}
function init_form(params){
params.form.submit(function(){
var flag = false;
if(params.form.attr('data-remote') != undefined ){
flag = true
}
var is_checked = nh_check_field({
issubmit:true,
content:params.editor,
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
if(flag){
return true;
}else{
$(this)[0].submit();
return false;
}
}
return false;
});
}
function nh_reset_form(params){
params.form[0].reset();
params.textarea.empty();
if(params.editor != undefined){
params.editor.html(params.textarea.html());
}
params.contentmsg.hide();
}
//第二个参数是高度,可以传,可以不传
function init_KindEditor_data(id){
var height = arguments[1] ? arguments[1] : undefined;
var width = arguments[2] ? arguments[2] : undefined;
KindEditor.ready(function (K) {
$("div[nhname='new_message_" + id + "']").each(function () {
var params = {};
params.kindutil = K;
params.div_form = $(this);
params.form = $("form", params.div_form);
if (params.form == undefined || params.form.length == 0) {
return;
}
params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form);
params.contentmsg = $("p[nhname='contentmsg_" + id + "']", params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form);
params.cancel_btn = $("#new_message_cancel_btn_" + id);
params.submit_btn = $("#new_message_submit_btn_" + id);
params.height = height;
params.width = width;
if (params.textarea.data('init') == undefined) {
params.editor = init_editor(params);
init_form(params);
params.cancel_btn.click(function () {
nh_reset_form(params);
});
params.submit_btn.click(function () {
params.form.submit();
});
params.textarea.data('init', 1);
$(this).show();
}
});
});
}

View File

@ -478,9 +478,9 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;}
a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon.png) -11px -74px no-repeat;}
a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersAttBtn{border:1px solid #888888; }
a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersApBtn{border:1px solid #888888; }
.homepageSignatureTextarea {width:207px; height:80px; max-width:207px; max-height:80px; border:1px solid #d9d9d9; outline:none; margin:0px 0px 12px 0px;}
.homepageSignature {font-size:12px; color:#888888; margin:10px 0; width:208px;}
@ -567,7 +567,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;}
.homepagePostReplyBannerTime{width:85px; display:inline-block;}
.homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;}
.homepagePostReplyInputContainer {width:680px; margin: 10px auto 0 auto;}
.homepagePostReplyInputContainer {width:630px; float:left;}
.homepagePostReplyInput {width:663px; height:45px; max-width:663px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:20px auto 10px auto;}
.homepagePostReplyEmotion {background:url(../images/homepage_icon.png) -90px -88px no-repeat; width:50px; height:24px; float:left; padding-left:30px;}
.homepagePostReplySubmit {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#ffffff; background-color:#269ac9;}
@ -588,6 +588,7 @@ a.postReplyCancel:hover {color:#ffffff;}
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}
a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyPortrait {float:left; width:33px;}
.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;}
.homepagePostReplyDes {float:left; width:632px; margin-left:15px;}
.homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
@ -670,16 +671,18 @@ a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}
/*20150826忘记密码 LB*/
.BgBox{ width:968px; border:1px solid #dddddd; background:#fff; padding:15px; padding-top:10px;margin: 10px auto 20px auto;}
.BgBox{ width:968px; border:1px solid #dddddd; background:#fff; padding:15px; padding-top:10px; margin:20px auto;}
.BgBox_h2{ font-size:16px; color:#484848; width:968px;border-bottom:1px solid #e3e3e3; padding-bottom:5px;}
.NomalInput{width:308px; height:38px; border:1px solid #98a1a6 !important; outline:none; color:#888888; font-size:14px;}
.BgBoxCon{ width:310px; margin:80px auto;}
.NomalInput{width:308px; height:38px; border:1px solid #98a1a6; outline:none; color:#888888; font-size:14px;}
.BgBoxCon{ width:310px; margin:140px auto 520px;}
.BgBoxConP{ font-size:14px; color:#484848;}
.LoginButton {width:315px; height:40px; background-color:#269ac9; font-size:14px; text-align:center; line-height:40px; vertical-align:middle;}
.LoginButton:hover {background-color:#297fb8;}
/*20150826协议 LB*/
.AgreementBox{ margin:20px 0; color:#666666; font-size:14px; line-height:1.9;}
.Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px; border: none;}
.Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px;}
.AgreementTxt{text-indent:2em; margin-bottom:15px;}
.AgreementImg{ margin:0px auto; width:619px;}
.AgreementTxt{text-indent: 2em; margin-bottom: 15px;}
.AgreementImg{margin: 0px auto; width: 820px;}
@ -929,9 +932,9 @@ a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflo
a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon.png) -11px -74px no-repeat;}
a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersAttBtn{border:1px solid #888888; }
a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersApBtn{border:1px solid #888888; }
/*20150906编程作业设置弹框 LB*/
.C_lgrey{ color:#a5a5a5;}