commit
d0bca180ca
@ -0,0 +1,12 @@
|
|||||||
|
$("#test_send_<%= @index%>").replaceWith("<a class='<%= @result == 0 ? 'green_btn' : 'red_btn'%> fl ml5 mt1 programing_test' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%></a>");
|
||||||
|
$("#test_result_<%= @index%>").val("<%= @result%>");
|
||||||
|
<% if @err_msg || @result != 0%>
|
||||||
|
$("#homework_work_test_show").show();
|
||||||
|
$("#homework_work_test_desc").text("<%= escape_javascript(@err_msg || status_to_err_msg(@result))%>");
|
||||||
|
<% if @err_msg%>
|
||||||
|
$("#homework_test_error_msg").val("<%= escape_javascript(@err_msg)%>");
|
||||||
|
<% end%>
|
||||||
|
<% else%>
|
||||||
|
$("#homework_work_test_show").hide();
|
||||||
|
$("#homework_test_error_msg").val("");
|
||||||
|
<% end%>
|
@ -0,0 +1,46 @@
|
|||||||
|
<div id="Footer">
|
||||||
|
<div class="footerAboutContainer">
|
||||||
|
<ul class="footerAbout">
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_about_us)%></a>|</li>
|
||||||
|
<li class="fl"><a href="http://forge.trustie.net/projects/2/feedback" class="f_grey mw20" target="_blank"><%= l(:label_contact_us)%></a>|</li>
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_recruitment_information)%></a>|</li>
|
||||||
|
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank"><%= l(:label_surpport_group)%></a>|</li>
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_forums)%></a>|</li>
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey ml20" target="_blank"><%= l(:label_language)%></a>
|
||||||
|
<select class="languageBox">
|
||||||
|
<option value="Chinese" selected="selected">中文</option>
|
||||||
|
<option value="English">英文</option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
<ul class="departments">
|
||||||
|
<li class="fl mr10">
|
||||||
|
<strong><%= l(:label_hosted_organization)%></strong><a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=47" class=" ml10 f_grey" target="_blank"><%= l(:label_hosted_by)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=41" class="mr45 f_grey" target="_blank"><%= l(:label_sponsor)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl mr10">
|
||||||
|
<strong><%= l(:label_partners)%></strong><a href="http://eecs.pku.edu.cn" class="ml10 f_grey" target="_blank"><%= l(:label_co_organizer_EECS)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://scse.buaa.edu.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_BHU)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.iscas.ac.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_CAS)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.inforbus.com/" class="f_grey" target="_blank"><%= l(:label_co_organizer_InforS)%></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<ul class="copyright">
|
||||||
|
<li class="fl"><%= l(:label_rights_reserved)%></li>
|
||||||
|
<span class="fl mw15">|</span>
|
||||||
|
<li class="fl"><a href="http://www.miibeian.gov.cn/" class="fl f_grey" target="_blank"><%= l(:label_license)%></a></li>
|
||||||
|
</ul>
|
||||||
|
</div><!--Footer end-->
|
||||||
|
<div class="cl"></div>
|
@ -1,8 +1,11 @@
|
|||||||
<% if(User.current.logged? && User.current!=target)%>
|
<% if User.current.logged?%>
|
||||||
<%if(target.watched_by?(User.current))%>
|
<% if User.current == target%>
|
||||||
<a id="user_watch_id" href="<%= watch_path(:object_type=>
|
<a href="<%= url_for(:controller => 'my', :action => 'account') %>" class="fr gz_btn mr10 ">编辑资料</a>
|
||||||
'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr qx_btn mr10" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
|
<%else%>
|
||||||
<% else %>
|
<%if(target.watched_by?(User.current))%>
|
||||||
<a id="user_watch_id" href="<%= watch_path(:object_type=>'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr gz_btn mr10" data-method="post" data-remote="true" title="添加关注">关注</a>
|
<a id="user_watch_id" href="<%= watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr qx_btn mr10" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
|
||||||
<% end %>
|
<% else %>
|
||||||
|
<a id="user_watch_id" href="<%= watch_path(:object_type=>'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr gz_btn mr10" data-method="post" data-remote="true" title="添加关注">添加关注</a>
|
||||||
|
<% end %>
|
||||||
|
<% end%>
|
||||||
<% end %>
|
<% end %>
|
@ -1,77 +0,0 @@
|
|||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h22"><%= l(:label_project_dts_new) %></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--JS进度条-->
|
|
||||||
<style type="text/css">
|
|
||||||
#out{}
|
|
||||||
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
|
||||||
#font_color{background:yellow;text-align:center;color:white;}
|
|
||||||
td.redBox {border:1px solid #b0b0b0; width:80px; background-color:#EAEAEA; }
|
|
||||||
td.redBox2 {border:1px solid #b0b0b0; width:120px; }
|
|
||||||
</style>
|
|
||||||
<div style="padding-left: 200px;">
|
|
||||||
<div id='out'>
|
|
||||||
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;">代码上传分析中...</p>
|
|
||||||
<div style="width:300px;height:20px;background:#EEE;">
|
|
||||||
<div id="in" style="width:1%">1%</div>
|
|
||||||
<div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
i=0;
|
|
||||||
$(function(){
|
|
||||||
ba=setInterval("begin()",70);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
|
||||||
});
|
|
||||||
function begin()
|
|
||||||
{
|
|
||||||
i+=1;
|
|
||||||
if(i<=100)
|
|
||||||
{
|
|
||||||
document.getElementById("in").style.width=i+"%";
|
|
||||||
document.getElementById("in").innerHTML=i+"%";}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clearInterval(ba);
|
|
||||||
$("#show_content_div").show();
|
|
||||||
$("#out").hide();
|
|
||||||
// document.getElementById("out").style.display="none";
|
|
||||||
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
|
||||||
<p class="fr f14 " style="padding-right: 32px;padding-bottom: 10px;">语言:<span style="color: red">Java</span> 总文件数:<span style="color: red">361</span> 代码行数:<span style="color: red">48662</span></p>
|
|
||||||
|
|
||||||
<% @dts.each do |dt| %>
|
|
||||||
<div style="padding-left: 35px;padding-top: 10px;">
|
|
||||||
<table width="600" border="0" style="padding-left: 30px;padding-top: 100px; border-spacing:0; border-collapse:collapse; border: 1px solid #b0b0b0;">
|
|
||||||
<tr>
|
|
||||||
<td align="center" class="redBox">错误变量</td>
|
|
||||||
<td class="redBox2"> <%= dt.Variable %></td>
|
|
||||||
<td align="center" class="redBox">起始行</td>
|
|
||||||
<td class="redBox2"> <%= dt.StartLine %></td>
|
|
||||||
<td align="center" class="redBox">IP行</td>
|
|
||||||
<td class="redBox2"> <%= dt.IPLine %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" class="redBox">缺陷代码</td>
|
|
||||||
<td colspan="5" class="redBox2"> <%= dt.IPLineCode %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" class="redBox">错误描述</td>
|
|
||||||
<td colspan="5" class="redBox2"> <%= dt.Description %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" class="redBox">文件</td>
|
|
||||||
<td colspan="5" class="redBox2"> <%= dt.File %></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</div>
|
|
@ -1,3 +0,0 @@
|
|||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h2"><%= l(:label_project_dts) %></h2>
|
|
||||||
</div>
|
|
@ -1,46 +0,0 @@
|
|||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h22"><%= l(:label_project_soft_file) %></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--JS进度条-->
|
|
||||||
<style type="text/css">
|
|
||||||
#out{}
|
|
||||||
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
|
||||||
#font_color{background:yellow;text-align:center;color:white;}
|
|
||||||
</style>
|
|
||||||
<div style="padding-left: 200px;">
|
|
||||||
<div id='out'>
|
|
||||||
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;">软件资源库部署中...</p>
|
|
||||||
<div style="width:300px;height:20px;background:#EEE;">
|
|
||||||
<div id="in" style="width:1%">0%</div>
|
|
||||||
<div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
i=0;
|
|
||||||
$(function(){
|
|
||||||
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
|
||||||
});
|
|
||||||
function begin()
|
|
||||||
{
|
|
||||||
i+=1;
|
|
||||||
if(i<=100)
|
|
||||||
{
|
|
||||||
document.getElementById("in").style.width=i+"%";
|
|
||||||
document.getElementById("in").innerHTML=i+"%";}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clearInterval(ba);
|
|
||||||
$("#show_content_div").show();
|
|
||||||
$("#out").hide();
|
|
||||||
// document.getElementById("out").style.display="none";
|
|
||||||
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
|
||||||
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
|
|
||||||
</div>
|
|
@ -1,46 +0,0 @@
|
|||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h22"><%= l(:label_project_soft_knowledge) %></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--JS进度条-->
|
|
||||||
<style type="text/css">
|
|
||||||
#out{}
|
|
||||||
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
|
||||||
#font_color{background:yellow;text-align:center;color:white;}
|
|
||||||
</style>
|
|
||||||
<div style="padding-left: 200px;">
|
|
||||||
<div id='out'>
|
|
||||||
<p style="padding-left: 120px;padding-bottom: 10px;font-size: 14px;">云化部署中...</p>
|
|
||||||
<div style="width:300px;height:20px;background:#EEE;">
|
|
||||||
<div id="in" style="width:1%">0%</div>
|
|
||||||
<div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
i=0;
|
|
||||||
$(function(){
|
|
||||||
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
|
||||||
});
|
|
||||||
function begin()
|
|
||||||
{
|
|
||||||
i+=1;
|
|
||||||
if(i<=100)
|
|
||||||
{
|
|
||||||
document.getElementById("in").style.width=i+"%";
|
|
||||||
document.getElementById("in").innerHTML=i+"%";}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clearInterval(ba);
|
|
||||||
$("#show_content_div").show();
|
|
||||||
$("#out").hide();
|
|
||||||
// document.getElementById("out").style.display="none";
|
|
||||||
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
|
||||||
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
|
|
||||||
</div>
|
|
@ -1,46 +0,0 @@
|
|||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h22"><%= l(:label_project_soft_service) %></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--JS进度条-->
|
|
||||||
<style type="text/css">
|
|
||||||
#out{}
|
|
||||||
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
|
||||||
#font_color{background:yellow;text-align:center;color:white;}
|
|
||||||
</style>
|
|
||||||
<div style="padding-left: 200px;">
|
|
||||||
<div id='out'>
|
|
||||||
<p style="padding-left: 120px;padding-bottom: 10px;font-size: 14px;">云化部署中...</p>
|
|
||||||
<div style="width:300px;height:20px;background:#EEE;">
|
|
||||||
<div id="in" style="width:1%">0%</div>
|
|
||||||
<div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
i=0;
|
|
||||||
$(function(){
|
|
||||||
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
|
||||||
});
|
|
||||||
function begin()
|
|
||||||
{
|
|
||||||
i+=1;
|
|
||||||
if(i<=100)
|
|
||||||
{
|
|
||||||
document.getElementById("in").style.width=i+"%";
|
|
||||||
document.getElementById("in").innerHTML=i+"%";}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clearInterval(ba);
|
|
||||||
$("#show_content_div").show();
|
|
||||||
$("#out").hide();
|
|
||||||
// document.getElementById("out").style.display="none";
|
|
||||||
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
|
||||||
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
|
|
||||||
</div>
|
|
@ -1,47 +0,0 @@
|
|||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h22"><%= l(:label_project_dts_yun) %></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--JS进度条-->
|
|
||||||
<style type="text/css">
|
|
||||||
#out{}
|
|
||||||
#in{}
|
|
||||||
#font_color{background:yellow;text-align:center;color:white;}
|
|
||||||
</style>
|
|
||||||
<div style="padding-left: 200px;">
|
|
||||||
<div id='out'>
|
|
||||||
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;padding-top: 10px;">云化部署中....</p>
|
|
||||||
<div>
|
|
||||||
<div id="in" style="width:0%"></div>
|
|
||||||
<div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
i=0;
|
|
||||||
$(function(){
|
|
||||||
ba=setInterval("begin()",60);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
|
||||||
});
|
|
||||||
function begin()
|
|
||||||
{
|
|
||||||
i+=1;
|
|
||||||
if(i<=100)
|
|
||||||
{
|
|
||||||
document.getElementById("in").style.width="";
|
|
||||||
document.getElementById("in").innerHTML="";}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clearInterval(ba);
|
|
||||||
$("#show_content_div").show();
|
|
||||||
$("#out").hide();
|
|
||||||
// document.getElementById("out").style.display="none";
|
|
||||||
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="show_content_div" style="display: none;padding-top: 0px; ">
|
|
||||||
<p class="pl10 f14 "><span style="color: #7f7f7f;font-size: 14px; ">所部署服务的网址:</span>
|
|
||||||
<span><a href="http://rubyblog.forge.trustie.net/accounts/login" target="_Blank" style="color: #15BCCF;font-size: 14px;">http://rubyblog.forge.trustie.net/accounts/login</a></span></p>
|
|
||||||
</div>
|
|
@ -1,15 +1,6 @@
|
|||||||
<div id="tags_show">
|
<div id="tags">
|
||||||
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
<div id="tags_show">
|
||||||
|
<%= render :partial => "tags/tag_project_new_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% if User.current.logged?%>
|
|
||||||
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();"><%= l(:label_add_tag)%></a>
|
|
||||||
<span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
|
||||||
<%= form_for "tag_for_save",:remote=>true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
|
||||||
<%= f.text_field :name ,:id => "tags_name",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
|
|
||||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
|
||||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
|
||||||
<input type="button" class="submit f_l" onclick="$('#tags_name').parent().submit();" />
|
|
||||||
<% end %>
|
|
||||||
</span>
|
|
||||||
<% end%>
|
|
||||||
|
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
<% @tags = obj.reload.tag_list %>
|
||||||
|
<% if non_list_all && @tags.size > 0 %>
|
||||||
|
|
||||||
|
<% else %>
|
||||||
|
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
|
||||||
|
<% if @tags.size > 0 %>
|
||||||
|
<% @tags.each do |tag| %>
|
||||||
|
<span class="re_tag f_l " id="tag">
|
||||||
|
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id, :class => 'pt5' %>
|
||||||
|
<span class="del">
|
||||||
|
<%= link_to('x', remove_tag_path(:tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag), :remote => true, :confirm => l(:text_are_you_sure) ) if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if User.current.logged?%>
|
||||||
|
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag02').slideToggle();"><%= l(:label_add_tag)%></a>
|
||||||
|
<span id="add_tag02" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
||||||
|
<%= form_for "tag_for_save",:remote => true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
||||||
|
<%= f.text_field :name ,:id => "tags_name2",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
|
||||||
|
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||||
|
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||||
|
<input type="button" class="submit f_l" onclick="$('#tags_name2').parent().submit();" />
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
<% @tags = obj.reload.tag_list %>
|
||||||
|
<% if non_list_all && @tags.size > 0 %>
|
||||||
|
|
||||||
|
<% else %>
|
||||||
|
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
|
||||||
|
<% if @tags.size > 0 %>
|
||||||
|
<% @tags.each do |tag| %>
|
||||||
|
<span class="re_tag f_l " id="tag">
|
||||||
|
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id, :class => 'pt5' %>
|
||||||
|
<span class="del">
|
||||||
|
<%= link_to('x', remove_tag_path(:tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag), :remote => true, :confirm => l(:text_are_you_sure) ) if User.current.eql?(obj) %>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if User.current.logged?%>
|
||||||
|
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag03').slideToggle();"><%= l(:label_add_tag)%></a>
|
||||||
|
<span id="add_tag03" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
||||||
|
<%= form_for "tag_for_save",:remote => true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
||||||
|
<%= f.text_field :name ,:id => "tags_name3",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
|
||||||
|
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||||
|
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||||
|
<input type="button" class="submit f_l" onclick="$('#tags_name3').parent().submit();" />
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
|||||||
|
<div id="tags">
|
||||||
|
<div id="tags_show">
|
||||||
|
<%= render :partial => "tags/tag_user_new_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,40 @@
|
|||||||
|
<% parent_jour = JournalsForMessage.where("id = #{reply.m_reply_id}").first %>
|
||||||
|
<% if parent_jour%>
|
||||||
|
<div class="mes_box02" id = '<%= reply.id %>'>
|
||||||
|
<%= link_to image_tag(url_to_avatar(reply.user),:width => '32',:height => '32'), user_path(reply.user),:class => "users_pic_sub fl mr5" %>
|
||||||
|
<div class=" mes_box02_info fl">
|
||||||
|
<%= link_to "#{reply.user.nickname} ".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
|
||||||
|
<span class="fl c_grey"> 回复 </span>
|
||||||
|
<%= link_to "#{parent_jour.user.nickname} : ".html_safe, user_path(parent_jour.user),:class => 'course_name fl c_blue02 mr5 ', :target => "_blank"%>
|
||||||
|
<div class="cl">
|
||||||
|
<%= reply.notes.html_safe %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="c_grey fr">
|
||||||
|
<%= time_tag(reply.created_on).html_safe%>
|
||||||
|
</span>
|
||||||
|
<div class="fr cr">
|
||||||
|
<%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"sub_reply_btn", :class => "ml5 c_purple" %>
|
||||||
|
<% if User.current.admin? || reply.user == User.current%>
|
||||||
|
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "c_purple ml5", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div nhname='sub_div_form' class="mt10 ml40" style="display:none;">
|
||||||
|
<form action="<%= url_for(:controller => 'words', :action => 'create_reply') %>" data-remote="true" method="post">
|
||||||
|
<input id="reference_id" name="reference_id" type="hidden" value="<%= (reply.m_parent_id.nil? || reply.m_parent_id==0 ) ? reply.id : reply.m_parent_id %>">
|
||||||
|
<input id="reference_user_id" name="reference_user_id" type="hidden" value="<%= reply.user.id %>">
|
||||||
|
<input id="reference_message_id" name="reference_message_id" type="hidden" value="<%= reply.id %>">
|
||||||
|
<input id="show_name" name="show_name" type="hidden" value="true">
|
||||||
|
<textarea name='user_notes' style="display:none;"></textarea>
|
||||||
|
<p nhname='sub_contentmsg'></p>
|
||||||
|
<div nhname='sub_toolbar_container' style="float:left;padding-top:3px;"></div>
|
||||||
|
<a nhname="sub_cancel_btn" href="javascript:void(0);" class="grey_n_btn fr" style="margin-top:3px;">取消</a>
|
||||||
|
<a nhname="sub_submit_btn" href="javascript:void(0);" class="blue_n_btn fr mr5" style="margin-top:3px;">发布</a>
|
||||||
|
</form>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div><!--mes_box02 end-->
|
||||||
|
<% end%>
|
@ -0,0 +1,44 @@
|
|||||||
|
<div class="message_list break_word" id="<%= jour.id %>" nhname="rec" data-id="<%= jour.id %>">
|
||||||
|
<%= link_to image_tag(url_to_avatar(jour.user),:width => '46',:height => '46'), user_path(jour.user),:class => "users_pic fl" %>
|
||||||
|
<div class="fl ml5 mes_box mb10" >
|
||||||
|
<div>
|
||||||
|
<%= link_to "#{jour.user.nickname} : ".html_safe, user_path(jour.user),:class => 'fl c_blue02 f14 fb mb5', :target => "_blank"%>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div>
|
||||||
|
<%= jour.notes.html_safe %>
|
||||||
|
</div>
|
||||||
|
</div><!--mes_box end-->
|
||||||
|
<span class="c_grey fr mb10">
|
||||||
|
<%= time_tag(jour.created_on).html_safe %>
|
||||||
|
</span>
|
||||||
|
<div class="fr cr">
|
||||||
|
<%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"reply_btn", :class => "ml5 c_purple" %>
|
||||||
|
<% if User.current.admin? || jour.user == User.current%>
|
||||||
|
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => jour, :user_id => jour.user},
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "ml5 c_purple", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div nhname='div_form' class="mt10 ml80" style="display:none;">
|
||||||
|
<form action="<%= url_for(:controller => 'words', :action => 'create_reply') %>" data-remote="true" method="post">
|
||||||
|
<input id="reference_id" name="reference_id" type="hidden" value="<%= (jour.m_parent_id.nil? || jour.m_parent_id==0 ) ? jour.id : jour.m_parent_id %>">
|
||||||
|
<input id="reference_user_id" name="reference_user_id" type="hidden" value="<%= jour.user.id %>">
|
||||||
|
<input id="reference_message_id" name="reference_message_id" type="hidden" value="<%= jour.id %>">
|
||||||
|
<input id="show_name" name="show_name" type="hidden" value="true">
|
||||||
|
<textarea name='user_notes' style="display:none;"></textarea>
|
||||||
|
<p nhname='contentmsg'></p>
|
||||||
|
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
|
||||||
|
<a nhname="cancel_btn" href="javascript:;" class="grey_n_btn fr" style="margin-top:3px;">取消</a>
|
||||||
|
<a nhname="submit_btn" href="javascript:;" class="blue_n_btn fr mr5" style="margin-top:3px;">发布</a>
|
||||||
|
</form>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<div nhname="reply_list">
|
||||||
|
<% fetch_user_leaveWord_reply(jour).each do |reply|%>
|
||||||
|
<%= render :partial => 'user_jour_reply', :locals => {:reply => reply} %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div><!--message_list end-->
|
@ -1,7 +1,40 @@
|
|||||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
<div class="top_new">
|
||||||
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
|
||||||
|
<% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
|
||||||
|
<a href="<%= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= render :partial => 'user_jours',
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"user" %>
|
||||||
:locals => { :journals => @jour, :state => false}
|
<div id="RSide" class="fl">
|
||||||
%>
|
<!--<div class="users_r_top">-->
|
||||||
<% html_title(l(:label_responses)) -%>
|
<!--<h2 class="users_r_h2">用户留言</h2>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<div class="message_box mb10">
|
||||||
|
<div nhname='new_message' style="display:none;">
|
||||||
|
<%= form_for('new_form',:url => leave_user_message_path(@user.id),:method => "post") do |f|%>
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea' name="new_form[user_message]"></textarea>
|
||||||
|
<p nhname='contentmsg'></p>
|
||||||
|
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
|
||||||
|
<a id="new_message_cancel_btn" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:3px;">取消</a>
|
||||||
|
<a id="new_message_submit_btn" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:3px;">留言</a>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<div class="message_list_box " id="user_jour_list">
|
||||||
|
<%if @jour%>
|
||||||
|
<% @jour.each do |jour|%>
|
||||||
|
<%= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
|
||||||
|
<%end%>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
<ul class="wlist" style=" border:none;">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div><!--message_box end-->
|
||||||
|
</div>
|
@ -0,0 +1,9 @@
|
|||||||
|
class AddResultToTest < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
add_column :homework_tests, :result, :integer,default: 0
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_column :homework_tests,:result
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,9 @@
|
|||||||
|
class AddErrormsgToTest < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
add_column :homework_tests,:error_msg,:text
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_column :homework_tests,:error_msg
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,9 @@
|
|||||||
|
class ChangeResultDefault < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
change_column :homework_tests,:result,:integer,:default => nil
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
change_column :homework_tests,:result,:integer,:default => 0
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,261 @@
|
|||||||
|
//个人动态
|
||||||
|
$(function(){
|
||||||
|
function init_editor(params){
|
||||||
|
var editor = params.kindutil.create(params.textarea, {
|
||||||
|
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
|
||||||
|
items:['emoticons'],
|
||||||
|
afterChange:function(){//按键事件
|
||||||
|
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||||
|
},
|
||||||
|
afterCreate:function(){
|
||||||
|
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||||
|
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||||
|
params.toolbar_container.append(toolbar);
|
||||||
|
}
|
||||||
|
}).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();
|
||||||
|
}
|
||||||
|
|
||||||
|
KindEditor.ready(function(K){
|
||||||
|
$("a[nhname='reply_btn']").live('click',function(){
|
||||||
|
var params = {};
|
||||||
|
params.kindutil = K;
|
||||||
|
params.container = $(this).parent().parent('div');
|
||||||
|
params.div_form = $("div[nhname='div_form']",params.container);
|
||||||
|
params.form = $("form",params.div_form);
|
||||||
|
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||||
|
params.textarea.prev('div').css("height","60px");
|
||||||
|
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||||
|
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||||
|
params.cancel_btn = $("a[nhname='cancel_btn']",params.div_form);
|
||||||
|
params.submit_btn = $("a[nhname='submit_btn']",params.div_form);
|
||||||
|
if(params.textarea.data('init') == undefined){
|
||||||
|
params.editor = init_editor(params);
|
||||||
|
init_form(params);
|
||||||
|
params.cancel_btn.click(function(){
|
||||||
|
nh_reset_form(params);
|
||||||
|
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||||
|
});
|
||||||
|
params.submit_btn.click(function(){
|
||||||
|
params.form.submit();
|
||||||
|
});
|
||||||
|
params.textarea.data('init',1);
|
||||||
|
}
|
||||||
|
params.cancel_btn.click();
|
||||||
|
setTimeout(function(){
|
||||||
|
if(!params.div_form.is(':hidden')){
|
||||||
|
params.textarea.show();
|
||||||
|
params.textarea.focus();
|
||||||
|
params.textarea.hide();
|
||||||
|
}
|
||||||
|
},300);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("a[nhname='sub_reply_btn']").live('click',function(){
|
||||||
|
var params = {};
|
||||||
|
params.kindutil = K;
|
||||||
|
params.container = $(this).parent().parent('div');
|
||||||
|
params.div_form = $("div[nhname='sub_div_form']",params.container);
|
||||||
|
params.form = $("form",params.div_form);
|
||||||
|
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||||
|
params.textarea.prev('div').css("height","60px");
|
||||||
|
params.contentmsg = $("p[nhname='sub_contentmsg']",params.div_form);
|
||||||
|
params.toolbar_container = $("div[nhname='sub_toolbar_container']",params.div_form);
|
||||||
|
params.cancel_btn = $("a[nhname='sub_cancel_btn']",params.div_form);
|
||||||
|
params.submit_btn = $("a[nhname='sub_submit_btn']",params.div_form);
|
||||||
|
if(params.textarea.data('init') == undefined){
|
||||||
|
params.editor = init_editor(params);
|
||||||
|
init_form(params);
|
||||||
|
params.cancel_btn.click(function(){
|
||||||
|
nh_reset_form(params);
|
||||||
|
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||||
|
});
|
||||||
|
params.submit_btn.click(function(){
|
||||||
|
params.form.submit();
|
||||||
|
});
|
||||||
|
params.textarea.data('init',1);
|
||||||
|
}
|
||||||
|
params.cancel_btn.click();
|
||||||
|
setTimeout(function(){
|
||||||
|
if(!params.div_form.is(':hidden')){
|
||||||
|
params.textarea.show();
|
||||||
|
params.textarea.focus();
|
||||||
|
params.textarea.hide();
|
||||||
|
}
|
||||||
|
},300);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("div[nhname='new_message']").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']",params.div_form);
|
||||||
|
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||||
|
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||||
|
params.cancel_btn = $("#new_message_cancel_btn");
|
||||||
|
params.submit_btn = $("#new_message_submit_btn");
|
||||||
|
|
||||||
|
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_list_more_div(params){
|
||||||
|
var p=params;
|
||||||
|
p.exbtn.click(function(){
|
||||||
|
var isclose = p.container.data('isclose');
|
||||||
|
var hasmore = p.container.data('hasmore');
|
||||||
|
if(isclose == '1'){
|
||||||
|
$("div[nhname='rec']",p.container).show();
|
||||||
|
p.container.data('isclose','0');
|
||||||
|
change_status_4_list_more_div(params);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(hasmore == '0'){
|
||||||
|
change_status_4_list_more_div(params,'get');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var url = p.container.data('url');
|
||||||
|
if($("div[nhname='rec']",p.container).length > 0){
|
||||||
|
var lastid = $("div[nhname='rec']",p.container).filter(':last').data('id');
|
||||||
|
url += "?lastid="+lastid;
|
||||||
|
var lasttime = $("div[nhname='rec']",p.container).filter(':last').data('time');
|
||||||
|
if(lasttime != undefined){
|
||||||
|
url += "&lasttime="+lasttime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$.ajax( {url:url,dataType:'text',success:function(data){
|
||||||
|
var html = $("<div>"+data+"</div>");
|
||||||
|
var lens = $("div[nhname='rec']",html).length;
|
||||||
|
if(lens < p.size){
|
||||||
|
p.container.data('hasmore','0');
|
||||||
|
}
|
||||||
|
if(lens>0){
|
||||||
|
var currpage = parseInt(p.container.data('currpage'))+1;
|
||||||
|
p.container.data('currpage',currpage);
|
||||||
|
p.container.append(html.html())
|
||||||
|
}
|
||||||
|
change_status_4_list_more_div(params,'get');
|
||||||
|
p.div.show();
|
||||||
|
}} );
|
||||||
|
});
|
||||||
|
p.clbtn.click(function(){
|
||||||
|
var i=0;
|
||||||
|
$("div[nhname='rec']",p.container).each(function(){
|
||||||
|
i++;
|
||||||
|
if(i> p.size){
|
||||||
|
$(this).hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
p.container.data('isclose','1');
|
||||||
|
change_status_4_list_more_div(params);
|
||||||
|
});
|
||||||
|
p.exbtn.click();
|
||||||
|
}
|
||||||
|
function change_status_4_list_more_div(params,opt){
|
||||||
|
var p=params;
|
||||||
|
if($("div[nhname='rec']",p.container).length == 0 && opt != 'get'){
|
||||||
|
p.exbtn.click();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var show_lens = $("div[nhname='rec']",p.container).length - $("div[nhname='rec']",p.container).filter(':hidden').length;
|
||||||
|
if( show_lens > p.size ){
|
||||||
|
p.clbtn.show();
|
||||||
|
}else{
|
||||||
|
p.clbtn.hide();
|
||||||
|
}
|
||||||
|
if($("div[nhname='rec']",p.container).length == 0){
|
||||||
|
p.exbtn.html(p.nodatamsg);
|
||||||
|
}else if( p.container.data('hasmore') == '1' || p.container.data('isclose')=='1' ){
|
||||||
|
p.exbtn.html('点击展开更多');
|
||||||
|
}else{
|
||||||
|
p.exbtn.html('没有更多了');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function init_list_more_div_params(div){
|
||||||
|
var params = {};
|
||||||
|
params.div = div;
|
||||||
|
params.container = $("div[nhname='container']",div);
|
||||||
|
params.exbtn = $("a[nhname='expand']",div);
|
||||||
|
params.clbtn = $("a[nhname='close']",div);
|
||||||
|
params.size = params.container.data('pagesize');
|
||||||
|
params.nodatamsg = params.container.data('nodatamsg');
|
||||||
|
if( params.size == undefined ){
|
||||||
|
params.size = 13;
|
||||||
|
}
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
$(function(){
|
||||||
|
$("div[nhname='list_more_div']").each(function(){
|
||||||
|
var params = init_list_more_div_params($(this));
|
||||||
|
init_list_more_div(params)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//个人动态 end
|
Loading…
Reference in new issue