组织加入项目或者课程,刷新项目列表和课程列表;同时,弹窗给出关联成功的提示

This commit is contained in:
ouyangxuhua 2015-11-27 13:17:23 +08:00
parent e0f4050779
commit 365349878d
4 changed files with 12 additions and 3 deletions

View File

@ -91,6 +91,7 @@
url: "/organizations/" + orgId + "/search_courses?name=" + $("input[name='courses']").val().trim(),
type: "get"
});
alert("加入成功");
}
});
}

View File

@ -87,6 +87,7 @@
url: "/organizations/" + orgId + "/search_projects?name=" + $("input[name='projects']").val().trim(),
type: "get"
});
alert("加入成功");
}
});
}

View File

@ -0,0 +1,5 @@
$("#homepageLeftMenuCourses").html("");
$("#homepageLeftMenuCourses").append("<ul>");
$("#homepageLeftMenuCourses").append("<%= escape_javascript(render :partial => 'layouts/org_courses',
:locals=>{:courses=>@organization.courses.reorder('created_at').limit(5),:org_id=>@organization.id,:page=> 1}) %>");
$("#homepageLeftMenuCourses").append("</ul>");

View File

@ -1,3 +1,5 @@
//$("#homepageLeftMenuProjects").html("");
//$("#homepageLeftMenuProjects").append("<ul>");
//$("#homepageLeftMenuProjects").append("<%#= escape_javascript %>")
$("#homepageLeftMenuProjects").html("");
$("#homepageLeftMenuProjects").append("<ul>");
$("#homepageLeftMenuProjects").append("<%= escape_javascript(render :partial => 'layouts/org_projects',
:locals=>{:projects=>@organization.projects.reorder('created_at').limit(5),:org_id=>@organization.id,:page=> 1}) %>");
$("#homepageLeftMenuProjects").append("</ul>");