if (mockupStyle != null) {
addStyleName(mockupStyle);
}
removeAll();
LayoutContainer dash = new LayoutContainer();
dash.addStyleName("dashedArea");
ctn = new LayoutContainer();
// ctn.addStyleName(moduleType+"Template");
ctn.addText(headerText);
Button button = new Button(Messages.get("label.areaEnable", "Enable area"));
button.setStyleName("button-placeholder");
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
createNode(new BaseAsyncCallback<GWTJahiaNode>() {
public void onSuccess(GWTJahiaNode result) {
mainModule.getEditLinker().refresh(EditLinker.REFRESH_MAIN);
}
});
}
});
ctn.add(button);
// dash.add(ctn);
// dash.add(html);
removeAll();
add(ctn);
// add(dash);
setBorders(false);
} else if (childCount == 0) {
addStyleName("area-empty");
headerText += " (" + Messages.get("label.empty", "empty")+ ")";
addStyleName(moduleType);
if (mockupStyle != null) {
addStyleName(mockupStyle);
}
removeAll();
LayoutContainer dash = new LayoutContainer();
dash.addStyleName("dashedArea");
ctn = new LayoutContainer();
ctn.addStyleName(moduleType+"Template");
ctn.addText(headerText);
Button button = new Button(Messages.get("label.areaDisable", "Disable area"));
button.setStyleName("button-placeholder");
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
JahiaContentManagementService.App.getInstance().deletePaths(Arrays.asList(path), new BaseAsyncCallback<GWTJahiaNode>() {
public void onSuccess(GWTJahiaNode result) {
mainModule.getEditLinker().refresh(EditLinker.REFRESH_MAIN);
}
});
}
});
ctn.add(button);
dash.add(ctn);
dash.add(html);
add(dash);
} else {
setBorders(false);
}