2014-10-23 11:30:34 +08:00
|
|
|
<% if @project%>
|
2015-07-22 15:38:56 +08:00
|
|
|
var checked = $("#principals input:checked").size();
|
|
|
|
if(checked > 0)
|
|
|
|
{
|
|
|
|
alert('翻页或搜索后将丢失当前选择的用户数据!');
|
|
|
|
}
|
2015-03-12 15:46:24 +08:00
|
|
|
<% if @flag == "true"%>
|
|
|
|
$('#principals_for_new_member').html('<%= escape_javascript(render_project_members(@project)) %>');
|
|
|
|
<% else%>
|
2015-04-14 11:47:47 +08:00
|
|
|
$('#principals_for_new_member').html('<%= escape_javascript(render_project_members(@project)) %>');
|
2015-03-12 15:46:24 +08:00
|
|
|
<% end%>
|
2014-10-23 11:30:34 +08:00
|
|
|
<% elsif @course%>
|
2015-03-12 15:46:24 +08:00
|
|
|
var checked = $("#principals input:checked").size();
|
|
|
|
if(checked > 0)
|
|
|
|
{
|
|
|
|
alert('翻页或搜索后将丢失当前选择的用户数据!');
|
|
|
|
}
|
|
|
|
$('#principals_for_new_member').html('<%= escape_javascript(render_principals_for_new_course_members(@course)) %>');
|
2014-10-23 11:30:34 +08:00
|
|
|
<%end%>
|
|
|
|
var collection=$("#principals_for_new_member").children("#principals").children("label");
|
|
|
|
collection.css("text-overflow","ellipsis");
|
|
|
|
collection.css("white-space","nowrap");
|
|
|
|
collection.css("width","200px");
|
|
|
|
collection.css("overflow","hidden");
|
|
|
|
for(i=0;i<collection.length;i++){ //增加悬浮显示
|
|
|
|
var label=collection[i];
|
|
|
|
var text=$(label).text();
|
|
|
|
$(label).attr("title",text);
|
|
|
|
}
|
|
|
|
|