Admin-Tabs werden jetzt im Heirloom-Theme wieder korrekt dargestellt. Bei GroupAdministration gibt es allerdings in Mandalay noch ein Darstellungsproblem.

git-svn-id: https://svn.libreccm.org/ccm/trunk@2288 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2013-08-02 17:57:54 +00:00
parent 30b81e3a26
commit e324aa9d2b
3 changed files with 34 additions and 27 deletions

View File

@ -20,14 +20,13 @@ package com.arsdigita.ui.admin;
import com.arsdigita.bebop.BoxPanel;
import com.arsdigita.bebop.Form;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.Page;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.SimpleContainer;
import com.arsdigita.bebop.Tree;
import com.arsdigita.bebop.event.ChangeEvent;
import com.arsdigita.bebop.event.ChangeListener;
import com.arsdigita.toolbox.ui.LayoutPanel;
import com.arsdigita.toolbox.ui.Section;
import com.arsdigita.ui.admin.applications.ApplicationInstancePane;
import com.arsdigita.ui.admin.applications.ApplicationManager;
import com.arsdigita.ui.admin.applications.BaseApplicationPane;
@ -40,11 +39,10 @@ import com.arsdigita.web.ApplicationType;
import com.arsdigita.web.ApplicationTypeCollection;
import java.util.HashMap;
import java.util.Map;
import java.util.ServiceLoader;
/**
* A tab for managing Application and application instances.
*
*
* @author pb
* @author Jens Pelzetter
*/
@ -52,7 +50,7 @@ public class ApplicationsAdministrationTab extends BoxPanel implements AdminCons
private final Tree applicationTree;
private final Map<String, BaseApplicationPane> appPanes = new HashMap<String, BaseApplicationPane>();
private final Map<String, ApplicationInstancePane> instancePanes = new HashMap<String, ApplicationInstancePane>();
private final Map<String, ApplicationInstancePane> instancePanes = new HashMap<String, ApplicationInstancePane>();
/**
* Constructor
@ -67,16 +65,22 @@ public class ApplicationsAdministrationTab extends BoxPanel implements AdminCons
applicationTree = new Tree(new ApplicationTreeModelBuilder());
applicationTree.addChangeListener(new TreeStateChangeListener());
final Section treeSection = new Section();
treeSection.setHeading(GlobalizationUtil.globalize("ui.admin.applications.tree.heading"));
treeSection.setBody(applicationTree);
//final Section treeSection = new Section();
//treeSection.setHeading(GlobalizationUtil.globalize("ui.admin.applications.tree.heading"));
//treeSection.setBody(applicationTree);
//final LayoutPanel panel = new LayoutPanel();
//panel.setLeft(treeSection);
final BoxPanel panel = new BoxPanel(BoxPanel.HORIZONTAL);
panel.setClassAttr("navbar");
//panel.add(treeSection);
panel.add(applicationTree);
final LayoutPanel panel = new LayoutPanel();
panel.setLeft(treeSection);
final ApplicationTypeCollection applicationTypes = ApplicationType.retrieveAllApplicationTypes();
final Map<String, ApplicationManager<?>> appManagers = ApplicationManagers.getInstance().getApplicationManagers();
final Map<String, ApplicationManager<?>> appManagers = ApplicationManagers.getInstance().
getApplicationManagers();
while (applicationTypes.next()) {
if (applicationTypes.getApplicationType().isSingleton()) {
@ -87,6 +91,7 @@ public class ApplicationsAdministrationTab extends BoxPanel implements AdminCons
}
final BoxPanel appPanel = new BoxPanel();
appPanel.setClassAttr("main");
for (Map.Entry<String, BaseApplicationPane> entry : appPanes.entrySet()) {
appPanel.add(entry.getValue());
}
@ -94,7 +99,8 @@ public class ApplicationsAdministrationTab extends BoxPanel implements AdminCons
for (Map.Entry<String, ApplicationInstancePane> entry : instancePanes.entrySet()) {
appPanel.add(entry.getValue());
}
panel.setRight(appPanel);
//panel.setRight(appPanel);
panel.add(appPanel);
add(panel);
}
@ -119,7 +125,6 @@ public class ApplicationsAdministrationTab extends BoxPanel implements AdminCons
//
// return appManagers;
// }
private void createSingletonAppPane(final ApplicationType applicationType,
final Map<String, ApplicationManager<?>> appManagers) {
final String appObjectType = applicationType.getApplicationObjectType();
@ -189,11 +194,11 @@ public class ApplicationsAdministrationTab extends BoxPanel implements AdminCons
// if (visiblePane != null) {
// visiblePane.setVisible(state, false);
// }
for(Map.Entry<String, BaseApplicationPane> entry : appPanes.entrySet()) {
for (Map.Entry<String, BaseApplicationPane> entry : appPanes.entrySet()) {
entry.getValue().setVisible(state, false);
}
for(Map.Entry<String, ApplicationInstancePane> entry : instancePanes.entrySet()) {
for (Map.Entry<String, ApplicationInstancePane> entry : instancePanes.entrySet()) {
entry.getValue().setVisible(state, false);
}
@ -227,6 +232,5 @@ public class ApplicationsAdministrationTab extends BoxPanel implements AdminCons
}
}
}
}
}

View File

@ -146,15 +146,15 @@ class GroupAdministrationTab extends BoxPanel implements AdminConstants, ChangeL
};
//BoxPanel panel = new BoxPanel(BoxPanel.HORIZONTAL);
final LayoutPanel panel = new LayoutPanel();
BoxPanel panel = new BoxPanel(BoxPanel.HORIZONTAL);
//final LayoutPanel panel = new LayoutPanel();
panel.setClassAttr("navbar");
//m_tree = new Tree(new GroupTreeModel());
groupTree = new Tree(new GroupTreeModelBuilder());
groupTree.addChangeListener(this);
//panel.add(m_tree);
panel.setLeft(groupTree);
panel.add(groupTree);
//panel.setLeft(groupTree);
add(panel);
@ -185,8 +185,8 @@ class GroupAdministrationTab extends BoxPanel implements AdminConstants, ChangeL
groupDeleteFailedPanel = buildGroupDeleteFailedPanel(rightSide);
panelList.add(groupDeleteFailedPanel);
//add(rightSide);
panel.setRight(rightSide);
add(rightSide);
//panel.setRight(rightSide);
}
public void displayAddGroupPanel(final PageState state) {

View File

@ -55,13 +55,15 @@ class UserAdministrationTab extends SimpleContainer implements AdminConstants {
public UserAdministrationTab(final TabbedPane parent, final GroupAdministrationTab groupAdminTab) {
super();
final LayoutPanel panel = new LayoutPanel();
//final LayoutPanel panel = new LayoutPanel();
final BoxPanel panel = new BoxPanel(BoxPanel.HORIZONTAL);
setClassAttr("sidebarNavPanel");
sections = new List(new GlobalizedTabModelBuilder());
sections.addChangeListener(new SectionChangeListener());
sections.setClassAttr("navbar");
panel.setLeft(sections);
//panel.setLeft(sections);
panel.add(sections);
final UserBrowsePane browsePane = new UserBrowsePane();
final UserSummarySection summarySection = new UserSummarySection(this, browsePane);
@ -76,7 +78,8 @@ class UserAdministrationTab extends SimpleContainer implements AdminConstants {
addSection(USER_TAB_SEARCH, searchSection, right);
addSection(USER_TAB_CREATE_USER, createSection, right);
panel.setRight(right);
//panel.setRight(right);
panel.add(right);
add(panel);
}