svnno****@sourc*****
svnno****@sourc*****
2008年 11月 21日 (金) 11:12:54 JST
Revision: 1389 http://svn.sourceforge.jp/view?root=pal&view=rev&rev=1389 Author: shinsuke Date: 2008-11-21 11:12:54 +0900 (Fri, 21 Nov 2008) Log Message: ----------- added facilities menu. Modified Paths: -------------- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/admin/schedule/OnetimeScheduleAction.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/admin/schedule/RepeatScheduleAction.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/OnetimeScheduleAction.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/RepeatScheduleAction.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/EventSchedule.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/FacilityScheduleMapping.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/dxo/OnetimeScheduleDxo.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/dxo/RepeatScheduleDxo.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/admin/schedule/OnetimeScheduleForm.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/admin/schedule/RepeatScheduleForm.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/OnetimeScheduleForm.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/RepeatScheduleForm.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/FacilityService.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/OnetimeScheduleService.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/RepeatScheduleService.java scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/confirm.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/edit.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/userlist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/confirm.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/edit.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/userlist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/confirm.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/edit.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/userlist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/confirm.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/edit.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/userlist.jsp Added Paths: ----------- scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/facilitylist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/facilitylist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/facilitylist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/facilitylist.jsp -------------- next part -------------- Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/admin/schedule/OnetimeScheduleAction.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/admin/schedule/OnetimeScheduleAction.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/admin/schedule/OnetimeScheduleAction.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -11,10 +11,12 @@ import jp.sf.pal.scheduler.common.util.ConfigUtil; import jp.sf.pal.scheduler.common.util.SAStrutsUtil; import jp.sf.pal.scheduler.db.exentity.EventSchedule; +import jp.sf.pal.scheduler.db.exentity.Facility; import jp.sf.pal.scheduler.db.exentity.UserInfo; import jp.sf.pal.scheduler.dxo.OnetimeScheduleDxo; import jp.sf.pal.scheduler.form.admin.schedule.OnetimeScheduleForm; import jp.sf.pal.scheduler.pager.OnetimeSchedulePager; +import jp.sf.pal.scheduler.service.FacilityService; import jp.sf.pal.scheduler.service.OnetimeScheduleService; import jp.sf.pal.scheduler.service.UserInfoService; @@ -44,6 +46,8 @@ private UserInfoService userInfoService; + private FacilityService facilityService; + private OnetimeSchedulePager onetimeSchedulePager; private PagerDxo pagerDxo; @@ -311,6 +315,60 @@ return "userlist.jsp"; } + @Execute(validator = false, input = "error.jsp") + public String selectfacilities() { + return "facilitylist.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String setfacilities() { + return "edit.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String addfacilities() { + List<String> facilityList = new ArrayList<String>(); + if (onetimeScheduleForm.selectedFacilities != null) { + for (String facilityId : onetimeScheduleForm.selectedFacilities) { + facilityList.add(facilityId); + } + } + if (onetimeScheduleForm.addedFacilities != null) { + for (String facilityId : onetimeScheduleForm.addedFacilities) { + facilityList.add(facilityId); + } + } + if (!facilityList.isEmpty()) { + onetimeScheduleForm.selectedFacilities = facilityList + .toArray(new String[0]); + } else { + onetimeScheduleForm.selectedFacilities = null; + } + return "facilitylist.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String removefacilities() { + List<String> facilityList = new ArrayList<String>(); + if (onetimeScheduleForm.selectedFacilities != null) { + for (String facilityId : onetimeScheduleForm.selectedFacilities) { + facilityList.add(facilityId); + } + } + if (onetimeScheduleForm.removedFacilities != null) { + for (String facilityId : onetimeScheduleForm.removedFacilities) { + facilityList.remove(facilityId); + } + } + if (!facilityList.isEmpty()) { + onetimeScheduleForm.selectedFacilities = facilityList + .toArray(new String[0]); + } else { + onetimeScheduleForm.selectedFacilities = null; + } + return "facilitylist.jsp"; + } + private void loadEventSchedule() { EventSchedule eventSchedule = onetimeScheduleService.getEventSchedule( @@ -365,6 +423,19 @@ .getSelectedUserList(onetimeScheduleForm.selectedUsers); } + public List<Facility> getAvailableFacilityItems() { + return facilityService.getAvailableFacilityList( + onetimeScheduleForm.selectedFacilities, null); + } + + public List<Facility> getSelectedFacilityItems() { + if (onetimeScheduleForm.selectedFacilities == null) { + return null; + } + return facilityService + .getSelectedFacilityList(onetimeScheduleForm.selectedFacilities); + } + /** * @return the request */ @@ -429,4 +500,12 @@ this.onetimeScheduleDxo = onetimeScheduleDxo; } + public FacilityService getFacilityService() { + return facilityService; + } + + public void setFacilityService(FacilityService facilityService) { + this.facilityService = facilityService; + } + } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/admin/schedule/RepeatScheduleAction.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/admin/schedule/RepeatScheduleAction.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/admin/schedule/RepeatScheduleAction.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -11,10 +11,12 @@ import jp.sf.pal.scheduler.common.util.ConfigUtil; import jp.sf.pal.scheduler.common.util.SAStrutsUtil; import jp.sf.pal.scheduler.db.exentity.EventSchedule; +import jp.sf.pal.scheduler.db.exentity.Facility; import jp.sf.pal.scheduler.db.exentity.UserInfo; import jp.sf.pal.scheduler.dxo.RepeatScheduleDxo; import jp.sf.pal.scheduler.form.admin.schedule.RepeatScheduleForm; import jp.sf.pal.scheduler.pager.RepeatSchedulePager; +import jp.sf.pal.scheduler.service.FacilityService; import jp.sf.pal.scheduler.service.RepeatScheduleService; import jp.sf.pal.scheduler.service.UserInfoService; @@ -44,6 +46,8 @@ private UserInfoService userInfoService; + private FacilityService facilityService; + private RepeatSchedulePager repeatSchedulePager; private PagerDxo pagerDxo; @@ -311,6 +315,60 @@ return "userlist.jsp"; } + @Execute(validator = false, input = "error.jsp") + public String selectfacilities() { + return "facilitylist.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String setfacilities() { + return "edit.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String addfacilities() { + List<String> facilityList = new ArrayList<String>(); + if (repeatScheduleForm.selectedFacilities != null) { + for (String facilityId : repeatScheduleForm.selectedFacilities) { + facilityList.add(facilityId); + } + } + if (repeatScheduleForm.addedFacilities != null) { + for (String facilityId : repeatScheduleForm.addedFacilities) { + facilityList.add(facilityId); + } + } + if (!facilityList.isEmpty()) { + repeatScheduleForm.selectedFacilities = facilityList + .toArray(new String[0]); + } else { + repeatScheduleForm.selectedFacilities = null; + } + return "facilitylist.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String removefacilities() { + List<String> facilityList = new ArrayList<String>(); + if (repeatScheduleForm.selectedFacilities != null) { + for (String facilityId : repeatScheduleForm.selectedFacilities) { + facilityList.add(facilityId); + } + } + if (repeatScheduleForm.removedFacilities != null) { + for (String facilityId : repeatScheduleForm.removedFacilities) { + facilityList.remove(facilityId); + } + } + if (!facilityList.isEmpty()) { + repeatScheduleForm.selectedFacilities = facilityList + .toArray(new String[0]); + } else { + repeatScheduleForm.selectedFacilities = null; + } + return "facilitylist.jsp"; + } + private void loadEventSchedule() { EventSchedule eventSchedule = repeatScheduleService.getEventSchedule( @@ -365,6 +423,19 @@ .getSelectedUserList(repeatScheduleForm.selectedUsers); } + public List<Facility> getAvailableFacilityItems() { + return facilityService.getAvailableFacilityList( + repeatScheduleForm.selectedFacilities, null); + } + + public List<Facility> getSelectedFacilityItems() { + if (repeatScheduleForm.selectedFacilities == null) { + return null; + } + return facilityService + .getSelectedFacilityList(repeatScheduleForm.selectedFacilities); + } + /** * @return the request */ @@ -428,4 +499,12 @@ this.repeatScheduleDxo = repeatScheduleDxo; } + public FacilityService getFacilityService() { + return facilityService; + } + + public void setFacilityService(FacilityService facilityService) { + this.facilityService = facilityService; + } + } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/OnetimeScheduleAction.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/OnetimeScheduleAction.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/OnetimeScheduleAction.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -15,10 +15,14 @@ import jp.sf.pal.scheduler.common.util.ConfigUtil; import jp.sf.pal.scheduler.common.util.SAStrutsUtil; import jp.sf.pal.scheduler.db.exentity.EventSchedule; +import jp.sf.pal.scheduler.db.exentity.Facility; +import jp.sf.pal.scheduler.db.exentity.FacilityGroup; import jp.sf.pal.scheduler.db.exentity.UserInfo; import jp.sf.pal.scheduler.dxo.OnetimeScheduleDxo; import jp.sf.pal.scheduler.form.user.schedule.OnetimeScheduleForm; import jp.sf.pal.scheduler.pager.OnetimeSchedulePager; +import jp.sf.pal.scheduler.service.FacilityGroupService; +import jp.sf.pal.scheduler.service.FacilityService; import jp.sf.pal.scheduler.service.OnetimeScheduleService; import jp.sf.pal.scheduler.service.UserInfoService; @@ -48,6 +52,10 @@ private UserInfoService userInfoService; + private FacilityService facilityService; + + private FacilityGroupService facilityGroupService; + private OnetimeSchedulePager onetimeSchedulePager; private PagerDxo pagerDxo; @@ -290,6 +298,7 @@ @Execute(validator = false, input = "error.jsp") public String selectusers() { if (onetimeScheduleForm.userGroup == null) { + // TODO String userId = request.getRemoteUser(); List<Map<String, String>> userGroupList = userInfoService .getUserGroupList(userId); @@ -304,6 +313,7 @@ @Execute(validator = true, input = "error.jsp") public String changeusergroup() { if (onetimeScheduleForm.userGroup == null) { + // TODO String userId = request.getRemoteUser(); List<Map<String, String>> userGroupList = userInfoService .getUserGroupList(userId); @@ -362,6 +372,83 @@ return "userlist.jsp"; } + @Execute(validator = false, input = "error.jsp") + public String selectfacilities() { + if (onetimeScheduleForm.facilityGroupId == null) { + // TODO + List<FacilityGroup> facilityGroupList = facilityGroupService + .getFacilityGroupList(); + if (!facilityGroupList.isEmpty()) { + onetimeScheduleForm.facilityGroupId = facilityGroupList.get(0) + .getId().toString(); + } + } + return "facilitylist.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String changefacilitygroup() { + if (onetimeScheduleForm.facilityGroupId == null) { + // TODO + List<FacilityGroup> facilityGroupList = facilityGroupService + .getFacilityGroupList(); + if (!facilityGroupList.isEmpty()) { + onetimeScheduleForm.facilityGroupId = facilityGroupList.get(0) + .getId().toString(); + } + } + return "facilitylist.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String setfacilities() { + return "edit.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String addfacilities() { + List<String> facilityList = new ArrayList<String>(); + if (onetimeScheduleForm.selectedFacilities != null) { + for (String facilityId : onetimeScheduleForm.selectedFacilities) { + facilityList.add(facilityId); + } + } + if (onetimeScheduleForm.addedFacilities != null) { + for (String facilityId : onetimeScheduleForm.addedFacilities) { + facilityList.add(facilityId); + } + } + if (!facilityList.isEmpty()) { + onetimeScheduleForm.selectedFacilities = facilityList + .toArray(new String[0]); + } else { + onetimeScheduleForm.selectedFacilities = null; + } + return "facilitylist.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String removefacilities() { + List<String> facilityList = new ArrayList<String>(); + if (onetimeScheduleForm.selectedFacilities != null) { + for (String facilityId : onetimeScheduleForm.selectedFacilities) { + facilityList.add(facilityId); + } + } + if (onetimeScheduleForm.removedFacilities != null) { + for (String facilityId : onetimeScheduleForm.removedFacilities) { + facilityList.remove(facilityId); + } + } + if (!facilityList.isEmpty()) { + onetimeScheduleForm.selectedFacilities = facilityList + .toArray(new String[0]); + } else { + onetimeScheduleForm.selectedFacilities = null; + } + return "facilitylist.jsp"; + } + private void loadEventSchedule() { EventSchedule eventSchedule = onetimeScheduleService.getEventSchedule( @@ -437,6 +524,28 @@ .getSelectedUserList(onetimeScheduleForm.selectedUsers); } + public List<FacilityGroup> getFacilityGroupItems() { + return facilityGroupService.getFacilityGroupList(); + } + + public List<Facility> getAvailableFacilityItems() { + Integer facilityGroupId = null; + if (onetimeScheduleForm.facilityGroupId != null) { + facilityGroupId = Integer + .parseInt(onetimeScheduleForm.facilityGroupId); + } + return facilityService.getAvailableFacilityList( + onetimeScheduleForm.selectedFacilities, facilityGroupId); + } + + public List<Facility> getSelectedFacilityItems() { + if (onetimeScheduleForm.selectedFacilities == null) { + return null; + } + return facilityService + .getSelectedFacilityList(onetimeScheduleForm.selectedFacilities); + } + public List<String> getYearItems() { int year = CalendarUtil.getYear(CalendarUtil.getToday()); List<String> items = new ArrayList<String>(); @@ -562,4 +671,21 @@ this.onetimeScheduleDxo = onetimeScheduleDxo; } + public FacilityService getFacilityService() { + return facilityService; + } + + public void setFacilityService(FacilityService facilityService) { + this.facilityService = facilityService; + } + + public FacilityGroupService getFacilityGroupService() { + return facilityGroupService; + } + + public void setFacilityGroupService( + FacilityGroupService facilityGroupService) { + this.facilityGroupService = facilityGroupService; + } + } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/RepeatScheduleAction.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/RepeatScheduleAction.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/RepeatScheduleAction.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -15,10 +15,14 @@ import jp.sf.pal.scheduler.common.util.ConfigUtil; import jp.sf.pal.scheduler.common.util.SAStrutsUtil; import jp.sf.pal.scheduler.db.exentity.EventSchedule; +import jp.sf.pal.scheduler.db.exentity.Facility; +import jp.sf.pal.scheduler.db.exentity.FacilityGroup; import jp.sf.pal.scheduler.db.exentity.UserInfo; import jp.sf.pal.scheduler.dxo.RepeatScheduleDxo; import jp.sf.pal.scheduler.form.user.schedule.RepeatScheduleForm; import jp.sf.pal.scheduler.pager.RepeatSchedulePager; +import jp.sf.pal.scheduler.service.FacilityGroupService; +import jp.sf.pal.scheduler.service.FacilityService; import jp.sf.pal.scheduler.service.RepeatScheduleService; import jp.sf.pal.scheduler.service.UserInfoService; @@ -48,6 +52,10 @@ private UserInfoService userInfoService; + private FacilityService facilityService; + + private FacilityGroupService facilityGroupService; + private RepeatSchedulePager repeatSchedulePager; private PagerDxo pagerDxo; @@ -361,6 +369,83 @@ return "userlist.jsp"; } + @Execute(validator = false, input = "error.jsp") + public String selectfacilities() { + if (repeatScheduleForm.facilityGroupId == null) { + // TODO + List<FacilityGroup> facilityGroupList = facilityGroupService + .getFacilityGroupList(); + if (!facilityGroupList.isEmpty()) { + repeatScheduleForm.facilityGroupId = facilityGroupList.get(0) + .getId().toString(); + } + } + return "facilitylist.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String changefacilitygroup() { + if (repeatScheduleForm.facilityGroupId == null) { + // TODO + List<FacilityGroup> facilityGroupList = facilityGroupService + .getFacilityGroupList(); + if (!facilityGroupList.isEmpty()) { + repeatScheduleForm.facilityGroupId = facilityGroupList.get(0) + .getId().toString(); + } + } + return "facilitylist.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String setfacilities() { + return "edit.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String addfacilities() { + List<String> facilityList = new ArrayList<String>(); + if (repeatScheduleForm.selectedFacilities != null) { + for (String facilityId : repeatScheduleForm.selectedFacilities) { + facilityList.add(facilityId); + } + } + if (repeatScheduleForm.addedFacilities != null) { + for (String facilityId : repeatScheduleForm.addedFacilities) { + facilityList.add(facilityId); + } + } + if (!facilityList.isEmpty()) { + repeatScheduleForm.selectedFacilities = facilityList + .toArray(new String[0]); + } else { + repeatScheduleForm.selectedFacilities = null; + } + return "facilitylist.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String removefacilities() { + List<String> facilityList = new ArrayList<String>(); + if (repeatScheduleForm.selectedFacilities != null) { + for (String facilityId : repeatScheduleForm.selectedFacilities) { + facilityList.add(facilityId); + } + } + if (repeatScheduleForm.removedFacilities != null) { + for (String facilityId : repeatScheduleForm.removedFacilities) { + facilityList.remove(facilityId); + } + } + if (!facilityList.isEmpty()) { + repeatScheduleForm.selectedFacilities = facilityList + .toArray(new String[0]); + } else { + repeatScheduleForm.selectedFacilities = null; + } + return "facilitylist.jsp"; + } + private void loadEventSchedule() { EventSchedule eventSchedule = repeatScheduleService.getEventSchedule( @@ -436,6 +521,28 @@ .getSelectedUserList(repeatScheduleForm.selectedUsers); } + public List<FacilityGroup> getFacilityGroupItems() { + return facilityGroupService.getFacilityGroupList(); + } + + public List<Facility> getAvailableFacilityItems() { + Integer facilityGroupId = null; + if (repeatScheduleForm.facilityGroupId != null) { + facilityGroupId = Integer + .parseInt(repeatScheduleForm.facilityGroupId); + } + return facilityService.getAvailableFacilityList( + repeatScheduleForm.selectedFacilities, facilityGroupId); + } + + public List<Facility> getSelectedFacilityItems() { + if (repeatScheduleForm.selectedFacilities == null) { + return null; + } + return facilityService + .getSelectedFacilityList(repeatScheduleForm.selectedFacilities); + } + public List<String> getYearItems() { int year = CalendarUtil.getYear(CalendarUtil.getToday()); List<String> items = new ArrayList<String>(); @@ -560,4 +667,21 @@ this.repeatScheduleDxo = repeatScheduleDxo; } + public FacilityService getFacilityService() { + return facilityService; + } + + public void setFacilityService(FacilityService facilityService) { + this.facilityService = facilityService; + } + + public FacilityGroupService getFacilityGroupService() { + return facilityGroupService; + } + + public void setFacilityGroupService( + FacilityGroupService facilityGroupService) { + this.facilityGroupService = facilityGroupService; + } + } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/EventSchedule.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/EventSchedule.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/EventSchedule.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -72,4 +72,44 @@ } } } + + public String[] getSelectedFacilities() { + if (getFacilityScheduleMappingList() != null + && !getFacilityScheduleMappingList().isEmpty()) { + List<String> list = new ArrayList<String>(); + for (FacilityScheduleMapping fsm : getFacilityScheduleMappingList()) { + list.add(fsm.getFacilityId().toString()); + } + return list.toArray(new String[0]); + } + return null; + } + + public void setSelectedFacilities(String[] facilities) { + if (facilities != null && getFacilityScheduleMappingList() != null) { + List<String> facilityList = new LinkedList<String>(); + for (String facilityId : facilities) { + facilityList.add(facilityId); + } + for (FacilityScheduleMapping ssm : getFacilityScheduleMappingList()) { + boolean delete = true; + for (String facilityId : facilityList) { + if (ssm.getFacilityId().intValue() == Integer + .parseInt(facilityId)) { + delete = false; + facilityList.remove(facilityId); + break; + } + } + if (delete) { + ssm.setDelete(true); + } + } + for (String facilityId : facilityList) { + FacilityScheduleMapping ssm = new FacilityScheduleMapping(); + ssm.setFacilityId(new Integer(facilityId)); + getFacilityScheduleMappingList().add(ssm); + } + } + } } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/FacilityScheduleMapping.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/FacilityScheduleMapping.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/FacilityScheduleMapping.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -15,4 +15,14 @@ /** Serial version UID. (Default) */ private static final long serialVersionUID = 1L; + + private boolean delete = false; + + public boolean isDelete() { + return delete; + } + + public void setDelete(boolean delete) { + this.delete = delete; + } } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/dxo/OnetimeScheduleDxo.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/dxo/OnetimeScheduleDxo.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/dxo/OnetimeScheduleDxo.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -32,6 +32,7 @@ // + ", versionno : versionno" // + ", content : content" // + ", selectedUsers : selectedUsers" // + + ", selectedFacilities : selectedFacilities" // ) public void convertFromEventScheduleToForm(EventSchedule eventSchedule, OnetimeScheduleForm form); @@ -56,6 +57,7 @@ // + ", versionno : versionno" // + ", content : content" // + ", selectedUsers : selectedUsers" // + + ", selectedFacilities : selectedFacilities" // ) public void convertFromFormToEventSchedule(OnetimeScheduleForm form, EventSchedule eventSchedule); @@ -80,6 +82,7 @@ // + ", versionno : versionno" // + ", content : content" // + ", selectedUsers : selectedUsers" // + + ", selectedFacilities : selectedFacilities" // ) public void convertFromEventScheduleToForm(EventSchedule eventSchedule, jp.sf.pal.scheduler.form.user.schedule.OnetimeScheduleForm form); @@ -104,6 +107,7 @@ // + ", versionno : versionno" // + ", content : content" // + ", selectedUsers : selectedUsers" // + + ", selectedFacilities : selectedFacilities" // ) public void convertFromFormToEventSchedule( jp.sf.pal.scheduler.form.user.schedule.OnetimeScheduleForm form, Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/dxo/RepeatScheduleDxo.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/dxo/RepeatScheduleDxo.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/dxo/RepeatScheduleDxo.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -32,6 +32,7 @@ // + ", versionno : versionno" // + ", content : content" // + ", selectedUsers : selectedUsers" // + + ", selectedFacilities : selectedFacilities" // ) public void convertFromEventScheduleToForm(EventSchedule eventSchedule, RepeatScheduleForm form); @@ -56,6 +57,7 @@ // + ", versionno : versionno" // + ", content : content" // + ", selectedUsers : selectedUsers" // + + ", selectedFacilities : selectedFacilities" // ) public void convertFromFormToEventSchedule(RepeatScheduleForm form, EventSchedule eventSchedule); @@ -80,6 +82,7 @@ // + ", versionno : versionno" // + ", content : content" // + ", selectedUsers : selectedUsers" // + + ", selectedFacilities : selectedFacilities" // ) public void convertFromEventScheduleToForm(EventSchedule eventSchedule, jp.sf.pal.scheduler.form.user.schedule.RepeatScheduleForm form); @@ -104,6 +107,7 @@ // + ", versionno : versionno" // + ", content : content" // + ", selectedUsers : selectedUsers" // + + ", selectedFacilities : selectedFacilities" // ) public void convertFromFormToEventSchedule( jp.sf.pal.scheduler.form.user.schedule.RepeatScheduleForm form, Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/admin/schedule/OnetimeScheduleForm.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/admin/schedule/OnetimeScheduleForm.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/admin/schedule/OnetimeScheduleForm.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -71,6 +71,12 @@ public String[] selectedUsers; + public String[] addedFacilities; + + public String[] removedFacilities; + + public String[] selectedFacilities; + @IntegerType public String pageNumber; @@ -93,5 +99,8 @@ removedUsers = null; selectedUsers = null; secret = "F"; + addedFacilities = null; + removedFacilities = null; + selectedFacilities = null; } } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/admin/schedule/RepeatScheduleForm.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/admin/schedule/RepeatScheduleForm.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/admin/schedule/RepeatScheduleForm.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -74,6 +74,12 @@ public String[] selectedUsers; + public String[] addedFacilities; + + public String[] removedFacilities; + + public String[] selectedFacilities; + @IntegerType public String pageNumber; @@ -97,5 +103,8 @@ removedUsers = null; selectedUsers = null; secret = "F"; + addedFacilities = null; + removedFacilities = null; + selectedFacilities = null; } } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/OnetimeScheduleForm.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/OnetimeScheduleForm.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/OnetimeScheduleForm.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -118,7 +118,17 @@ @Required(target = "changeusergroup") public String userGroup; + public String[] addedFacilities; + + public String[] removedFacilities; + + public String[] selectedFacilities; + + @Required(target = "changefacilitygroup") @IntegerType + public String facilityGroupId; + + @IntegerType public String pageNumber; public void initialize() { @@ -163,6 +173,10 @@ selectedUsers = null; secret = "F"; userGroup = null; + addedFacilities = null; + removedFacilities = null; + selectedFacilities = null; + facilityGroupId = null; } public String getStartDate() { Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/RepeatScheduleForm.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/RepeatScheduleForm.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/RepeatScheduleForm.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -118,7 +118,17 @@ @Required(target = "changeusergroup") public String userGroup; + public String[] addedFacilities; + + public String[] removedFacilities; + + public String[] selectedFacilities; + + @Required(target = "changefacilitygroup") @IntegerType + public String facilityGroupId; + + @IntegerType public String pageNumber; public void initialize() { @@ -164,6 +174,10 @@ selectedUsers = null; secret = "F"; userGroup = null; + addedFacilities = null; + removedFacilities = null; + selectedFacilities = null; + facilityGroupId = null; } public String getStartDate() { Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/FacilityService.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/FacilityService.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/FacilityService.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -2,6 +2,7 @@ import java.io.Serializable; import java.sql.Timestamp; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -181,6 +182,45 @@ // TODO } + public List<Facility> getAvailableFacilityList(String[] selectedFacilities, + Integer facilityGroupId) { + FacilityCB cb = new FacilityCB(); + + // setup + + if (facilityGroupId != null) { + cb.query().setGroupId_Equal(facilityGroupId); + } + if (selectedFacilities != null) { + List<Integer> excludedFacilityIdList = new ArrayList<Integer>(); + for (String id : selectedFacilities) { + excludedFacilityIdList.add(Integer.parseInt(id)); + } + cb.query().setId_NotInScope(excludedFacilityIdList); + } + return facilityBhv.selectList(cb); + + } + + public List<Facility> getSelectedFacilityList(String[] selectedFacilities) { + FacilityCB cb = new FacilityCB(); + + // setup + + if (selectedFacilities != null) { + List<Integer> facilityIdList = new ArrayList<Integer>( + selectedFacilities.length); + for (String facilityId : selectedFacilities) { + facilityIdList.add(Integer.parseInt(facilityId)); + } + cb.query().setId_InScope(facilityIdList); + } + + cb.query().addOrderBy_SortOrder_Asc(); + + return facilityBhv.selectList(cb); + } + public FacilityBhv getFacilityBhv() { return facilityBhv; } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/OnetimeScheduleService.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/OnetimeScheduleService.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/OnetimeScheduleService.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -11,12 +11,15 @@ import jp.sf.pal.scheduler.db.allcommon.cbean.PagingResultBean; import jp.sf.pal.scheduler.db.cbean.EventScheduleCB; import jp.sf.pal.scheduler.db.cbean.EventScheduleMappingCB; +import jp.sf.pal.scheduler.db.cbean.FacilityScheduleMappingCB; import jp.sf.pal.scheduler.db.exbhv.EventScheduleBhv; import jp.sf.pal.scheduler.db.exbhv.EventScheduleContentBhv; import jp.sf.pal.scheduler.db.exbhv.EventScheduleMappingBhv; +import jp.sf.pal.scheduler.db.exbhv.FacilityScheduleMappingBhv; import jp.sf.pal.scheduler.db.exentity.EventSchedule; import jp.sf.pal.scheduler.db.exentity.EventScheduleContent; import jp.sf.pal.scheduler.db.exentity.EventScheduleMapping; +import jp.sf.pal.scheduler.db.exentity.FacilityScheduleMapping; import jp.sf.pal.scheduler.pager.OnetimeSchedulePager; import org.seasar.framework.container.hotdeploy.HotdeployUtil; @@ -31,6 +34,8 @@ private transient EventScheduleMappingBhv eventScheduleMappingBhv; + private transient FacilityScheduleMappingBhv facilityScheduleMappingBhv; + private PagerDxo pagerDxo; public List<EventScheduleMapping> getPersonalScheduleMappingList( @@ -100,6 +105,12 @@ cb2.query().setScheduleId_Equal(id); eventSchedule.setEventScheduleMappingList(eventScheduleMappingBhv .selectList(cb2)); + + FacilityScheduleMappingCB cb3 = new FacilityScheduleMappingCB(); + cb3.query().setScheduleId_Equal(id); + eventSchedule.setFacilityScheduleMappingList(facilityScheduleMappingBhv + .selectList(cb3)); + return eventSchedule; } @@ -146,6 +157,21 @@ } } } + + List<FacilityScheduleMapping> fsmList = eventSchedule + .getFacilityScheduleMappingList(); + if (fsmList != null) { + for (FacilityScheduleMapping ssm : fsmList) { + if (ssm.isDelete()) { + // delete + facilityScheduleMappingBhv.delete(ssm); + } else if (ssm.getId() == null) { + // create + ssm.setScheduleId(eventSchedule.getId()); + facilityScheduleMappingBhv.insert(ssm); + } + } + } } public void disable(Long id, String name) { @@ -197,4 +223,13 @@ this.eventScheduleContentBhv = eventScheduleContentBhv; } + public FacilityScheduleMappingBhv getFacilityScheduleMappingBhv() { + return facilityScheduleMappingBhv; + } + + public void setFacilityScheduleMappingBhv( + FacilityScheduleMappingBhv facilityScheduleMappingBhv) { + this.facilityScheduleMappingBhv = facilityScheduleMappingBhv; + } + } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/RepeatScheduleService.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/RepeatScheduleService.java 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/RepeatScheduleService.java 2008-11-21 02:12:54 UTC (rev 1389) @@ -12,12 +12,15 @@ import jp.sf.pal.scheduler.db.allcommon.cbean.UnionQuery; import jp.sf.pal.scheduler.db.cbean.EventScheduleCB; import jp.sf.pal.scheduler.db.cbean.EventScheduleMappingCB; +import jp.sf.pal.scheduler.db.cbean.FacilityScheduleMappingCB; import jp.sf.pal.scheduler.db.exbhv.EventScheduleBhv; import jp.sf.pal.scheduler.db.exbhv.EventScheduleContentBhv; import jp.sf.pal.scheduler.db.exbhv.EventScheduleMappingBhv; +import jp.sf.pal.scheduler.db.exbhv.FacilityScheduleMappingBhv; import jp.sf.pal.scheduler.db.exentity.EventSchedule; import jp.sf.pal.scheduler.db.exentity.EventScheduleContent; import jp.sf.pal.scheduler.db.exentity.EventScheduleMapping; +import jp.sf.pal.scheduler.db.exentity.FacilityScheduleMapping; import jp.sf.pal.scheduler.pager.RepeatSchedulePager; import org.seasar.framework.container.hotdeploy.HotdeployUtil; @@ -32,6 +35,8 @@ private transient EventScheduleMappingBhv eventScheduleMappingBhv; + private transient FacilityScheduleMappingBhv facilityScheduleMappingBhv; + private PagerDxo pagerDxo; public List<EventScheduleMapping> getPersonalScheduleMappingList( @@ -112,6 +117,12 @@ cb2.query().setScheduleId_Equal(id); eventSchedule.setEventScheduleMappingList(eventScheduleMappingBhv .selectList(cb2)); + + FacilityScheduleMappingCB cb3 = new FacilityScheduleMappingCB(); + cb3.query().setScheduleId_Equal(id); + eventSchedule.setFacilityScheduleMappingList(facilityScheduleMappingBhv + .selectList(cb3)); + return eventSchedule; } @@ -157,6 +168,21 @@ } } } + + List<FacilityScheduleMapping> fsmList = eventSchedule + .getFacilityScheduleMappingList(); + if (fsmList != null) { + for (FacilityScheduleMapping ssm : fsmList) { + if (ssm.isDelete()) { + // delete + facilityScheduleMappingBhv.delete(ssm); + } else if (ssm.getId() == null) { + // create + ssm.setScheduleId(eventSchedule.getId()); + facilityScheduleMappingBhv.insert(ssm); + } + } + } } public void disable(Long id, String name) { @@ -208,4 +234,13 @@ this.eventScheduleContentBhv = eventScheduleContentBhv; } + public FacilityScheduleMappingBhv getFacilityScheduleMappingBhv() { + return facilityScheduleMappingBhv; + } + + public void setFacilityScheduleMappingBhv( + FacilityScheduleMappingBhv facilityScheduleMappingBhv) { + this.facilityScheduleMappingBhv = facilityScheduleMappingBhv; + } + } Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/confirm.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/confirm.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/confirm.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -84,6 +84,28 @@ </html:select> </td> </tr> + <tr> + <th>Facilities</th> + <td> +<table> + <tbody> + <tr> + <th style="width:200px;">Name</th> + </tr> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <tr> + <td>${f:h(f.name)}</td> + </tr> + </c:forEach> + </tbody> +</table> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> </tbody> <tfoot> <tr> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/edit.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/edit.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/edit.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -92,6 +92,35 @@ </html:select> </td> </tr> + <tr> + <th>Facilities</th> + <td> +<table> + <tbody> + <tr> + <th style="width:200px;">Name</th> + </tr> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <tr> + <td>${f:h(f.name)}</td> + </tr> + </c:forEach> + </tbody> + <tfoot> + <tr> + <td> +<input type="submit" name="selectfacilities" value="Select Facilities"/> + </td> + </tr> + </tfoot> +</table> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> </tbody> <tfoot> <tr> Added: scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/facilitylist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/facilitylist.jsp (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/facilitylist.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -0,0 +1,103 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<title></title> +</head> +<body> +<div style="padding:3px;"> +<!-- tab: BEGIN --> +<div class="tab-nav"> + <ul> + <li class="first"></li> + <li class="selected"><span>One time</span></li> + <li class="spacer"></li> + <li class="selectable"><s:link href="/admin/schedule/repeatSchedule/" style="text-decoration: none;">Repeats</s:link></li> + <li class="last"></li> + </ul> +</div> +<!-- tab: END --> + +<div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> + +<s:form> +<div style="margin-top:3px;"> +<html:hidden property="id"/> +<html:hidden property="mode"/> +<html:hidden property="title"/> +<html:hidden property="location"/> +<html:hidden property="startDate"/> +<html:hidden property="startTime"/> +<html:hidden property="endDate"/> +<html:hidden property="endTime"/> +<html:hidden property="content"/> +<html:select property="selectedUsers" multiple="true" style="display:none;"> + <c:forEach var="u" varStatus="s" items="${selectedUserItems}"> + <html:option value="${f:u(u.userId)}">${f:u(u.userId)}</html:option> + </c:forEach> +</html:select> +<div class="form-table" style="float:left;width: 200px;"> +<table> + <thead> + <tr> + <th>Facility List</th> + </tr> + </thead> + <tbody> + <tr> + <td> +<html:select property="addedFacilities" multiple="true" size="10" style="width:180px;"> +<!-- TODO i18n --> + <c:forEach var="f" varStatus="s" items="${availableFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:h(f.name)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> + </tbody> +</table> +</div> +<div style="float:left;width: 100px;height: 200px;text-align: center;padding-top:60px;"> +<input type="submit" name="addfacilities" value="Add >>"/> +<input type="submit" name="removefacilities" value="<< Remove"/> +</div> +<div class="form-table" style="float:left;width: 200px;"> +<table> + <thead> + <tr> + <th>Selected Facility List</th> + </tr> + </thead> + <tbody> + <tr> + <td> +<html:select property="removedFacilities" multiple="true" size="10" style="width:180px;"> +<!-- TODO i18n --> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:h(f.name)}</html:option> + </c:forEach> +</html:select> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> + </tbody> + <tfoot> + <tr> + <td> +<input type="submit" name="setfacilities" value="OK"/> + </td> + </tr> + </tfoot> +</table> +</div> +</div> +</s:form> + +</div> + +</body> +</html> Property changes on: scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/facilitylist.jsp ___________________________________________________________________ Name: svn:eol-style + native Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/userlist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/userlist.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/onetimeSchedule/userlist.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -31,6 +31,11 @@ <html:hidden property="endDate"/> <html:hidden property="endTime"/> <html:hidden property="content"/> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> <div class="form-table" style="float:left;width: 200px;"> <table> <thead> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/confirm.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/confirm.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/confirm.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -97,6 +97,28 @@ </html:select> </td> </tr> + <tr> + <th>Facilities</th> + <td> +<table> + <tbody> + <tr> + <th style="width:200px;">Name</th> + </tr> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <tr> + <td>${f:h(f.name)}</td> + </tr> + </c:forEach> + </tbody> +</table> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> </tbody> <tfoot> <tr> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/edit.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/edit.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/edit.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -106,6 +106,35 @@ </html:select> </td> </tr> + <tr> + <th>Facilities</th> + <td> +<table> + <tbody> + <tr> + <th style="width:200px;">Name</th> + </tr> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <tr> + <td>${f:h(f.name)}</td> + </tr> + </c:forEach> + </tbody> + <tfoot> + <tr> + <td> +<input type="submit" name="selectfacilities" value="Select Facilities"/> + </td> + </tr> + </tfoot> +</table> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> </tbody> <tfoot> <tr> Added: scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/facilitylist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/facilitylist.jsp (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/facilitylist.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -0,0 +1,103 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<title></title> +</head> +<body> +<div style="padding:3px;"> +<!-- tab: BEGIN --> +<div class="tab-nav"> + <ul> + <li class="first"></li> + <li class="selectable"><s:link href="/admin/schedule/onetimeSchedule/" style="text-decoration: none;">One Time</s:link></li> + <li class="spacer"></li> + <li class="selected"><span>Repeats</span></li> + <li class="last"></li> + </ul> +</div> +<!-- tab: END --> + +<div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> + +<s:form> +<div style="margin-top:3px;"> +<html:hidden property="id"/> +<html:hidden property="mode"/> +<html:hidden property="title"/> +<html:hidden property="location"/> +<html:hidden property="startDate"/> +<html:hidden property="startTime"/> +<html:hidden property="endDate"/> +<html:hidden property="endTime"/> +<html:hidden property="content"/> +<html:select property="selectedUsers" multiple="true" style="display:none;"> + <c:forEach var="u" varStatus="s" items="${selectedUserItems}"> + <html:option value="${f:u(u.userId)}">${f:u(u.userId)}</html:option> + </c:forEach> +</html:select> +<div class="form-table" style="float:left;width: 200px;"> +<table> + <thead> + <tr> + <th>Facility List</th> + </tr> + </thead> + <tbody> + <tr> + <td> +<html:select property="addedFacilities" multiple="true" size="10" style="width:180px;"> +<!-- TODO i18n --> + <c:forEach var="f" varStatus="s" items="${availableFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:h(f.name)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> + </tbody> +</table> +</div> +<div style="float:left;width: 100px;height: 200px;text-align: center;padding-top:60px;"> +<input type="submit" name="addfacilities" value="Add >>"/> +<input type="submit" name="removefacilities" value="<< Remove"/> +</div> +<div class="form-table" style="float:left;width: 200px;"> +<table> + <thead> + <tr> + <th>Selected Facility List</th> + </tr> + </thead> + <tbody> + <tr> + <td> +<html:select property="removedFacilities" multiple="true" size="10" style="width:180px;"> +<!-- TODO i18n --> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:h(f.name)}</html:option> + </c:forEach> +</html:select> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> + </tbody> + <tfoot> + <tr> + <td> +<input type="submit" name="setfacilities" value="OK"/> + </td> + </tr> + </tfoot> +</table> +</div> +</div> +</s:form> + +</div> + +</body> +</html> Property changes on: scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/facilitylist.jsp ___________________________________________________________________ Name: svn:eol-style + native Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/userlist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/userlist.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/admin/schedule/repeatSchedule/userlist.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -32,6 +32,11 @@ <html:hidden property="endTime"/> <html:hidden property="content"/> <html:hidden property="type"/> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> <div class="form-table" style="float:left;width: 200px;"> <table> <thead> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/confirm.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/confirm.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/confirm.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -92,6 +92,28 @@ </html:select> </td> </tr> + <tr> + <th>Facilities</th> + <td> +<table> + <tbody> + <tr> + <th style="width:200px;">Name</th> + </tr> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <tr> + <td>${f:h(f.name)}</td> + </tr> + </c:forEach> + </tbody> +</table> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(u.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> </tbody> <tfoot> <tr> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/edit.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/edit.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/edit.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -166,6 +166,35 @@ </html:select> </td> </tr> + <tr> + <th>Facilities</th> + <td> +<table> + <tbody> + <tr> + <th style="width:200px;">Name</th> + </tr> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <tr> + <td>${f:h(f.name)}</td> + </tr> + </c:forEach> + </tbody> + <tfoot> + <tr> + <td> +<input type="submit" name="selectfacilities" value="Select Facilities"/> + </td> + </tr> + </tfoot> +</table> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> </tbody> <tfoot> <tr> Added: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/facilitylist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/facilitylist.jsp (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/facilitylist.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -0,0 +1,133 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<title></title> +</head> +<body> +<div style="padding:3px;"> +<!-- tab: BEGIN --> +<div class="tab-nav"> + <ul> + <li class="first"></li> + <li class="selectable"><s:link href="/facility/schedule/calendar/${returnType}/${year}/${month}/${date}" style="text-decoration: none;">Calendar</s:link></li> + <li class="spacer"></li> + <li class="selected"><span>One time</span></li> +<c:if test="${mode==1}"> + <li class="spacer"></li> + <li class="selectable"><s:link href="/facility/schedule/repeatSchedule/createpage/selectpersonalmonth/${year}/${month}/${date}" style="text-decoration: none;">Repeats</s:link></li> +</c:if> + <li class="last"></li> + </ul> +</div> +<!-- tab: END --> + +<div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> + +<s:form> +<div style="margin-top:3px;"> + <html:hidden property="returnType"/> +<html:hidden property="year"/> +<html:hidden property="month"/> +<html:hidden property="date"/> +<html:hidden property="id"/> +<html:hidden property="mode"/> +<html:hidden property="title"/> +<html:hidden property="location"/> +<html:hidden property="startDate"/> +<html:hidden property="startTime"/> +<html:hidden property="endDate"/> +<html:hidden property="endTime"/> +<html:hidden property="content"/> +<html:select property="selectedUsers" multiple="true" style="display:none;"> + <c:forEach var="u" varStatus="s" items="${selectedUserItems}"> + <html:option value="${f:u(u.userId)}">${f:u(u.userId)}</html:option> + </c:forEach> +</html:select> +<div class="form-table" style="float:left;width: 200px;"> +<table style="margin-bottom: 5px;"> + <thead> + <tr> + <th>Facility Group</th> + </tr> + </thead> + <tbody> + <tr> + <td> +<html:select property="facilityGroupId" style="width:180px;"> + <c:forEach var="fg" varStatus="s" items="${facilityGroupItems}"> + <html:option value="${fg.id}">${f:h(fg.name)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> + <tr> + <td style="text-align: center;"> +<input type="submit" name="changefacilitygroup" value="Display"/> + </td> + </tr> + </tbody> +</table> +<table> + <thead> + <tr> + <th>Facility List</th> + </tr> + </thead> + <tbody> + <tr> + <td> +<html:select property="addedFacilities" multiple="true" size="8" style="width:180px;"> + <c:forEach var="f" varStatus="s" items="${availableFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:h(f.name)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> + </tbody> +</table> +</div> +<div style="float:left;width: 100px;text-align: center;padding-top:100px;"> +<input type="submit" name="addfacilities" value="Add >>"/> +<input type="submit" name="removefacilities" value="<< Remove"/> +</div> +<div class="form-table" style="float:left;width: 200px;"> +<table> + <thead> + <tr> + <th>Selected Facility List</th> + </tr> + </thead> + <tbody> + <tr> + <td> +<html:select property="removedFacilities" multiple="true" size="10" style="width:180px;"> +<!-- TODO i18n --> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:h(f.name)}</html:option> + </c:forEach> +</html:select> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> + </tbody> + <tfoot> + <tr> + <td> +<input type="submit" name="setfacilities" value="OK"/> + </td> + </tr> + </tfoot> +</table> +</div> +</div> +</s:form> + +</div> + +</body> +</html> Property changes on: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/facilitylist.jsp ___________________________________________________________________ Name: svn:eol-style + native Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/userlist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/userlist.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/userlist.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -39,6 +39,11 @@ <html:hidden property="endDate"/> <html:hidden property="endTime"/> <html:hidden property="content"/> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(u.id)}</html:option> + </c:forEach> +</html:select> <div class="form-table" style="float:left;width: 200px;"> <table style="margin-bottom: 5px;"> <thead> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/confirm.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/confirm.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/confirm.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -105,6 +105,28 @@ </html:select> </td> </tr> + <tr> + <th>Facilities</th> + <td> +<table> + <tbody> + <tr> + <th style="width:200px;">Name</th> + </tr> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <tr> + <td>${f:h(f.name)}</td> + </tr> + </c:forEach> + </tbody> +</table> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(u.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> </tbody> <tfoot> <tr> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/edit.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/edit.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/edit.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -183,6 +183,35 @@ </html:select> </td> </tr> + <tr> + <th>Facilities</th> + <td> +<table> + <tbody> + <tr> + <th style="width:200px;">Name</th> + </tr> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <tr> + <td>${f:h(f.name)}</td> + </tr> + </c:forEach> + </tbody> + <tfoot> + <tr> + <td> +<input type="submit" name="selectfacilities" value="Select Facilities"/> + </td> + </tr> + </tfoot> +</table> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> </tbody> <tfoot> <tr> Added: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/facilitylist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/facilitylist.jsp (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/facilitylist.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -0,0 +1,133 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<title></title> +</head> +<body> +<div style="padding:3px;"> +<!-- tab: BEGIN --> +<div class="tab-nav"> + <ul> + <li class="first"></li> + <li class="selectable"><s:link href="/user/schedule/calendar/${returnType}/${year}/${month}/${date}" style="text-decoration: none;">Calendar</s:link></li> +<c:if test="${mode==1}"> + <li class="spacer"></li> + <li class="selectable"><s:link href="/user/schedule/onetimeSchedule/createpage/${returnType}/${year}/${month}/${date}" style="text-decoration: none;">One Time</s:link></li> +</c:if> + <li class="spacer"></li> + <li class="selected"><span>Repeats</span></li> + <li class="last"></li> + </ul> +</div> +<!-- tab: END --> + +<div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> + +<s:form> +<div style="margin-top:3px;"> + <html:hidden property="returnType"/> +<html:hidden property="year"/> +<html:hidden property="month"/> +<html:hidden property="date"/> +<html:hidden property="id"/> +<html:hidden property="mode"/> +<html:hidden property="title"/> +<html:hidden property="location"/> +<html:hidden property="startDate"/> +<html:hidden property="startTime"/> +<html:hidden property="endDate"/> +<html:hidden property="endTime"/> +<html:hidden property="content"/> +<html:select property="selectedUsers" multiple="true" style="display:none;"> + <c:forEach var="u" varStatus="s" items="${selectedUserItems}"> + <html:option value="${f:u(u.userId)}">${f:u(u.userId)}</html:option> + </c:forEach> +</html:select> +<div class="form-table" style="float:left;width: 200px;"> +<table style="margin-bottom: 5px;"> + <thead> + <tr> + <th>Facility Group</th> + </tr> + </thead> + <tbody> + <tr> + <td> +<html:select property="facilityGroupId" style="width:180px;"> + <c:forEach var="fg" varStatus="s" items="${facilityGroupItems}"> + <html:option value="${fg.id}">${f:h(fg.name)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> + <tr> + <td style="text-align: center;"> +<input type="submit" name="changefacilitygroup" value="Display"/> + </td> + </tr> + </tbody> +</table> +<table> + <thead> + <tr> + <th>Facility List</th> + </tr> + </thead> + <tbody> + <tr> + <td> +<html:select property="addedFacilities" multiple="true" size="8" style="width:180px;"> + <c:forEach var="f" varStatus="s" items="${availableFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:h(f.name)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> + </tbody> +</table> +</div> +<div style="float:left;width: 100px;text-align: center;padding-top:100px;"> +<input type="submit" name="addfacilities" value="Add >>"/> +<input type="submit" name="removefacilities" value="<< Remove"/> +</div> +<div class="form-table" style="float:left;width: 200px;"> +<table> + <thead> + <tr> + <th>Selected Facility List</th> + </tr> + </thead> + <tbody> + <tr> + <td> +<html:select property="removedFacilities" multiple="true" size="10" style="width:180px;"> +<!-- TODO i18n --> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:h(f.name)}</html:option> + </c:forEach> +</html:select> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(f.id)}</html:option> + </c:forEach> +</html:select> + </td> + </tr> + </tbody> + <tfoot> + <tr> + <td> +<input type="submit" name="setfacilities" value="OK"/> + </td> + </tr> + </tfoot> +</table> +</div> +</div> +</s:form> + +</div> + +</body> +</html> Property changes on: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/facilitylist.jsp ___________________________________________________________________ Name: svn:eol-style + native Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/userlist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/userlist.jsp 2008-11-20 22:20:49 UTC (rev 1388) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/userlist.jsp 2008-11-21 02:12:54 UTC (rev 1389) @@ -40,6 +40,11 @@ <html:hidden property="endTime"/> <html:hidden property="content"/> <html:hidden property="type"/> +<html:select property="selectedFacilities" multiple="true" style="display:none;"> + <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> + <html:option value="${f:u(f.id)}">${f:u(u.id)}</html:option> + </c:forEach> +</html:select> <div class="form-table" style="float:left;width: 200px;"> <table style="margin-bottom: 5px;"> <thead>