This commit is contained in:
z9hang 2014-08-16 13:22:46 +08:00
commit 12434e22c5
3 changed files with 26 additions and 0 deletions

View File

@ -31,6 +31,7 @@ module MembersHelper
}
s + content_tag('div', content_tag('ul', links), :class => 'pagination_new')
end
# add by nwb

View File

@ -3,3 +3,14 @@ $('#principals_for_new_member').html('<%= escape_javascript(render_principals_fo
<% elsif @course%>
$('#principals_for_new_member').html('<%= escape_javascript(render_principals_for_new_course_members(@course)) %>');
<%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);
}

View File

@ -130,3 +130,17 @@
<% end %>
<% end %>
</div>
<script type="text/javascript">
$(document).ready(function () {
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);
}
});
</script>