From 67d3015b1951297838a52ebe7c2f2e0aeeb59ed1 Mon Sep 17 00:00:00 2001 From: quasi Date: Mon, 15 Apr 2013 12:08:16 +0000 Subject: [PATCH] SearchWidget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Suchmaske ist nun in der linken Spalte und für alle Varianten gleich git-svn-id: https://svn.libreccm.org/ccm/trunk@2124 8810af33-2d31-482b-a856-94f89814c4df --- .../com/arsdigita/cms/ui/ContentSectionPage.java | 13 +++++-------- .../com/arsdigita/cms/ui/ItemSearchSection.java | 15 +++++++++++---- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ccm-cms/src/com/arsdigita/cms/ui/ContentSectionPage.java b/ccm-cms/src/com/arsdigita/cms/ui/ContentSectionPage.java index 4aaecbd9c..2548bfccc 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/ContentSectionPage.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/ContentSectionPage.java @@ -44,7 +44,6 @@ import com.arsdigita.cms.ui.workflow.WorkflowAdminPane; import com.arsdigita.cms.util.SecurityConstants; import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.kernel.User; -import com.arsdigita.toolbox.ui.LayoutPanel; import com.arsdigita.ui.DebugPanel; import com.arsdigita.util.Assert; import com.arsdigita.web.Web; @@ -132,7 +131,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener { private FolderAdminPane m_folderPane; private BrowsePane m_browsePane; - private LayoutPanel m_searchPane; + private ItemSearch m_searchPane; private ImagesPane m_imagesPane; private RoleAdminPane m_rolePane; private WorkflowAdminPane m_workflowPane; @@ -240,11 +239,9 @@ public class ContentSectionPage extends CMSPage implements ActionListener { * Creates, and then caches, the search pane. Overriding this * method to return null will prevent this tab from appearing. */ - protected LayoutPanel getSearchPane() { + protected ItemSearch getSearchPane() { if (m_searchPane == null) { - m_searchPane = new LayoutPanel(); - m_searchPane.setLeft(new SimpleComponent()); - m_searchPane.setBody(new ItemSearch(ContentItem.DRAFT, CMS.getConfig().limitToContentSection())); + m_searchPane = new ItemSearch(ContentItem.DRAFT, CMS.getConfig().limitToContentSection()); } return m_searchPane; } @@ -254,8 +251,8 @@ public class ContentSectionPage extends CMSPage implements ActionListener { m_imagesPane = new ImagesPane(); } return m_imagesPane; - } - + } + protected RoleAdminPane getRoleAdminPane() { if (m_rolePane == null) { m_rolePane = new RoleAdminPane(); diff --git a/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchSection.java b/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchSection.java index a0efa346e..9a1424dec 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchSection.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchSection.java @@ -35,6 +35,7 @@ import com.arsdigita.cms.ui.search.ItemQueryComponent; import com.arsdigita.search.ui.ResultsPane; import com.arsdigita.search.ui.QueryGenerator; import com.arsdigita.search.QuerySpecification; +import com.arsdigita.toolbox.ui.LayoutPanel; /** * Contains a form for specifying search parameters, as well as a @@ -98,8 +99,14 @@ public class ItemSearchSection extends FormSection } m_results = createResultsPane(m_query); - addQueryGenerator(this); - addResultsPane(this); + + LayoutPanel searchPanel = new LayoutPanel(); + searchPanel.setLeft(m_query); + searchPanel.setBody(m_results); + this.add(searchPanel); + +// addQueryGenerator(this); +// addResultsPane(this); addFormListener(); setClassAttr("itemSearch"); @@ -121,7 +128,7 @@ public class ItemSearchSection extends FormSection boolean limitToContentSection) { return new ItemQueryComponent(context, limitToContentSection); } - + protected ItemQueryComponent createQueryGenerator(String context, boolean limitToContentSection, ContentType type) { @@ -156,7 +163,7 @@ public class ItemSearchSection extends FormSection p.setVisibleDefault(m_results, false); p.addGlobalStateParam(new BigDecimalParameter(SINGLE_TYPE_PARAM)); } - + /** * Displays the "keywords" and "content types" widgets */