socialforge/app/views/org_courses/destroy.js.erb

18 lines
910 B
Plaintext

$("#added_orgs").html("");
$("#added_orgs").html('<%= escape_javascript(render :partial => "courses/settings/added_orgs", :locals => {:orgs => @course.organizations, :course_id => @course.id}) %>')
$("#search_orgs_result_list").html("");
$("#search_orgs_result_list").append('<ul class="ml20">');
<% @orgs_not_in_course.each do |org|%>
link = "<li><label><input type='checkbox'class='mr5 fl mt3' name='orgNames[]' value='<%=org.id%>'/><span class='relateOrgName fl'> <%=org.name %> </span></label></li><div class='cl mt5'></div>";
$("#search_orgs_result_list").append(link );
<%end %>
$("#search_orgs_result_list").append('</ul>')
<% if @org_count > 10 %>
$("#paginator").html(' <%= pagination_links_full @orgs_page, @org_count ,:per_page_links => true,:remote =>true,:flag=>true%>');
$("#paginator").css("display", "block");
<% else %>
$("#paginator").css("display", "none");
<% end %>