From afaff626c98ddb01bf1bb7046c6caa6963ac6b92 Mon Sep 17 00:00:00 2001 From: pb Date: Mon, 13 Sep 2010 10:36:06 +0000 Subject: [PATCH] Diverse kleine Anpassungen / Ergaenzungen, Folge der Ueberarbeitung von Forum. git-svn-id: https://svn.libreccm.org/ccm/trunk@532 8810af33-2d31-482b-a856-94f89814c4df --- .../plugins/CCMInsertImage/placeholder.txt | 1 + .../plugins/CCMInsertLink/placeholder.txt | 1 + .../src/com/arsdigita/bebop/form/Option.java | 2 +- .../com/arsdigita/bebop/form/OptionGroup.java | 7 ++-- .../globalization/GlobalizedMessage.java | 2 - .../permissions/PrivilegeDescriptor.java | 6 ++- .../forum/categorised/AssignCategoryView.java | 24 +++++++++--- .../CategorisedForumComponent.java | 29 ++++++++++----- .../CategorisedForumPageBuilder.java | 4 +- .../categorised/ForumCategorySummary.java | 22 ++++++++--- .../categorised/ForumNavigationModel.java | 25 ++++++++++--- .../forum/categorised/Initializer.java | 37 +++++++++++-------- 12 files changed, 108 insertions(+), 52 deletions(-) create mode 100644 ccm-cms/web/assets/Xinha/plugins/CCMInsertImage/placeholder.txt create mode 100644 ccm-cms/web/assets/Xinha/plugins/CCMInsertLink/placeholder.txt diff --git a/ccm-cms/web/assets/Xinha/plugins/CCMInsertImage/placeholder.txt b/ccm-cms/web/assets/Xinha/plugins/CCMInsertImage/placeholder.txt new file mode 100644 index 000000000..082fc1a7e --- /dev/null +++ b/ccm-cms/web/assets/Xinha/plugins/CCMInsertImage/placeholder.txt @@ -0,0 +1 @@ +Directory for the CCMInsertImage plugin. diff --git a/ccm-cms/web/assets/Xinha/plugins/CCMInsertLink/placeholder.txt b/ccm-cms/web/assets/Xinha/plugins/CCMInsertLink/placeholder.txt new file mode 100644 index 000000000..75d915efb --- /dev/null +++ b/ccm-cms/web/assets/Xinha/plugins/CCMInsertLink/placeholder.txt @@ -0,0 +1 @@ +Directory for the CCMInsertLink plugin. diff --git a/ccm-core/src/com/arsdigita/bebop/form/Option.java b/ccm-core/src/com/arsdigita/bebop/form/Option.java index b8db1dfbd..55e588aa6 100755 --- a/ccm-core/src/com/arsdigita/bebop/form/Option.java +++ b/ccm-core/src/com/arsdigita/bebop/form/Option.java @@ -49,7 +49,7 @@ public class Option extends BlockStylable { /** - * This creates an Option whose component is a lable consisting of the + * This creates an Option whose component is a label consisting of the * string that is passed in. */ public Option(String value, String label) { diff --git a/ccm-core/src/com/arsdigita/bebop/form/OptionGroup.java b/ccm-core/src/com/arsdigita/bebop/form/OptionGroup.java index 6cb22c960..e22b9a0d0 100755 --- a/ccm-core/src/com/arsdigita/bebop/form/OptionGroup.java +++ b/ccm-core/src/com/arsdigita/bebop/form/OptionGroup.java @@ -37,9 +37,8 @@ import javax.servlet.http.HttpServletRequestWrapper; import org.apache.log4j.Logger; /** - * A class - * representing any widget that contains a list options. - * + * A class representing any widget that contains a list options. + * * @author Karl Goldstein * @author Uday Mathur * @author Rory Solomon @@ -103,7 +102,7 @@ public abstract class OptionGroup extends Widget } /** - * Returns an Iterator of all the default Options in this group, + * Returns an Iterator of all the default Options in this group, * plus any request-specific options. */ public Iterator getOptions(PageState ps) { diff --git a/ccm-core/src/com/arsdigita/globalization/GlobalizedMessage.java b/ccm-core/src/com/arsdigita/globalization/GlobalizedMessage.java index 25896ba29..8f235bea4 100755 --- a/ccm-core/src/com/arsdigita/globalization/GlobalizedMessage.java +++ b/ccm-core/src/com/arsdigita/globalization/GlobalizedMessage.java @@ -162,7 +162,6 @@ public class GlobalizedMessage { /** *

