diff --git a/src/servlet/people/PeopleQueryServlet.java b/src/servlet/people/PeopleQueryServlet.java index 19a17af90c5d4ad8a27407654830086961a1d211..b42da7a03ce3da284db1d67cd4458b208c9a671a 100644 --- a/src/servlet/people/PeopleQueryServlet.java +++ b/src/servlet/people/PeopleQueryServlet.java @@ -35,6 +35,7 @@ public class PeopleQueryServlet extends HttpServlet { String requestT = req.getParameter("type"); User newUser = new User(); + //query all user information which satisfied the keywords and two filters String requestAll = "query_all"; if (requestAll.equals(requestT)){ String requestK = req.getParameter("keywords"); @@ -59,17 +60,18 @@ public class PeopleQueryServlet extends HttpServlet { ArrayList<User> userList = peopleIml.searchPeopleByNameAndMajor(newUser); String json = JSONArray.fromObject(userList).toString(); out.print(json); - }else if (!filter1.equals("0") && !filter2.equals("")){ + }else if (!filter1.equals("0") && !filter2.equals("0")){ newUser.setMajor(filter1); newUser.setJob(filter2); PeopleDAOImpl peopleIml = new PeopleDAOImpl(); - ArrayList<User> userList = peopleIml.searchPeopleByNameAndMajor(newUser); + ArrayList<User> userList = peopleIml.searchPeopleByNameAndBothFilter(newUser); String json = JSONArray.fromObject(userList).toString(); out.print(json); } return; } + // load recommend user (without current user!) String requestRecommend = "query_recommend"; if (requestRecommend.equals(requestT)){ int userid = Integer.parseInt(req.getParameter("userId")); diff --git a/web/index.html b/web/index.html index e0d40ff94827369215e9307667aeab6b6fa968b0..90129145fd214149a4ffcc095ae2856905088720 100644 --- a/web/index.html +++ b/web/index.html @@ -98,11 +98,12 @@ <div class="default-select"> <select id="majorFilter"> <option value="0">All Majors</option> - <option value="Engineering">Engineering</option> + <option value="Science">Science</option> <option value="Law">Law</option> - <option value="Medicine">Medicine</option> + <option value="Management">Management</option> <option value="Arts">Arts</option> - <option value="Science">Science</option> + <option value="Engineering">Engineering</option> + <option value="Medicine">Medicine</option> </select> </div> </div> diff --git a/web/js/ProjectPage/load_project_to_otherpeople_projectpage.js b/web/js/ProjectPage/load_project_to_otherpeople_projectpage.js index 39043cd43531db56475895cd21c9fcddaa4168a2..6c337c12171a40ca257b08e6e311fcafcf9ce394 100644 --- a/web/js/ProjectPage/load_project_to_otherpeople_projectpage.js +++ b/web/js/ProjectPage/load_project_to_otherpeople_projectpage.js @@ -197,15 +197,10 @@ function clickOVideoEvent(){ jQuery(document).ready(function() { $('.video-li a').on("click",function(){ - console.log("start to load video to show"); var vid = $(this); - console.log(vid) var id = vid[0].id; - console.log(id) var index = id.substr(1); - console.log(index) - console.log(videolist[index]) - $('#pvideo').attr('src',videolist[vid]); + $('#opvideo').attr('src',videolist[index]); }); }); } diff --git a/web/js/ProjectPage/load_project_to_projectpage.js b/web/js/ProjectPage/load_project_to_projectpage.js index a57afc0e1889869429a9945523be47cb255e480c..920e5e1ce1e86abec0443ed2c1ca6e1eb6a6cfe3 100644 --- a/web/js/ProjectPage/load_project_to_projectpage.js +++ b/web/js/ProjectPage/load_project_to_projectpage.js @@ -163,7 +163,7 @@ function loadProjectDetail(project){ var vedioname = videolist[v].substr(videoindex+1); $('#pvideoList').append('<div class="video-li">\n' + ' <span>'+ vedioname +'</span>\n' + - ' <a id="v'+ v +'">Watch this</a>\n' + + ' <a id="v'+ v +'" href="#pvideo">Watch this</a>\n' + ' </div>') } } @@ -226,10 +226,12 @@ function clickVideoEvent(){ jQuery(document).ready(function() { $('.video-li a').on("click",function(){ + console.log("i'm clicked ") var vid = $(this); var id = vid[0].id; var index = id.substr(1); - $('#pvideo').attr('src',videolist[vid]); + console.log(videolist[index]); + $('#pvideo').attr('src',videolist[index]); }); }); } diff --git a/web/other-person.html b/web/other-person.html index ebeee25f1e6bccb4c5f1d819dd408f26c74336cc..758f48602a30ff779072481927fe3746772d7971 100644 --- a/web/other-person.html +++ b/web/other-person.html @@ -98,13 +98,13 @@ </ul> </div> <div class="col-md-3 about-img"> - <img id="orightAvatar" src="img/profile.jpg" alt=""/> + <img id="orightAvatar" src="" alt=""/> </div> </div> <div class="about-des"> <span><i class="fa fa-dot-circle-o"></i> Self Description:</span> - <p id="selfIntro"></p > + <p id="oselfIntro"></p > </div> </div>