2014-06-16 15:00:35 +08:00
|
|
|
<% if @project%>
|
2013-08-01 10:33:49 +08:00
|
|
|
$('#principals_for_new_member').html('<%= escape_javascript(render_principals_for_new_members(@project)) %>');
|
2014-06-16 15:00:35 +08:00
|
|
|
<% elsif @course%>
|
|
|
|
$('#principals_for_new_member').html('<%= escape_javascript(render_principals_for_new_course_members(@course)) %>');
|
|
|
|
<%end%>
|
2014-08-16 10:49:27 +08:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|