- *
* Localize this message. If no message is found the key is returned as * the message. This is done so that developers or translators can see the * messages that still need localization. @@ -185,7 +184,6 @@ public class GlobalizedMessage { /** *

- *
* Localize this message according the specified request. If no message is * found the key is returned as the message. This is done so that * developers or translators can see the messages that still need diff --git a/ccm-core/src/com/arsdigita/kernel/permissions/PrivilegeDescriptor.java b/ccm-core/src/com/arsdigita/kernel/permissions/PrivilegeDescriptor.java index fb6753d9d..9a6c1d745 100755 --- a/ccm-core/src/com/arsdigita/kernel/permissions/PrivilegeDescriptor.java +++ b/ccm-core/src/com/arsdigita/kernel/permissions/PrivilegeDescriptor.java @@ -37,7 +37,7 @@ import java.util.Map; * @author Oumi Mehrotra * @version 1.0 * @version $Id: PrivilegeDescriptor.java 1311 2006-09-04 10:30:53Z sskracic $ - **/ + */ public class PrivilegeDescriptor { private static final String ADMIN_NAME = "admin"; @@ -50,7 +50,8 @@ public class PrivilegeDescriptor { /** * The PrivilegeDescriptor corresponding to the primitive admin privilege */ - public static final PrivilegeDescriptor ADMIN = new PrivilegeDescriptor(ADMIN_NAME); + public static final PrivilegeDescriptor ADMIN = + new PrivilegeDescriptor(ADMIN_NAME); /** * The PrivilegeDescriptor corresponding to the read and write privilege @@ -80,6 +81,7 @@ public class PrivilegeDescriptor { * The PrivilegeDescriptor corresponding to the primitive delete privilege */ public static final PrivilegeDescriptor DELETE = + // new PrivilegeDescriptor(DELETE_NAME); new PrivilegeDescriptor(DELETE_NAME); private String m_displayName; diff --git a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/AssignCategoryView.java b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/AssignCategoryView.java index 46f732098..d47e22205 100644 --- a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/AssignCategoryView.java +++ b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/AssignCategoryView.java @@ -1,8 +1,20 @@ /* - * Created on 09-Feb-06 + * Copyright (C) 2006 Chris Gilbert. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments */ package com.arsdigita.forum.categorised; @@ -25,10 +37,10 @@ import com.arsdigita.forum.ui.Constants; import com.arsdigita.web.RedirectSignal; /** - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments. + * + * * - * @author cgyg9330 + * @author Chris Gilbert * @version $Id: $ */ public class AssignCategoryView extends SimpleContainer implements Constants { diff --git a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/CategorisedForumComponent.java b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/CategorisedForumComponent.java index f941df55b..c68ec709b 100644 --- a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/CategorisedForumComponent.java +++ b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/CategorisedForumComponent.java @@ -1,8 +1,20 @@ /* - * Created on 09-Feb-06 + * Copyright (C) 2006 Chris Gilbert. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments */ package com.arsdigita.forum.categorised; @@ -11,7 +23,7 @@ package com.arsdigita.forum.categorised; import com.arsdigita.bebop.PageState; import com.arsdigita.forum.Forum; import com.arsdigita.forum.ForumContext; -import com.arsdigita.forum.ui.ForumComponent; +import com.arsdigita.forum.ui.ForumUserCompactView; import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Party; import com.arsdigita.kernel.permissions.PermissionDescriptor; @@ -21,13 +33,13 @@ import com.arsdigita.kernel.security.UserContext; import com.arsdigita.xml.Element; /** - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments * - * @author cgyg9330 + * + * + * @author Chris Gilbert * @version $Id: $ */ -public class CategorisedForumComponent extends ForumComponent { +public class CategorisedForumComponent extends ForumUserCompactView { public static final String MODE_CATEGORIES = "categories"; @@ -41,7 +53,6 @@ public class CategorisedForumComponent extends ForumComponent { m_categoryView = new AssignCategoryView(); add(m_categoryView); - // TODO Auto-generated constructor stub } protected void setVisible( diff --git a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/CategorisedForumPageBuilder.java b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/CategorisedForumPageBuilder.java index e03230912..a8428eae0 100644 --- a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/CategorisedForumPageBuilder.java +++ b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/CategorisedForumPageBuilder.java @@ -11,7 +11,7 @@ import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.forum.Forum; import com.arsdigita.forum.ForumContext; import com.arsdigita.forum.ForumPageBuilder; -import com.arsdigita.forum.ui.ForumComponent; +import com.arsdigita.forum.ui.ForumUserCompactView; import com.arsdigita.kernel.ACSObject; import com.arsdigita.london.navigation.ui.category.Menu; import com.arsdigita.london.navigation.ui.category.Path; @@ -36,7 +36,7 @@ public class CategorisedForumPageBuilder extends ForumPageBuilder { } - protected ForumComponent getForumComponent() { + protected ForumUserCompactView getForumComponent() { return new CategorisedForumComponent(); } diff --git a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/ForumCategorySummary.java b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/ForumCategorySummary.java index 59030bf93..a765d4f06 100644 --- a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/ForumCategorySummary.java +++ b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/ForumCategorySummary.java @@ -1,8 +1,20 @@ /* - * Created on 22-Feb-06 + * Copyright (C) 2006 Chris Gilbert. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments */ package com.arsdigita.forum.categorised; @@ -16,10 +28,10 @@ import com.arsdigita.forum.ui.Constants; import com.arsdigita.kernel.ACSObject; /** - * @author cgyg9330 - * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments + * + * @author Chris Gilbert (cgyg9330) */ public class ForumCategorySummary extends ACSObjectCategorySummary implements Constants { diff --git a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/ForumNavigationModel.java b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/ForumNavigationModel.java index 22fb39a22..23944bb6f 100644 --- a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/ForumNavigationModel.java +++ b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/ForumNavigationModel.java @@ -1,8 +1,20 @@ /* - * Created on 04-Aug-05 + * Copyright (C) 2006 Chris Gilbert. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments */ package com.arsdigita.forum.categorised; @@ -26,10 +38,11 @@ import com.arsdigita.london.terms.Util; import com.arsdigita.web.Application; /** - * @author cgyg9330 + * Navigation model that retrieves the path to one navigation category that the + * forum is allocated to if there is no cookie available * - * Navigation model that retrieves the path to one navigation category that the forum is allocated to - * if there is no cookie available + * @author Chris Gilbert (cgyg9330) + * @version $Id: $ */ public class ForumNavigationModel extends CookieNavigationModel { diff --git a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/Initializer.java b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/Initializer.java index 6d35f8a93..dcd96d4c8 100644 --- a/ccm-forum-categorised/src/com/arsdigita/forum/categorised/Initializer.java +++ b/ccm-forum-categorised/src/com/arsdigita/forum/categorised/Initializer.java @@ -17,10 +17,10 @@ * */ package com.arsdigita.forum.categorised; -import com.arsdigita.db.DbHelper; -import com.arsdigita.bebop.RequestLocal; +// import com.arsdigita.db.DbHelper; +// import com.arsdigita.bebop.RequestLocal; -import com.arsdigita.domain.xml.TraversalHandler; +// import com.arsdigita.domain.xml.TraversalHandler; import com.arsdigita.persistence.pdl.ManifestSource; import com.arsdigita.persistence.pdl.NameFilter; @@ -62,7 +62,7 @@ import com.arsdigita.web.ui.ApplicationConfigFormSection; import org.apache.log4j.Logger; /** - * The forum initializer. + * The forum-categorized initializer. * * @author Justin Ross <jross@redhat.com> * @version $Id: Initializer.java,v 1.1 2006/03/03 10:54:45 cgyg9330 Exp $ @@ -71,15 +71,22 @@ public class Initializer extends CompoundInitializer { private static final Logger s_log = Logger.getLogger(Initializer.class); - - public void init(LegacyInitEvent e) { - super.init(e); - ForumPageFactory.registerPageBuilder(ForumPageFactory.FORUM_PAGE, new CategorisedForumPageBuilder()); - ForumPageFactory.registerPageBuilder(ForumPageFactory.THREAD_PAGE, new CategorisedThreadPageBuilder()); - ForumPageFactory.registerPageBuilder("load-cat.jsp", new CategorySubtreePageBuilder()); - URLService.registerFinder(Forum.BASE_DATA_OBJECT_TYPE, new ForumURLFinder()); - - - } - + public void init(LegacyInitEvent e) { + + super.init(e); + ForumPageFactory.registerPageBuilder( + ForumPageFactory.FORUM_PAGE, + new CategorisedForumPageBuilder()); + ForumPageFactory.registerPageBuilder( + ForumPageFactory.THREAD_PAGE, + new CategorisedThreadPageBuilder()); + ForumPageFactory.registerPageBuilder( + "load-cat.jsp", + new CategorySubtreePageBuilder()); + URLService.registerFinder( + Forum.BASE_DATA_OBJECT_TYPE, + new ForumURLFinder()); + + } + }