Weitere kleine Anpassungen an den Admin-Tabs
git-svn-id: https://svn.libreccm.org/ccm/trunk@2305 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
b206915e21
commit
860088e3c0
|
|
@ -49,8 +49,10 @@ import java.util.Map;
|
|||
public class ApplicationsAdministrationTab extends LayoutPanel implements AdminConstants {
|
||||
|
||||
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, BaseApplicationPane> appPanes =
|
||||
new HashMap<String, BaseApplicationPane>();
|
||||
private final Map<String, ApplicationInstancePane> instancePanes =
|
||||
new HashMap<String, ApplicationInstancePane>();
|
||||
private final BoxPanel appPanel;
|
||||
|
||||
/**
|
||||
|
|
@ -65,13 +67,14 @@ public class ApplicationsAdministrationTab extends LayoutPanel implements AdminC
|
|||
|
||||
applicationTree = new Tree(new ApplicationTreeModelBuilder());
|
||||
applicationTree.addChangeListener(new TreeStateChangeListener());
|
||||
|
||||
|
||||
setClassAttr("navbar");
|
||||
|
||||
|
||||
setLeft(applicationTree);
|
||||
|
||||
|
||||
final ApplicationTypeCollection applicationTypes = ApplicationType.retrieveAllApplicationTypes();
|
||||
final ApplicationTypeCollection applicationTypes = ApplicationType.
|
||||
retrieveAllApplicationTypes();
|
||||
|
||||
final Map<String, ApplicationManager<?>> appManagers = ApplicationManagers.getInstance().
|
||||
getApplicationManagers();
|
||||
|
|
@ -83,7 +86,7 @@ public class ApplicationsAdministrationTab extends LayoutPanel implements AdminC
|
|||
createAppPane(applicationTypes.getApplicationType(), appManagers);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
appPanel = new BoxPanel();
|
||||
appPanel.setClassAttr("main");
|
||||
for (Map.Entry<String, BaseApplicationPane> entry : appPanes.entrySet()) {
|
||||
|
|
@ -93,7 +96,7 @@ public class ApplicationsAdministrationTab extends LayoutPanel implements AdminC
|
|||
for (Map.Entry<String, ApplicationInstancePane> entry : instancePanes.entrySet()) {
|
||||
appPanel.add(entry.getValue());
|
||||
}
|
||||
|
||||
|
||||
//setRight(appPanel);
|
||||
setBody(appPanel);
|
||||
}
|
||||
|
|
@ -116,7 +119,8 @@ public class ApplicationsAdministrationTab extends LayoutPanel implements AdminC
|
|||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
private void createAppPane(final ApplicationType applicationType,
|
||||
final Map<String, ApplicationManager<?>> appManagers) {
|
||||
final ApplicationManager<?> appManager = appManagers.get(applicationType.getApplicationObjectType());
|
||||
final ApplicationManager<?> appManager = appManagers.get(applicationType.
|
||||
getApplicationObjectType());
|
||||
final Form createForm;
|
||||
if (appManager == null) {
|
||||
createForm = null;
|
||||
|
|
@ -124,22 +128,25 @@ public class ApplicationsAdministrationTab extends LayoutPanel implements AdminC
|
|||
createForm = appManager.getApplicationCreateForm();
|
||||
}
|
||||
|
||||
final MultiInstanceApplicationPane<?> appPane = new MultiInstanceApplicationPane(applicationType, createForm);
|
||||
final MultiInstanceApplicationPane<?> appPane = new MultiInstanceApplicationPane(
|
||||
applicationType, createForm);
|
||||
appPanes.put(applicationType.getApplicationObjectType(), appPane);
|
||||
createInstancePane(applicationType, appManagers);
|
||||
}
|
||||
|
||||
private void createInstancePane(final ApplicationType applicationType,
|
||||
final Map<String, ApplicationManager<?>> managementForms) {
|
||||
final ApplicationManager<?> manager = managementForms.get(applicationType.getApplicationObjectType());
|
||||
final ApplicationManager<?> manager = managementForms.get(applicationType.
|
||||
getApplicationObjectType());
|
||||
final ApplicationInstancePane instPane;
|
||||
if (manager == null) {
|
||||
instPane = new ApplicationInstancePane(null);
|
||||
} else {
|
||||
instPane = new ApplicationInstancePane(managementForms.get(applicationType.getApplicationObjectType()).
|
||||
instPane = new ApplicationInstancePane(managementForms.get(applicationType.
|
||||
getApplicationObjectType()).
|
||||
getApplicationAdminForm());
|
||||
}
|
||||
|
||||
|
||||
instancePanes.put(applicationType.getApplicationObjectType(), instPane);
|
||||
}
|
||||
|
||||
|
|
@ -163,7 +170,7 @@ public class ApplicationsAdministrationTab extends LayoutPanel implements AdminC
|
|||
entry.getValue().setVisible(state, false);
|
||||
}
|
||||
|
||||
pane.setVisible(state, true);
|
||||
pane.setVisible(state, true);
|
||||
}
|
||||
|
||||
private class TreeStateChangeListener implements ChangeListener {
|
||||
|
|
@ -190,15 +197,17 @@ public class ApplicationsAdministrationTab extends LayoutPanel implements AdminC
|
|||
applications.addEqualsFilter(Application.PRIMARY_URL, selectedKey + "/");
|
||||
final ApplicationInstancePane pane;
|
||||
if (applications.next()) {
|
||||
final Application application = applications.getApplication();
|
||||
final Application application = applications.getApplication();
|
||||
pane = instancePanes.get(application.getClass().getName());
|
||||
pane.setApplication(application);
|
||||
if (pane != null) {
|
||||
pane.setApplication(application);
|
||||
}
|
||||
} else {
|
||||
pane = null;
|
||||
}
|
||||
|
||||
if (pane != null) {
|
||||
setPaneVisible(pane, state);
|
||||
|
||||
if (pane != null) {
|
||||
setPaneVisible(pane, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ import com.arsdigita.bebop.Page;
|
|||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.RequestLocal;
|
||||
import com.arsdigita.bebop.SegmentedPanel;
|
||||
import com.arsdigita.bebop.SimpleContainer;
|
||||
import com.arsdigita.bebop.Tree;
|
||||
import com.arsdigita.bebop.event.ActionEvent;
|
||||
import com.arsdigita.bebop.event.ActionListener;
|
||||
|
|
@ -155,34 +154,34 @@ class GroupAdministrationTab extends LayoutPanel implements AdminConstants, Chan
|
|||
groupTree.addChangeListener(this);
|
||||
setLeft(groupTree);
|
||||
|
||||
final SegmentedPanel rightSide = new SegmentedPanel();
|
||||
rightSide.setClassAttr("main");
|
||||
final SegmentedPanel body = new SegmentedPanel();
|
||||
body.setClassAttr("main");
|
||||
|
||||
groupInfoPanel = buildGroupInfoPanel(rightSide);
|
||||
groupInfoPanel = buildGroupInfoPanel(body);
|
||||
panelList.add(groupInfoPanel);
|
||||
|
||||
groupEditPanel = buildGroupEditPanel(rightSide);
|
||||
groupEditPanel = buildGroupEditPanel(body);
|
||||
panelList.add(groupEditPanel);
|
||||
|
||||
subGroupPanel = buildSubGroupPanel(rightSide);
|
||||
subGroupPanel = buildSubGroupPanel(body);
|
||||
panelList.add(subGroupPanel);
|
||||
|
||||
groupAddPanel = buildGroupAddPanel(rightSide);
|
||||
groupAddPanel = buildGroupAddPanel(body);
|
||||
panelList.add(groupAddPanel);
|
||||
|
||||
existingGroupAddPanel = buildExistingGroupAddPanel(rightSide);
|
||||
existingGroupAddPanel = buildExistingGroupAddPanel(body);
|
||||
panelList.add(existingGroupAddPanel);
|
||||
|
||||
subMemberPanel = buildMemberListPanel(rightSide);
|
||||
subMemberPanel = buildMemberListPanel(body);
|
||||
panelList.add(subMemberPanel);
|
||||
|
||||
extremeActionPanel = buildExtremeActionPanel(rightSide);
|
||||
extremeActionPanel = buildExtremeActionPanel(body);
|
||||
panelList.add(extremeActionPanel);
|
||||
|
||||
groupDeleteFailedPanel = buildGroupDeleteFailedPanel(rightSide);
|
||||
groupDeleteFailedPanel = buildGroupDeleteFailedPanel(body);
|
||||
panelList.add(groupDeleteFailedPanel);
|
||||
|
||||
setRight(rightSide);
|
||||
setBody(body);
|
||||
}
|
||||
|
||||
public void displayAddGroupPanel(final PageState state) {
|
||||
|
|
|
|||
|
|
@ -69,12 +69,12 @@ class UserAdministrationTab extends LayoutPanel implements AdminConstants {
|
|||
browsePane.setTabbedPane(parent);
|
||||
browsePane.setGroupAdministrationTab(groupAdminTab);
|
||||
|
||||
final BoxPanel right = new BoxPanel();
|
||||
addSection(USER_TAB_SUMMARY, summarySection, right);
|
||||
addSection(USER_TAB_SEARCH, searchSection, right);
|
||||
addSection(USER_TAB_CREATE_USER, createSection, right);
|
||||
final BoxPanel body = new BoxPanel();
|
||||
addSection(USER_TAB_SUMMARY, summarySection, body);
|
||||
addSection(USER_TAB_SEARCH, searchSection, body);
|
||||
addSection(USER_TAB_CREATE_USER, createSection, body);
|
||||
|
||||
setRight(right);
|
||||
setBody(body);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue