svnno****@sourc*****
svnno****@sourc*****
2008年 11月 28日 (金) 22:36:14 JST
Revision: 1471 http://svn.sourceforge.jp/view?root=pal&view=rev&rev=1471 Author: shinsuke Date: 2008-11-28 22:36:13 +0900 (Fri, 28 Nov 2008) Log Message: ----------- added css, fixed access problem and sort order problem. Modified Paths: -------------- notepad/trunk/src/main/java/jp/sf/pal/notepad/NotepadConstants.java notepad/trunk/src/main/java/jp/sf/pal/notepad/action/admin/NotepadAction.java notepad/trunk/src/main/java/jp/sf/pal/notepad/action/user/NotepadAction.java notepad/trunk/src/main/java/jp/sf/pal/notepad/db/exentity/UserInfo.java notepad/trunk/src/main/java/jp/sf/pal/notepad/dxo/NotepadDxo.java notepad/trunk/src/main/java/jp/sf/pal/notepad/service/CategoryService.java notepad/trunk/src/main/java/jp/sf/pal/notepad/service/NotepadService.java notepad/trunk/src/main/resources/application.properties notepad/trunk/src/main/resources/application_ja.properties notepad/trunk/src/main/webapp/WEB-INF/portlet.xml notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/confirm.jsp notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/edit.jsp notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/error.jsp notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/index.jsp notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/confirm.jsp notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/edit.jsp notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/error.jsp notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/index.jsp notepad/trunk/src/main/webapp/WEB-INF/view/common/common.jsp notepad/trunk/src/main/webapp/WEB-INF/view/user/category/confirm.jsp notepad/trunk/src/main/webapp/WEB-INF/view/user/category/edit.jsp notepad/trunk/src/main/webapp/WEB-INF/view/user/category/error.jsp notepad/trunk/src/main/webapp/WEB-INF/view/user/category/index.jsp notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/confirm.jsp notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/edit.jsp notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/error.jsp notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/index.jsp Added Paths: ----------- notepad/trunk/src/main/resources/jp/ notepad/trunk/src/main/resources/jp/sf/ notepad/trunk/src/main/resources/jp/sf/pal/ notepad/trunk/src/main/resources/jp/sf/pal/notepad/ notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/ notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadEditor.properties notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadEditor_ja.properties notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadManager.properties notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadManager_ja.properties notepad/trunk/src/main/webapp/css/ notepad/trunk/src/main/webapp/css/pal-extension.css -------------- next part -------------- Modified: notepad/trunk/src/main/java/jp/sf/pal/notepad/NotepadConstants.java =================================================================== --- notepad/trunk/src/main/java/jp/sf/pal/notepad/NotepadConstants.java 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/java/jp/sf/pal/notepad/NotepadConstants.java 2008-11-28 13:36:13 UTC (rev 1471) @@ -20,10 +20,12 @@ public static final Integer DEFAULT_CATEGORY_ID = Integer.valueOf(1); - public static final int SHARED_CATEGORY_ID = 2; + public static final String DEFAULT_CATEGORY = "D"; public static final String PUBLIC_CATEGORY = "P"; - public static final String PERSONAL_CATEGORY = "C"; + public static final String PRIVATE_CATEGORY = "R"; + public static final String SHARED_CATEGORY = "S"; + } Modified: notepad/trunk/src/main/java/jp/sf/pal/notepad/action/admin/NotepadAction.java =================================================================== --- notepad/trunk/src/main/java/jp/sf/pal/notepad/action/admin/NotepadAction.java 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/java/jp/sf/pal/notepad/action/admin/NotepadAction.java 2008-11-28 13:36:13 UTC (rev 1471) @@ -153,7 +153,7 @@ try { Notepad link = createLink(); notepadService.store(link); - NotepadUtil.addMessage(request, "success.create_link"); + NotepadUtil.addMessage(request, "success.create_notepad"); // reset edit page loadListPageParameters(); @@ -164,7 +164,7 @@ throw e; } catch (Exception e) { log.error(e.getMessage(), e); - throw new ActionMessagesException("errors.failed_to_create_link"); + throw new ActionMessagesException("errors.failed_to_create_notepad"); } } @@ -173,7 +173,7 @@ try { Notepad link = createLink(); notepadService.store(link); - NotepadUtil.addMessage(request, "success.update_link"); + NotepadUtil.addMessage(request, "success.update_notepad"); // reset edit page loadListPageParameters(); @@ -184,7 +184,7 @@ throw e; } catch (Exception e) { log.error(e.getMessage(), e); - throw new ActionMessagesException("errors.failed_to_update_link"); + throw new ActionMessagesException("errors.failed_to_update_notepad"); } } @@ -193,7 +193,7 @@ try { notepadService.disable(Long.parseLong(notepadForm.id), request .getRemoteUser()); - NotepadUtil.addMessage(request, "success.delete_link"); + NotepadUtil.addMessage(request, "success.delete_notepad"); // reset edit page loadListPageParameters(); @@ -204,7 +204,7 @@ throw e; } catch (Exception e) { log.error(e.getMessage(), e); - throw new ActionMessagesException("errors.failed_to_delete_link"); + throw new ActionMessagesException("errors.failed_to_delete_notepad"); } } @@ -214,10 +214,10 @@ Notepad link = notepadService.getNotepad(linkId); if (link == null) { // throw an exception - throw new ActionMessagesException("errors.could_not_find_link", + throw new ActionMessagesException("errors.could_not_find_notepad", new Object[] { linkId }); } - notepadDxo.convertFromLinkToForm(link, notepadForm); + notepadDxo.convertFromNotepadToForm(link, notepadForm); } @@ -233,7 +233,7 @@ link.setUpdatedBy(remoteUser); link.setCreatedBy(remoteUser); } - notepadDxo.convertFromFormToLink(notepadForm, link); + notepadDxo.convertFromFormToNotepad(notepadForm, link); return link; } Modified: notepad/trunk/src/main/java/jp/sf/pal/notepad/action/user/NotepadAction.java =================================================================== --- notepad/trunk/src/main/java/jp/sf/pal/notepad/action/user/NotepadAction.java 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/java/jp/sf/pal/notepad/action/user/NotepadAction.java 2008-11-28 13:36:13 UTC (rev 1471) @@ -28,8 +28,6 @@ private static final Log log = LogFactory.getLog(NotepadAction.class); - public List<NotepadCategory> categoryItems; - // for list public List<Notepad> notepadItems; @@ -58,8 +56,6 @@ notepadPager.setCreatedBy(username); notepadItems = notepadService.getNotepadList(notepadPager); - categoryItems = categoryService.getCategoryList(username); - return "index.jsp"; } @@ -93,8 +89,6 @@ @Execute(validator = false, input = "error.jsp") public String editagain() { - String username = request.getRemoteUser(); - categoryItems = categoryService.getCategoryList(username); return "edit.jsp"; } @@ -107,13 +101,10 @@ notepadForm.mode }); } - String username = request.getRemoteUser(); - categoryItems = categoryService.getCategoryList(username); - // update edit page loadDetailsPageParameters(); - loadLink(); + loadNotepad(); return "confirm.jsp"; } @@ -124,95 +115,83 @@ notepadForm.initialize(); notepadForm.mode = NotepadConstants.CREATE_MODE; - String username = request.getRemoteUser(); - categoryItems = categoryService.getCategoryList(username); - // update edit page loadDetailsPageParameters(); return "edit.jsp"; } - @Execute(validator = false, input = "error.jsp") + @Execute(validator = false, input = "error.jsp", urlPattern = "editpage/{mode}/{id}") public String editpage() { notepadForm.mode = NotepadConstants.EDIT_MODE; - String username = request.getRemoteUser(); - categoryItems = categoryService.getCategoryList(username); - // update edit page loadDetailsPageParameters(); - loadLink(); + loadNotepad(); return "edit.jsp"; } @Execute(validator = true, input = "edit.jsp") public String confirm() { - String username = request.getRemoteUser(); - categoryItems = categoryService.getCategoryList(username); - return "confirm.jsp"; } - @Execute(validator = false, input = "error.jsp") + @Execute(validator = false, input = "error.jsp", urlPattern = "deletepage/{mode}/{id}") public String deletepage() { notepadForm.mode = NotepadConstants.DELETE_MODE; - String username = request.getRemoteUser(); - categoryItems = categoryService.getCategoryList(username); - // update edit page loadDetailsPageParameters(); - loadLink(); + loadNotepad(); return "confirm.jsp"; } - @Execute(validator = false, input = "error.jsp", urlPattern = "moveup/{id}") - public String moveup() { + @Execute(validator = false, input = "error.jsp", urlPattern = "movedown/{id}") + public String movedown() { if (notepadForm.id == null) { throw new ActionMessagesException("errors.invalid.id"); } - Notepad link = notepadService - .getNotepad(Long.parseLong(notepadForm.id)); - if (link == null) { - throw new ActionMessagesException("errors.could_not_find_link", + Notepad notepad = notepadService.getNotepad(Long + .parseLong(notepadForm.id)); + if (notepad == null) { + throw new ActionMessagesException("errors.could_not_find_notepad", new Object[] { notepadForm.id }); } try { - notepadService.moveUp(link); - NotepadUtil.addMessage(request, "success.move_link_up"); + notepadService.moveDown(notepad); + NotepadUtil.addMessage(request, "success.move_notepad_down"); } catch (ActionMessagesException e) { throw e; } catch (Exception e) { log.error(e.getMessage(), e); - throw new ActionMessagesException("errors.failed_to_update_link"); + throw new ActionMessagesException("errors.failed_to_update_notepad"); } return displayList(); } - @Execute(validator = false, input = "error.jsp", urlPattern = "movedown/{id}") - public String movedown() { + @Execute(validator = false, input = "error.jsp", urlPattern = "moveup/{id}") + public String moveup() { if (notepadForm.id == null) { throw new ActionMessagesException("errors.invalid.id"); } - Notepad link = notepadService - .getNotepad(Long.parseLong(notepadForm.id)); - if (link == null) { - throw new ActionMessagesException("errors.could_not_find_link", + Notepad notepad = notepadService.getNotepad(Long + .parseLong(notepadForm.id)); + if (notepad == null) { + throw new ActionMessagesException("errors.could_not_find_notepad", new Object[] { notepadForm.id }); } try { - notepadService.moveDown(link); - NotepadUtil.addMessage(request, "success.move_link_down"); + notepadService.moveUp(notepad); + NotepadUtil.addMessage(request, "success.move_notepad_up"); } catch (ActionMessagesException e) { throw e; } catch (Exception e) { log.error(e.getMessage(), e); - throw new ActionMessagesException("errors.failed_to_update_link"); + throw new ActionMessagesException("errors.failed_to_update_notepad"); } return displayList(); } @@ -220,9 +199,9 @@ @Execute(validator = true, input = "edit.jsp") public String create() { try { - Notepad link = createLink(); - notepadService.store(link); - NotepadUtil.addMessage(request, "success.create_link"); + Notepad notepad = createNotepad(); + notepadService.store(notepad); + NotepadUtil.addMessage(request, "success.create_notepad"); // reset edit page loadListPageParameters(); @@ -233,19 +212,16 @@ throw e; } catch (Exception e) { log.error(e.getMessage(), e); - throw new ActionMessagesException("errors.failed_to_create_link"); - } finally { - String username = request.getRemoteUser(); - categoryItems = categoryService.getCategoryList(username); + throw new ActionMessagesException("errors.failed_to_create_notepad"); } } @Execute(validator = true, input = "edit.jsp") public String update() { try { - Notepad link = createLink(); + Notepad link = createNotepad(); notepadService.store(link); - NotepadUtil.addMessage(request, "success.update_link"); + NotepadUtil.addMessage(request, "success.update_notepad"); // reset edit page loadListPageParameters(); @@ -256,10 +232,7 @@ throw e; } catch (Exception e) { log.error(e.getMessage(), e); - throw new ActionMessagesException("errors.failed_to_update_link"); - } finally { - String username = request.getRemoteUser(); - categoryItems = categoryService.getCategoryList(username); + throw new ActionMessagesException("errors.failed_to_update_notepad"); } } @@ -268,7 +241,7 @@ try { notepadService.disable(Long.parseLong(notepadForm.id), request .getRemoteUser()); - NotepadUtil.addMessage(request, "success.delete_link"); + NotepadUtil.addMessage(request, "success.delete_notepad"); // reset edit page loadListPageParameters(); @@ -279,38 +252,38 @@ throw e; } catch (Exception e) { log.error(e.getMessage(), e); - throw new ActionMessagesException("errors.failed_to_delete_link"); + throw new ActionMessagesException("errors.failed_to_delete_notepad"); } } - private void loadLink() { - Long linkId = Long.parseLong(notepadForm.id); + private void loadNotepad() { + Long notepadId = Long.parseLong(notepadForm.id); - Notepad link = notepadService.getNotepad(linkId); - if (link == null) { + Notepad notepad = notepadService.getNotepad(notepadId); + if (notepad == null) { // throw an exception - throw new ActionMessagesException("errors.could_not_find_link", - new Object[] { linkId }); + throw new ActionMessagesException("errors.could_not_find_notepad", + new Object[] { notepadId }); } - notepadDxo.convertFromLinkToForm(link, notepadForm); + notepadDxo.convertFromNotepadToForm(notepad, notepadForm); } - private Notepad createLink() { - Notepad link; + private Notepad createNotepad() { + Notepad notepad; if (notepadForm.mode == NotepadConstants.EDIT_MODE) { - Long linkId = Long.parseLong(notepadForm.id); - link = notepadService.getNotepad(linkId); - link.setUpdatedBy(request.getRemoteUser()); + Long notepadId = Long.parseLong(notepadForm.id); + notepad = notepadService.getNotepad(notepadId); + notepad.setUpdatedBy(request.getRemoteUser()); } else { - link = new Notepad(); + notepad = new Notepad(); String remoteUser = request.getRemoteUser(); - link.setUpdatedBy(remoteUser); - link.setCreatedBy(remoteUser); + notepad.setUpdatedBy(remoteUser); + notepad.setCreatedBy(remoteUser); } - notepadDxo.convertFromFormToLink(notepadForm, link); + notepadDxo.convertFromFormToNotepad(notepadForm, notepad); - return link; + return notepad; } private void loadListPageParameters() { @@ -319,6 +292,32 @@ private void loadDetailsPageParameters() { } + public List<NotepadCategory> getCategoryItems() { + String username = request.getRemoteUser(); + return categoryService.getCategoryList(username); + } + + public List<NotepadCategory> getEditableCategoryItems() { + String username = request.getRemoteUser(); + return categoryService.getEditableCategoryList(username); + } + + public boolean isEditable() { + String type = notepadForm.type; + if (type != null) { + if (NotepadConstants.PRIVATE_CATEGORY.equals(type) + || NotepadConstants.DEFAULT_CATEGORY.equals(type)) { + String userId = request.getRemoteUser(); + if (userId != null && userId.equals(notepadForm.createdBy)) { + return true; + } + } else if (NotepadConstants.SHARED_CATEGORY.equals(type)) { + return true; + } + } + return false; + } + /** * @return the request */ Modified: notepad/trunk/src/main/java/jp/sf/pal/notepad/db/exentity/UserInfo.java =================================================================== --- notepad/trunk/src/main/java/jp/sf/pal/notepad/db/exentity/UserInfo.java 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/java/jp/sf/pal/notepad/db/exentity/UserInfo.java 2008-11-28 13:36:13 UTC (rev 1471) @@ -1,5 +1,7 @@ package jp.sf.pal.notepad.db.exentity; +import org.apache.commons.lang.StringUtils; + /** * The entity of USER_INFO. * <p> @@ -14,4 +16,33 @@ /** Serial version UID. (Default) */ private static final long serialVersionUID = 1L; + + public String getNameArg0() { + if (StringUtils.isEmpty(getGivenName()) + && StringUtils.isEmpty(getFamilyName())) { + return getUserId(); + } + return getGivenName() != null ? getGivenName() : ""; + } + + public String getNameArg1() { + return getFamilyName() != null ? getFamilyName() : ""; + } + + public String getNameArg2() { + if (StringUtils.isEmpty(getGivenName()) + && StringUtils.isEmpty(getFamilyName())) { + return ""; + } + return getMiddleName() != null ? getMiddleName() : ""; + } + + public String getNameArg3() { + return getGivenNameDesc() != null ? getGivenNameDesc() : ""; + } + + public String getNameArg4() { + return getFamilyNameDesc() != null ? getFamilyNameDesc() : ""; + } + } Modified: notepad/trunk/src/main/java/jp/sf/pal/notepad/dxo/NotepadDxo.java =================================================================== --- notepad/trunk/src/main/java/jp/sf/pal/notepad/dxo/NotepadDxo.java 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/java/jp/sf/pal/notepad/dxo/NotepadDxo.java 2008-11-28 13:36:13 UTC (rev 1471) @@ -18,7 +18,6 @@ @ConversionRule("id : id" // + ", title : title" // + ", content : content" // - + ", type : type" // + ", sortOrder : sortOrder" // + ", categoryId : categoryId" // + ", createdTime : createdTime" // @@ -28,8 +27,8 @@ + ", deletedTime : deletedTime" // + ", deletedBy : deletedBy" // // + ", versionno : versionno" // - ) - public void convertFromLinkToForm(Notepad notepad, NotepadForm form); + + ", type : notepadCategory.type") + public void convertFromNotepadToForm(Notepad notepad, NotepadForm form); @ExcludeNull @TimestampPattern("yyyy/MM/dd HH:mm:ss") @@ -47,7 +46,7 @@ // + ", deletedBy : deletedBy" // // + ", versionno : versionno" // ) - public void convertFromFormToLink(NotepadForm form, Notepad notepad); + public void convertFromFormToNotepad(NotepadForm form, Notepad notepad); @ExcludeNull @DatePattern("yyyy/MM/dd") @@ -55,7 +54,6 @@ @ConversionRule("id : id" // + ", title : title" // + ", content : content" // - + ", type : type" // + ", sortOrder : sortOrder" // + ", categoryId : categoryId" // + ", createdTime : createdTime" // @@ -66,7 +64,7 @@ + ", deletedBy : deletedBy" // // + ", versionno : versionno" // ) - public void convertFromLinkToForm(Notepad notepad, + public void convertFromNotepadToForm(Notepad notepad, jp.sf.pal.notepad.form.admin.NotepadForm form); @ExcludeNull @@ -85,6 +83,6 @@ // + ", deletedBy : deletedBy" // // + ", versionno : versionno" // ) - public void convertFromFormToLink( + public void convertFromFormToNotepad( jp.sf.pal.notepad.form.admin.NotepadForm form, Notepad notepad); } Modified: notepad/trunk/src/main/java/jp/sf/pal/notepad/service/CategoryService.java =================================================================== --- notepad/trunk/src/main/java/jp/sf/pal/notepad/service/CategoryService.java 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/java/jp/sf/pal/notepad/service/CategoryService.java 2008-11-28 13:36:13 UTC (rev 1471) @@ -2,7 +2,6 @@ import java.io.Serializable; import java.sql.Timestamp; -import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -10,6 +9,7 @@ import jp.sf.pal.notepad.common.dxo.PagerDxo; import jp.sf.pal.notepad.common.util.PagingResultBeanWrapper; import jp.sf.pal.notepad.db.allcommon.cbean.PagingResultBean; +import jp.sf.pal.notepad.db.allcommon.cbean.UnionQuery; import jp.sf.pal.notepad.db.cbean.NotepadCategoryCB; import jp.sf.pal.notepad.db.cbean.UserInfoCB; import jp.sf.pal.notepad.db.exbhv.NotepadCategoryBhv; @@ -193,29 +193,50 @@ } } - public List<NotepadCategory> getCategoryList(String createdBy) { + public List<NotepadCategory> getCategoryList(final String createdBy) { - List<NotepadCategory> notepadCategoryList = new ArrayList<NotepadCategory>(); - NotepadCategoryCB cb = new NotepadCategoryCB(); // setup cb.query().setDeletedBy_IsNull(); - cb.query().setType_Equal(NotepadConstants.PUBLIC_CATEGORY); + cb.query().setType_NotEqual(NotepadConstants.PRIVATE_CATEGORY); + cb.unionAll(new UnionQuery<NotepadCategoryCB>() { + public void query(NotepadCategoryCB unionCB) { + unionCB.query().setDeletedBy_IsNull(); + unionCB.query() + .setType_Equal(NotepadConstants.PRIVATE_CATEGORY); + unionCB.query().setCreatedBy_Equal(createdBy); + } + }); + + cb.query().addOrderBy_Type_Asc(); cb.query().addOrderBy_SortOrder_Asc(); - notepadCategoryList.addAll(notepadCategoryBhv.selectList(cb)); + return notepadCategoryBhv.selectList(cb); + } - cb = new NotepadCategoryCB(); - cb.query().setCreatedBy_Equal(createdBy); + public List<NotepadCategory> getEditableCategoryList(final String createdBy) { + + NotepadCategoryCB cb = new NotepadCategoryCB(); + + // setup + cb.query().setDeletedBy_IsNull(); - cb.query().setType_Equal(NotepadConstants.PERSONAL_CATEGORY); + cb.query().setType_Equal(NotepadConstants.SHARED_CATEGORY); + cb.unionAll(new UnionQuery<NotepadCategoryCB>() { + public void query(NotepadCategoryCB unionCB) { + unionCB.query().setDeletedBy_IsNull(); + unionCB.query() + .setType_Equal(NotepadConstants.PRIVATE_CATEGORY); + unionCB.query().setCreatedBy_Equal(createdBy); + } + }); + + cb.query().addOrderBy_Type_Asc(); cb.query().addOrderBy_SortOrder_Asc(); - notepadCategoryList.addAll(notepadCategoryBhv.selectList(cb)); - - return notepadCategoryList; + return notepadCategoryBhv.selectList(cb); } public NotepadCategoryBhv getNotepadCategoryBhv() { Modified: notepad/trunk/src/main/java/jp/sf/pal/notepad/service/NotepadService.java =================================================================== --- notepad/trunk/src/main/java/jp/sf/pal/notepad/service/NotepadService.java 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/java/jp/sf/pal/notepad/service/NotepadService.java 2008-11-28 13:36:13 UTC (rev 1471) @@ -15,6 +15,7 @@ import jp.sf.pal.notepad.db.exbhv.NotepadContentBhv; import jp.sf.pal.notepad.db.exbhv.UserInfoBhv; import jp.sf.pal.notepad.db.exentity.Notepad; +import jp.sf.pal.notepad.db.exentity.NotepadCategory; import jp.sf.pal.notepad.db.exentity.UserInfo; import jp.sf.pal.notepad.pager.NotepadPager; @@ -33,6 +34,8 @@ private transient UserInfoBhv userInfoBhv; + private CategoryService categoryService; + private void initUserInfo(String userId) { UserInfoCB cb = new UserInfoCB(); cb.query().setUserId_Equal(userId); @@ -50,28 +53,37 @@ } } - public List<Notepad> getNotepadList(NotepadPager linkPager) { + public List<Notepad> getNotepadList(NotepadPager notepadPager) { - HotdeployUtil.rebuildValue(linkPager); + HotdeployUtil.rebuildValue(notepadPager); NotepadCB cb = new NotepadCB(); - cb.fetchFirst(linkPager.getPageSize()); - cb.fetchPage(linkPager.getCurrentPageNumber()); + cb.fetchFirst(notepadPager.getPageSize()); + cb.fetchPage(notepadPager.getCurrentPageNumber()); // setup + cb.setupSelect_UserInfoByCreatedBy(); + cb.setupSelect_NotepadCategory(); + cb.specify().specifyNotepadCategory().columnType(); - if (linkPager.getCreatedBy() != null) { - if (linkPager.getCategoryId() != null) { - if (linkPager.getCategoryId() != NotepadConstants.SHARED_CATEGORY_ID) { - cb.query().setCreatedBy_Equal(linkPager.getCreatedBy()); + if (notepadPager.getCreatedBy() != null) { + if (notepadPager.getCategoryId() != null) { + NotepadCategory notepadCategory = categoryService + .getCategory(notepadPager.getCategoryId()); + if (NotepadConstants.DEFAULT_CATEGORY.equals(notepadCategory + .getType())) { + cb.query().setCreatedBy_Equal(notepadPager.getCreatedBy()); + } else if (NotepadConstants.PRIVATE_CATEGORY + .equals(notepadCategory.getType())) { + cb.query().setCreatedBy_Equal(notepadPager.getCreatedBy()); } } else { - cb.query().setCreatedBy_Equal(linkPager.getCreatedBy()); + cb.query().setCreatedBy_Equal(notepadPager.getCreatedBy()); } } - if (linkPager.getCategoryId() != null) { - cb.query().setCategoryId_Equal(linkPager.getCategoryId()); + if (notepadPager.getCategoryId() != null) { + cb.query().setCategoryId_Equal(notepadPager.getCategoryId()); } cb.query().setDeletedBy_IsNull(); @@ -80,9 +92,10 @@ PagingResultBean<Notepad> messageList = notepadBhv.selectPage(cb); // update pager - pagerDxo.convert(new PagingResultBeanWrapper(messageList), linkPager); + pagerDxo + .convert(new PagingResultBeanWrapper(messageList), notepadPager); messageList.setPageRangeSize(5); - linkPager.setPageNumberList(messageList.pageRange() + notepadPager.setPageNumberList(messageList.pageRange() .createPageNumberList()); return messageList; @@ -93,6 +106,8 @@ // setup cb.setupSelect_NotepadContentAsOne(); + cb.setupSelect_NotepadCategory(); + cb.specify().specifyNotepadCategory().columnType(); cb.query().setId_Equal(id); return notepadBhv.selectEntity(cb); @@ -120,11 +135,11 @@ cb.query().setCreatedBy_Equal(notepad.getCreatedBy()); cb.query().setDeletedBy_IsNull(); cb.query().addOrderBy_SortOrder_Desc(); - List<Notepad> LinkList = notepadBhv.selectPage(cb); + List<Notepad> notepadList = notepadBhv.selectPage(cb); // TODO mt-safe int sortOrder = 1; - if (LinkList != null && !LinkList.isEmpty()) { - sortOrder = LinkList.get(0).getSortOrder() + 1; + if (notepadList != null && !notepadList.isEmpty()) { + sortOrder = notepadList.get(0).getSortOrder() + 1; } notepad.setSortOrder(sortOrder); @@ -140,59 +155,83 @@ } - public void disable(Long linkId, String name) { + public void disable(Long notepadId, String name) { // not delete NotepadCB cb = new NotepadCB(); - cb.query().setId_Equal(linkId); - Notepad link = notepadBhv.selectEntity(cb); + cb.query().setId_Equal(notepadId); + Notepad notepad = notepadBhv.selectEntity(cb); // TODO throw an exception - link.setDeletedBy(name); - link.setDeletedTime(new Timestamp(new Date().getTime())); - notepadBhv.update(link); + notepad.setDeletedBy(name); + notepad.setDeletedTime(new Timestamp(new Date().getTime())); + notepadBhv.update(notepad); } - public void moveUp(Notepad link) { + public void moveDown(Notepad notepad) { NotepadCB cb = new NotepadCB(); cb.fetchFirst(1); cb.fetchFirst(1); - cb.query().setSortOrder_GreaterThan(link.getSortOrder()); + cb.query().setId_NotEqual(notepad.getId()); + cb.query().setSortOrder_GreaterEqual(notepad.getSortOrder()); cb.query().addOrderBy_SortOrder_Asc(); - List<Notepad> linkList = notepadBhv.selectPage(cb); - if (linkList != null && !linkList.isEmpty()) { - Notepad targetLink = linkList.get(0); - Integer sortOrder = targetLink.getSortOrder(); - targetLink.setSortOrder(link.getSortOrder()); - link.setSortOrder(sortOrder); - notepadBhv.update(targetLink); - notepadBhv.update(link); + cb.query().setCategoryId_Equal(notepad.getCategoryId()); + if (NotepadConstants.DEFAULT_CATEGORY.equals(notepad + .getNotepadCategory().getType())) { + cb.query().setCreatedBy_Equal(notepad.getCreatedBy()); + } + List<Notepad> notepadList = notepadBhv.selectPage(cb); + if (notepadList != null && !notepadList.isEmpty()) { + Notepad targetNotepad = notepadList.get(0); + Integer sortOrder1 = targetNotepad.getSortOrder(); + Integer sortOrder2 = notepad.getSortOrder(); + if (sortOrder1.intValue() == sortOrder2.intValue()) { + targetNotepad.setSortOrder(sortOrder2); + notepad.setSortOrder(sortOrder1 + 1); + } else { + targetNotepad.setSortOrder(sortOrder2); + notepad.setSortOrder(sortOrder1); + } + notepadBhv.update(targetNotepad); + notepadBhv.update(notepad); } else { // TODO replace with CommonException throw new ActionMessagesException( - "errors.could_not_find_link_for_moving_up"); + "errors.could_not_find_notepad_for_moving_up"); } } - public void moveDown(Notepad link) { + public void moveUp(Notepad notepad) { NotepadCB cb = new NotepadCB(); cb.fetchFirst(1); cb.fetchFirst(1); - cb.query().setSortOrder_LessThan(link.getSortOrder()); + cb.query().setId_NotEqual(notepad.getId()); + cb.query().setSortOrder_LessEqual(notepad.getSortOrder()); cb.query().addOrderBy_SortOrder_Desc(); - List<Notepad> linkList = notepadBhv.selectPage(cb); - if (linkList != null && !linkList.isEmpty()) { - Notepad targetLink = linkList.get(0); - Integer sortOrder = targetLink.getSortOrder(); - targetLink.setSortOrder(link.getSortOrder()); - link.setSortOrder(sortOrder); - notepadBhv.update(targetLink); - notepadBhv.update(link); + cb.query().setCategoryId_Equal(notepad.getCategoryId()); + if (NotepadConstants.DEFAULT_CATEGORY.equals(notepad + .getNotepadCategory().getType())) { + cb.query().setCreatedBy_Equal(notepad.getCreatedBy()); + } + List<Notepad> notepadList = notepadBhv.selectPage(cb); + if (notepadList != null && !notepadList.isEmpty()) { + Notepad targetNotepad = notepadList.get(0); + Integer sortOrder1 = targetNotepad.getSortOrder(); + Integer sortOrder2 = notepad.getSortOrder(); + if (sortOrder1.intValue() == sortOrder2.intValue()) { + targetNotepad.setSortOrder(sortOrder2 + 1); + notepad.setSortOrder(sortOrder1); + } else { + targetNotepad.setSortOrder(sortOrder2); + notepad.setSortOrder(sortOrder1); + } + notepadBhv.update(targetNotepad); + notepadBhv.update(notepad); } else { // TODO replace with CommonException throw new ActionMessagesException( - "errors.could_not_find_link_for_moving_down"); + "errors.could_not_find_notepad_for_moving_down"); } } @@ -228,4 +267,12 @@ this.userInfoBhv = userInfoBhv; } + public CategoryService getCategoryService() { + return categoryService; + } + + public void setCategoryService(CategoryService categoryService) { + this.categoryService = categoryService; + } + } Modified: notepad/trunk/src/main/resources/application.properties =================================================================== --- notepad/trunk/src/main/resources/application.properties 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/resources/application.properties 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,6 +5,13 @@ msg.header=<ul> msg.footer=</ul> +# 0: Given name, 1: Family name, 2: Middle Name +display.name={0} {2} {1} +# 0: Given name, 1: Family name, 2: Middle Name, 3: Given name(Reading), 4: Family name(Reading) +long.display.name={0} {2} {1} +# 0: Given name(Reading), 1: Family name(Reading), 2: Middle Name +phonetic.display.name={0} {2} {1} + errors.invalid={0} is invalid. errors.maxlength={0} can not be greater than {1} characters. errors.minlength={0} can not be less than {1} characters. @@ -35,9 +42,9 @@ labels.category_ID=Category ID labels.category_unselected=(Unselected) labels.category_shared=(Shared) -labels.create_link=Create Note -labels.create_link_2=Create Note -labels.confirm_link=Confirm Creating Note +labels.create_notepad=Create Note +labels.create_notepad_2=Create Note +labels.confirm_notepad=Confirm Creating Note labels.detail=Detail labels.create=Create labels.update=Update @@ -65,11 +72,11 @@ success.delete_category=Deleted the category information. success.move_category_up=Moved the category information up. success.move_category_down=Moved the category information down. -success.create_link=Created a link information. -success.update_link=Updated the link information. -success.delete_link=Deleted the link information. -success.move_link_up=Moved the link information up. -success.move_link_down=Moved the link information down. +success.create_notepad=Created a link information. +success.update_notepad=Updated the link information. +success.delete_notepad=Deleted the link information. +success.move_notepad_up=Moved the link information up. +success.move_notepad_down=Moved the link information down. errors.invalid.mode=Invalid mode(expected value is {0}, but it's {1}). errors.failed_to_create_category=Failed to create a new category information. @@ -80,9 +87,13 @@ errors.could_not_find_category_for_moving_up=Could not find the category information for moving it up. errors.could_not_find_category_for_moving_down=Could not find the category information for moving it down. errors.invalid_category_id=Invalid category information. -errors.failed_to_create_link=Failed to create a new link information. -errors.failed_to_update_link=Failed to update the link information. -errors.failed_to_delete_link=Failed to delete the link information. -errors.could_not_find_link=Could not find the link information({0}). -errors.could_not_find_link_for_moving_up=Could not find the link information for moving it up. -errors.could_not_find_link_for_moving_down=Could not find the link information for moving it down. +errors.failed_to_create_notepad=Failed to create a new link information. +errors.failed_to_update_notepad=Failed to update the link information. +errors.failed_to_delete_notepad=Failed to delete the link information. +errors.could_not_find_notepad=Could not find the link information({0}). +errors.could_not_find_notepad_for_moving_up=Could not find the link information for moving it up. +errors.could_not_find_notepad_for_moving_down=Could not find the link information for moving it down. + +labels.createdBy=Created By +labels.default_category=Default +labels.shared=Shared Modified: notepad/trunk/src/main/resources/application_ja.properties =================================================================== --- notepad/trunk/src/main/resources/application_ja.properties 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/resources/application_ja.properties 2008-11-28 13:36:13 UTC (rev 1471) @@ -1,3 +1,10 @@ +# 0: Given name, 1: Family name, 2: Middle Name +display.name={1} {0} +# 0: Given name, 1: Family name, 2: Middle Name, 3: Given name(Reading), 4: Family name(Reading) +long.display.name={1} {0} ({4} {3}) +# 0: Given name(Reading), 1: Family name(Reading), 2: Middle Name +phonetic.display.name={1} {0} + errors.invalid={0} \u306b\u306f\u6b63\u3057\u3044\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 errors.maxlength={0} \u306f {1} \u6587\u5b57\u4ee5\u4e0b\u3067\u306a\u304f\u3066\u306f\u306a\u308a\u307e\u305b\u3093\u3002 errors.minlength={0} \u306f {1} \u6587\u5b57\u4ee5\u4e0a\u5165\u529b\u3057\u306a\u304f\u3066\u306f\u306a\u308a\u307e\u305b\u3093\u3002 @@ -28,9 +35,9 @@ labels.category_ID=\u30ab\u30c6\u30b4\u30eaID labels.category_unselected=(\u672a\u5206\u985e) labels.category_shared=(\u5171\u6709) -labels.create_link=\u30ce\u30fc\u30c8\u4f5c\u6210 -labels.create_link_2=\u30ce\u30fc\u30c8\u306e\u767b\u9332 -labels.confirm_link=\u30ce\u30fc\u30c8\u306e\u767b\u9332\u306e\u78ba\u8a8d +labels.create_notepad=\u30e1\u30e2\u4f5c\u6210 +labels.create_notepad_2=\u30e1\u30e2\u306e\u767b\u9332 +labels.confirm_notepad=\u30e1\u30e2\u306e\u767b\u9332\u306e\u78ba\u8a8d labels.detail=\u8a73\u7d30 labels.create=\u767b\u9332 labels.update=\u66f4\u65b0 @@ -52,18 +59,18 @@ labels.to_next=\u6b21\u3078 labels.to_back=\u524d\u3078 labels.create_category=\u30ab\u30c6\u30b4\u30ea\u4f5c\u6210 -labels.link_list=\u30ce\u30fc\u30c8\u4e00\u89a7 +labels.link_list=\u30e1\u30e2\u4e00\u89a7 success.create_category=\u30ab\u30c6\u30b4\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002 success.update_category=\u30ab\u30c6\u30b4\u30ea\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002 success.delete_category=\u30ab\u30c6\u30b4\u30ea\u3092\u524a\u9664\u3057\u307e\u3057\u305f\u3002 success.move_category_up=\u4e0a\u306b\u30ab\u30c6\u30b4\u30ea\u3092\u79fb\u52d5\u3057\u307e\u3057\u305f\u3002 success.move_category_down=\u4e0b\u306b\u30ab\u30c6\u30b4\u30ea\u3092\u79fb\u52d5\u3057\u307e\u3057\u305f\u3002 -success.create_link=\u30ce\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f -success.update_link=\u30ce\u30fc\u30c8\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002 -success.delete_link=\u30ce\u30fc\u30c8\u3092\u524a\u9664\u3057\u307e\u3057\u305f\u3002 -success.move_link_up=\u4e0a\u306b\u30ce\u30fc\u30c8\u3092\u79fb\u52d5\u3057\u307e\u3057\u305f\u3002 -success.move_link_down=\u4e0b\u306b\u30ce\u30fc\u30c8\u3092\u79fb\u52d5\u3057\u307e\u3057\u305f\u3002 +success.create_notepad=\u30e1\u30e2\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f +success.update_notepad=\u30e1\u30e2\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002 +success.delete_notepad=\u30e1\u30e2\u3092\u524a\u9664\u3057\u307e\u3057\u305f\u3002 +success.move_notepad_up=\u4e0a\u306b\u30e1\u30e2\u3092\u79fb\u52d5\u3057\u307e\u3057\u305f\u3002 +success.move_notepad_down=\u4e0b\u306b\u30e1\u30e2\u3092\u79fb\u52d5\u3057\u307e\u3057\u305f\u3002 errors.invalid.mode=\u30e2\u30fc\u30c9\u304c\u9055\u3044\u307e\u3059\u3002(\u6b63\u3057\u3044\u5024\u306f {0} \u3067\u3059\u304c\u3001\u5165\u529b\u3055\u308c\u305f\u5024\u306f {1} \u306b\u306a\u3063\u3066\u3044\u307e\u3059) errors.failed_to_create_category=\u30ab\u30c6\u30b4\u30ea\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 @@ -74,9 +81,13 @@ errors.could_not_find_category_for_moving_up=\u4e0a\u306b\u79fb\u52d5\u3059\u308b\u30ab\u30c6\u30b4\u30ea\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 errors.could_not_find_category_for_moving_down=\u4e0b\u306b\u79fb\u52d5\u3059\u308b\u30ab\u30c6\u30b4\u30ea\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 errors.invalid_category_id=\u6b63\u3057\u304f\u306a\u3044\u30ab\u30c6\u30b4\u30ea\u60c5\u5831\u3067\u3059\u3002 -errors.failed_to_create_link=\u30ce\u30fc\u30c8\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -errors.failed_to_update_link=\u30ce\u30fc\u30c8\u306e\u66f4\u65b0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -errors.failed_to_delete_link=\u30ce\u30fc\u30c8\u306e\u524a\u9664\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -errors.could_not_find_link=\u30ce\u30fc\u30c8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002({0}) -errors.could_not_find_link_for_moving_up=\u4e0a\u306b\u79fb\u52d5\u3059\u308b\u30ce\u30fc\u30c8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 -errors.could_not_find_link_for_moving_down=\u4e0b\u306b\u79fb\u52d5\u3059\u308b\u30ce\u30fc\u30c8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 +errors.failed_to_create_notepad=\u30e1\u30e2\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 +errors.failed_to_update_notepad=\u30e1\u30e2\u306e\u66f4\u65b0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 +errors.failed_to_delete_notepad=\u30e1\u30e2\u306e\u524a\u9664\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 +errors.could_not_find_notepad=\u30e1\u30e2\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002({0}) +errors.could_not_find_notepad_for_moving_up=\u4e0a\u306b\u79fb\u52d5\u3059\u308b\u30e1\u30e2\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 +errors.could_not_find_notepad_for_moving_down=\u4e0b\u306b\u79fb\u52d5\u3059\u308b\u30e1\u30e2\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 + +labels.createdBy=\u4f5c\u6210\u8005 +labels.default_category=\u30c7\u30d5\u30a9\u30eb\u30c8 +labels.shared=\u5171\u6709 \ No newline at end of file Added: notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadEditor.properties =================================================================== Property changes on: notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadEditor.properties ___________________________________________________________________ Name: svn:eol-style + native Added: notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadEditor_ja.properties =================================================================== --- notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadEditor_ja.properties (rev 0) +++ notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadEditor_ja.properties 2008-11-28 13:36:13 UTC (rev 1471) @@ -0,0 +1,4 @@ +# portlet info +javax.portlet.title=\u30e1\u30e2\u5e33 +javax.portlet.short-title=\u30e1\u30e2\u5e33 +javax.portlet.keywords=\u30e1\u30e2\u5e33 Property changes on: notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadEditor_ja.properties ___________________________________________________________________ Name: svn:eol-style + native Added: notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadManager.properties =================================================================== Property changes on: notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadManager.properties ___________________________________________________________________ Name: svn:eol-style + native Added: notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadManager_ja.properties =================================================================== --- notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadManager_ja.properties (rev 0) +++ notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadManager_ja.properties 2008-11-28 13:36:13 UTC (rev 1471) @@ -0,0 +1,4 @@ +# portlet info +javax.portlet.title=\u30e1\u30e2\u5e33\u7ba1\u7406 +javax.portlet.short-title=\u30e1\u30e2\u5e33\u7ba1\u7406 +javax.portlet.keywords=\u7ba1\u7406 Property changes on: notepad/trunk/src/main/resources/jp/sf/pal/notepad/resources/NotepadManager_ja.properties ___________________________________________________________________ Name: svn:eol-style + native Modified: notepad/trunk/src/main/webapp/WEB-INF/portlet.xml =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/portlet.xml 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/portlet.xml 2008-11-28 13:36:13 UTC (rev 1471) @@ -18,11 +18,11 @@ </supports> <supported-locale>en</supported-locale> <supported-locale>ja</supported-locale> -<!-- resource-bundle></resource-bundle --> + <resource-bundle>jp.sf.pal.notepad.resources.NotepadEditor</resource-bundle> <portlet-info> <title>Notepad</title> <short-title>Notepad</short-title> - <keywords>Notepad,URL</keywords> + <keywords>Notepad</keywords> </portlet-info> </portlet> <portlet> @@ -43,11 +43,11 @@ </supports> <supported-locale>en</supported-locale> <supported-locale>ja</supported-locale> -<!-- resource-bundle></resource-bundle --> + <resource-bundle>jp.sf.pal.notepad.resources.NotepadManager</resource-bundle> <portlet-info> <title>Notepad Manager</title> <short-title>Notepads</short-title> - <keywords>Notepad,URL</keywords> + <keywords>Notepad</keywords> </portlet-info> </portlet> </portlet-app> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/confirm.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/confirm.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/confirm.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,7 +5,22 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> <div class="form-table"> <s:form> @@ -24,8 +39,10 @@ <tr> <th><bean:message key="labels.shared"/></th> <td> +<c:if test="${type=='R'}"><bean:message key="labels.personal"/></c:if> <c:if test="${type=='P'}"><bean:message key="labels.public"/></c:if> -<c:if test="${type=='C'}"><bean:message key="labels.personal"/></c:if> +<c:if test="${type=='S'}"><bean:message key="labels.shared"/></c:if> +<c:if test="${type=='D'}"><bean:message key="labels.default_category"/></c:if> <html:hidden property="type"/> </td> </tr> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/edit.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/edit.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/edit.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,7 +5,22 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> <div class="form-table"> <s:form> @@ -26,8 +41,10 @@ <th><bean:message key="labels.shared"/></th> <td> <html:select property="type"> +<html:option value="R"><bean:message key="labels.personal"/></html:option> <html:option value="P"><bean:message key="labels.public"/></html:option> -<html:option value="C"><bean:message key="labels.personal"/></html:option> +<html:option value="S"><bean:message key="labels.shared"/></html:option> +<html:option value="D"><bean:message key="labels.default_category"/></html:option> </html:select> </td> </tr> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/error.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/error.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/error.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -4,8 +4,25 @@ <title></title> </head> <body> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <html:errors/> <br> <s:link href="index"><bean:message key="labels.back"/></s:link> +</div> </body> </html> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/index.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/index.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/admin/category/index.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,7 +5,22 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> <div class="list-table"> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/confirm.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/confirm.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/confirm.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,7 +5,22 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> <div class="list-table"> @@ -14,7 +29,7 @@ <html:hidden property="mode"/> <div class="form-table"> <table style="width: 580px;"> - <caption><bean:message key="labels.confirm_link"/></caption> + <caption><bean:message key="labels.confirm_notepad"/></caption> <tbody> <tr> <th style="width: 80px;"><bean:message key="labels.name"/></th> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/edit.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/edit.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/edit.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,7 +5,22 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> <div class="list-table"> @@ -14,7 +29,7 @@ <html:hidden property="mode"/> <div class="form-table"> <table style="width: 580px;"> - <caption><bean:message key="labels.create_link_2"/></caption> + <caption><bean:message key="labels.create_notepad_2"/></caption> <tbody> <tr> <th style="width: 80px;"><bean:message key="labels.name"/></th> @@ -22,7 +37,7 @@ </tr> <tr> <th><bean:message key="labels.memo"/></th> - <td><html:textarea property="content" cols="50" rows="5"/></td> + <td><html:textarea property="content" cols="50" rows="15"/></td> </tr> <tr> <th><bean:message key="labels.category_ID"/></th> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/error.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/error.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/error.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -4,8 +4,25 @@ <title></title> </head> <body> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <html:errors/> <br> <s:link href="index"><bean:message key="labels.back"/></s:link> +</div> </body> </html> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/index.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/index.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/admin/notepad/index.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,12 +5,27 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> <div class="list-table"> <div> -<s:link href="createpage"><bean:message key="labels.create_link"/></s:link> +<s:link href="createpage"><bean:message key="labels.create_notepad"/></s:link> | <s:link href="/admin/category/"><bean:message key="labels.category_list"/></s:link> </div> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/common/common.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/common/common.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/common/common.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -4,6 +4,5 @@ <%@taglib prefix="html" uri="http://struts.apache.org/tags-html"%> <%@taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%> <%@taglib prefix="tiles" uri="http://jakarta.apache.org/struts/tags-tiles"%> -<!-- %@taglib prefix="s" uri="http://sastruts.seasar.org"% --> <%@taglib prefix="f" uri="http://sastruts.seasar.org/functions"%> <%@taglib prefix="s" uri="http://sastruts.seasar.org/portlet"%> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/user/category/confirm.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/user/category/confirm.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/user/category/confirm.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,7 +5,22 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> <div class="form-table"> <s:form> @@ -21,8 +36,9 @@ <tr> <th><bean:message key="labels.shared"/></th> <td> +<c:if test="${type=='R'}"><bean:message key="labels.personal"/></c:if> <c:if test="${type=='P'}"><bean:message key="labels.public"/></c:if> -<c:if test="${type=='C'}"><bean:message key="labels.personal"/></c:if> +<c:if test="${type=='S'}"><bean:message key="labels.shared"/></c:if> <html:hidden property="type"/> </td> </tr> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/user/category/edit.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/user/category/edit.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/user/category/edit.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,7 +5,22 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> <div class="form-table"> <s:form> @@ -22,8 +37,9 @@ <th><bean:message key="labels.shared"/></th> <td> <html:select property="type"> +<html:option value="R"><bean:message key="labels.personal"/></html:option> <html:option value="P"><bean:message key="labels.public"/></html:option> -<html:option value="C"><bean:message key="labels.personal"/></html:option> +<html:option value="S"><bean:message key="labels.shared"/></html:option> </html:select> </td> </tr> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/user/category/error.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/user/category/error.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/user/category/error.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -4,8 +4,25 @@ <title></title> </head> <body> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <html:errors/> <br> <s:link href="index"><bean:message key="labels.back"/></s:link> +</div> </body> </html> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/user/category/index.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/user/category/index.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/user/category/index.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,7 +5,22 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> <div class="list-table"> @@ -17,13 +32,13 @@ <tr> <th style="width:200px;text-align: center;"><bean:message key="labels.category_name"/></th> <th style="width:100px;text-align: center;""><bean:message key="labels.order"/></th> - <th style="width:150px;text-align: center;"><bean:message key="labels.action"/></th> + <th style="width:100px;text-align: center;"><bean:message key="labels.action"/></th> </tr> </thead> <tbody> <c:forEach var="c" varStatus="s" items="${categoryItems}"> <tr> - <td>${f:h(c.name)}(${c.sortOrder})</td> + <td>${f:h(c.name)}</td> <td> <table border="0" cellpadding="0" cellspacing="0" style="border: 0;"> <tr> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/confirm.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/confirm.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/confirm.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,22 +5,45 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> -<div style="float: left; width: 150px;" class="portlet-menu"> - <div style="padding:3px;"> - <div class="portlet-menu-caption"><bean:message key="labels.category"/></div> - <ul> +<div style="float: left; width: 150px;" class="form-table"> +<table style="width: 145px;"> + <tbody> + <tr> + <th><bean:message key="labels.category"/></th> + </tr> + <tr> + <td> + <ul style="margin:0 0 0 3px;padding:0;"> <c:forEach var="c" varStatus="s" items="${categoryItems}"> <c:if test="${notepadPager.categoryId==c.id}"> - <li class="portlet-menu-item-selected">${f:h(c.name)}</li> + <li style="list-style-type: none;font-weight: bold;margin:1px 0;">${f:h(c.name)}</li> </c:if> <c:if test="${notepadPager.categoryId!=c.id}"> - <li class="portlet-menu-item"><s:link href="select/${f:u(c.id)}">${f:h(c.name)}</s:link></li> + <li style="list-style-type: none;margin:1px 0;"><s:link href="select/${f:u(c.id)}" style="text-decoration: none;">${f:h(c.name)}</s:link></li> </c:if> </c:forEach> </ul> - </div> + </td> + </tr> + </tbody> +</table> </div> <div style="float: left;margin-left:10px;"> @@ -29,7 +52,7 @@ <html:hidden property="mode"/> <div class="form-table"> <table style="width: 580px;"> - <caption><bean:message key="labels.confirm_link"/></caption> + <caption><bean:message key="labels.confirm_notepad"/></caption> <tbody> <tr> <th style="width: 80px;"><bean:message key="labels.name"/></th> @@ -66,7 +89,7 @@ </c:if> <c:if test="${mode == 4}"> <input type="submit" name="back" value="<bean:message key="labels.back"/>"/> - <c:if test="${categoryId!=2}"> + <c:if test="${editable}"> <input type="submit" name="editpage" value="<bean:message key="labels.edit"/>"/> <input type="submit" name="deletepage" value="<bean:message key="labels.delete"/>"/> </c:if> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/edit.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/edit.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/edit.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,22 +5,45 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> -<div style="float: left; width: 150px;" class="portlet-menu"> - <div style="padding:3px;"> - <div class="portlet-menu-caption"><bean:message key="labels.category"/></div> - <ul> +<div style="float: left; width: 150px;" class="form-table"> +<table style="width: 145px;"> + <tbody> + <tr> + <th><bean:message key="labels.category"/></th> + </tr> + <tr> + <td> + <ul style="margin:0 0 0 3px;padding:0;"> <c:forEach var="c" varStatus="s" items="${categoryItems}"> <c:if test="${notepadPager.categoryId==c.id}"> - <li class="portlet-menu-item-selected">${f:h(c.name)}</li> + <li style="list-style-type: none;font-weight: bold;margin:1px 0;">${f:h(c.name)}</li> </c:if> <c:if test="${notepadPager.categoryId!=c.id}"> - <li class="portlet-menu-item"><s:link href="select/${f:u(c.id)}">${f:h(c.name)}</s:link></li> + <li style="list-style-type: none;margin:1px 0;"><s:link href="select/${f:u(c.id)}" style="text-decoration: none;">${f:h(c.name)}</s:link></li> </c:if> </c:forEach> </ul> - </div> + </td> + </tr> + </tbody> +</table> </div> <div style="float: left;margin-left:10px;"> @@ -29,7 +52,7 @@ <html:hidden property="mode"/> <div class="form-table"> <table style="width: 580px;"> - <caption><bean:message key="labels.create_link_2"/></caption> + <caption><bean:message key="labels.create_notepad_2"/></caption> <tbody> <tr> <th style="width: 80px;"><bean:message key="labels.name"/></th> @@ -37,7 +60,7 @@ </tr> <tr> <th><bean:message key="labels.memo"/></th> - <td><html:textarea property="content" cols="50" rows="5"/></td> + <td><html:textarea property="content" cols="50" rows="15"/></td> </tr> <tr> <th><bean:message key="labels.category"/></th> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/error.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/error.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/error.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -4,8 +4,25 @@ <title></title> </head> <body> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <html:errors/> <br> <s:link href="index"><bean:message key="labels.back"/></s:link> +</div> </body> </html> Modified: notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/index.jsp =================================================================== --- notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/index.jsp 2008-11-28 08:10:16 UTC (rev 1470) +++ notepad/trunk/src/main/webapp/WEB-INF/view/user/notepad/index.jsp 2008-11-28 13:36:13 UTC (rev 1471) @@ -5,27 +5,50 @@ <title></title> </head> <body> -<div style="padding:3px;"> +<script type="text/javascript"> +<!-- +var cssFile="${f:url('/css/pal-extension.css')}"; +var isMSIE = /*@cc_on!@*/false; +if(isMSIE) { + document.createStyleSheet(cssFile); +} else { + var link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("href", cssFile); + link.setAttribute("type", "text/css"); + document.getElementsByTagName('head')[0].appendChild(link); +} +// --> +</script> +<div class="notepad-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> -<div style="float: left; width: 150px;" class="portlet-menu"> - <div style="padding:3px;"> - <div class="portlet-menu-caption"><bean:message key="labels.category"/></div> - <ul> +<div style="float: left; width: 150px;" class="form-table"> +<table style="width: 145px;"> + <tbody> + <tr> + <th><bean:message key="labels.category"/></th> + </tr> + <tr> + <td> + <ul style="margin:0 0 0 3px;padding:0;"> <c:forEach var="c" varStatus="s" items="${categoryItems}"> <c:if test="${notepadPager.categoryId==c.id}"> - <li class="portlet-menu-item-selected">${f:h(c.name)}</li> + <li style="list-style-type: none;font-weight: bold;margin:1px 0;">${f:h(c.name)}</li> </c:if> <c:if test="${notepadPager.categoryId!=c.id}"> - <li class="portlet-menu-item"><s:link href="select/${f:u(c.id)}">${f:h(c.name)}</s:link></li> + <li style="list-style-type: none;margin:1px 0;"><s:link href="select/${f:u(c.id)}" style="text-decoration: none;">${f:h(c.name)}</s:link></li> </c:if> </c:forEach> </ul> - </div> + </td> + </tr> + </tbody> +</table> </div> <div style="float: left;margin-left:10px;" class="list-table"> <div> -<s:link href="createpage"><bean:message key="labels.create_link"/></s:link> +<s:link href="createpage"><bean:message key="labels.create_notepad"/></s:link> | <s:link href="/user/category/"><bean:message key="labels.category_list"/></s:link> </div> @@ -33,38 +56,43 @@ <thead> <tr> <th style="width:300px;text-align: center;"><bean:message key="labels.name"/></th> + <th style="width:100px;text-align: center;""><bean:message key="labels.createdBy"/></th> <th style="width:100px;text-align: center;""><bean:message key="labels.order"/></th> - <th style="width:50px;text-align: center;"> </th> + <th style="width:100px;text-align: center;"> </th> </tr> </thead> <tbody> <c:forEach var="l" varStatus="s" items="${notepadItems}"> <tr class="${s.index %2 == 0 ? 'row1' : 'row2'}"> <td><s:link href="confirmpage/4/${f:u(l.id)}">${f:h(l.title)}</s:link></td> + <td style="text-align: center;"><bean:message key="display.name" arg0="${f:h(l.userInfoByCreatedBy.nameArg0)}" arg1="${f:h(l.userInfoByCreatedBy.nameArg1)}" arg2="${f:h(l.userInfoByCreatedBy.nameArg2)}"/></td> <td> - <c:if test="${notepadPager.categoryId!=2}"> + <c:if test="${l.notepadCategory.type=='R'||l.notepadCategory.type=='S'||l.notepadCategory.type=='D'}"> <table border="0" cellpadding="0" cellspacing="0" style="border: 0;"> <tr> <td style="width:50px;text-align: center;border: 0;"> <c:if test="${!s.last || notepadPager.currentPageNumber!=notepadPager.allPageCount}"> - <s:link href="moveup/${f:u(l.id)}"><bean:message key="labels.move_down"/></s:link> + <s:link href="movedown/${f:u(l.id)}"><bean:message key="labels.move_down"/></s:link> </c:if> </td> <td style="width:50px;text-align: center;border: 0;"> <c:if test="${!s.first || notepadPager.currentPageNumber!=1}"> - <s:link href="movedown/${f:u(l.id)}"><bean:message key="labels.move_up"/></s:link> + <s:link href="moveup/${f:u(l.id)}"><bean:message key="labels.move_up"/></s:link> </c:if> </td> </tr> </table> </c:if> - <c:if test="${notepadPager.categoryId==2}"> </c:if> + <c:if test="${l.notepadCategory.type!='R'&&l.notepadCategory.type!='S'&&l.notepadCategory.type!='D'}"> </c:if> </td> <td align="center"> + <c:if test="${l.notepadCategory.type=='R'||l.notepadCategory.type=='S'||l.notepadCategory.type=='D'}"> <s:link href="editpage/2/${f:u(l.id)}"><bean:message key="labels.edit"/></s:link> <s:link href="deletepage/3/${f:u(l.id)}"><bean:message key="labels.delete"/></s:link> + </c:if> + <c:if test="${l.notepadCategory.type!='R'&&l.notepadCategory.type!='S'&&l.notepadCategory.type!='D'}"> </c:if> </td> </tr> </c:forEach> Added: notepad/trunk/src/main/webapp/css/pal-extension.css =================================================================== --- notepad/trunk/src/main/webapp/css/pal-extension.css (rev 0) +++ notepad/trunk/src/main/webapp/css/pal-extension.css 2008-11-28 13:36:13 UTC (rev 1471) @@ -0,0 +1,216 @@ +/* +Copyright 2008 Portal Application Laboratory Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* ---------------- */ +/* Form Table */ +/* ---------------- */ +.notepad-portlet .form-table table { +border-top: 1px solid #cccccc; +border-left: 1px solid #cccccc; +border-collapse:collapse; +} + +.notepad-portlet .form-table caption { +border-top: 1px solid #cccccc; +border-left: 1px solid #cccccc; +border-right: 1px solid #cccccc; +background-color: #e8e8e8; +padding:5px; +margin:0; +font-weight: bold; +font-size:11pt; +color:#003366; +} + +.notepad-portlet .form-table thead { +margin:0; +padding:0; +} + +.notepad-portlet .form-table tbody { +margin:0; +padding:0; +} + +.notepad-portlet .form-table tfoot { +margin:0; +padding:0; +} + +.notepad-portlet .form-table th { +border-right: 1px solid #cccccc; +border-bottom: 1px solid #cccccc; +padding: 5px; +text-align: center; +background-color: #eeeeee; +empty-cells: show; +} + +.notepad-portlet .form-table td { +border-right: 1px solid #cccccc; +border-bottom: 1px solid #cccccc; +padding:3px; +empty-cells: show; +} + +.notepad-portlet .form-table tfoot tr td { +padding:10px; +text-align: center; +empty-cells: show; +} + +/* ---------------- */ +/* List Table */ +/* ---------------- */ +.notepad-portlet .list-table table { +border-top: 1px solid #cccccc; +border-left: 1px solid #cccccc; +border-collapse:collapse; +} + +.notepad-portlet .list-table caption { +border-top: 1px solid #cccccc; +border-left: 1px solid #cccccc; +border-right: 1px solid #cccccc; +background-color: #e8e8e8; +padding:5px; +margin:0; +font-weight: bold; +font-size:11pt; +color:#003366; +} + +.notepad-portlet .list-table thead { +margin:0; +padding:0; +} + +.notepad-portlet .list-table tbody { +margin:0; +padding:0; +} + +.notepad-portlet .list-table tfoot { +margin:0; +padding:0; +} + +.notepad-portlet .list-table .row1 { +background-color: #ffffff; +} + +.notepad-portlet .list-table .row2 { +background-color: #fffff8; +} + +.notepad-portlet .list-table th { +border-right: 1px solid #cccccc; +border-bottom: 1px solid #cccccc; +padding: 5px; +text-align: center; +background-color: #eeeeee; +empty-cells: show; +} + +.notepad-portlet .list-table td { +border-right: 1px solid #cccccc; +border-bottom: 1px solid #cccccc; +padding:3px; +empty-cells: show; +} + + +/* ---------------- */ +/* Tab */ +/* ---------------- */ +.notepad-portlet .tab-nav div { +height:25px; +line-height:23px; +margin:0; +padding:0; +width:100%; +} + +.notepad-portlet .tab-nav ul { +margin:0; +padding:0; +width:100%; +} + +.notepad-portlet .tab-nav ul li { +float:left; +height:25px; +line-height:23px; +list-style-image:none; +list-style-position:outside; +list-style-type:none; +} + +.notepad-portlet .tab-nav ul li a:visited { +color:#0000EE; +} + +.notepad-portlet .tab-nav ul li.first { +border-bottom:1px solid #A9A9A9; +width:10px; +} + +.notepad-portlet .tab-nav ul li.last-spacer { +border-bottom:1px solid #A9A9A9; +width:5px; +margin-right:-5px; +} + +.notepad-portlet .tab-nav ul li.last { +border-bottom:1px solid #A9A9A9; +float:none; +padding-right:10px; +text-align:right; +} + +.notepad-portlet .tab-nav ul li.selected { +border-color:#A9A9A9 #A9A9A9 #FFFFFF; +border-style:solid; +border-width:1px; +display:block; +margin:-1px; +_margin-top: 0px; +} + +.notepad-portlet .tab-nav ul li.selected span { +display:inline; +padding:0 10px; +white-space:pre; +} + +.notepad-portlet .tab-nav ul li.selectable { +background-color:#DCDCDC; +border:1px solid #A9A9A9; +display:block; +height:24px; +} + +.notepad-portlet .tab-nav ul li.selectable { +display:inline; +padding:0 10px; +white-space:pre; +} + +.notepad-portlet .tab-nav ul li.spacer { +border-bottom:1px solid #A9A9A9; +width:5px; +} + Property changes on: notepad/trunk/src/main/webapp/css/pal-extension.css ___________________________________________________________________ Name: svn:eol-style + native