protected void configureFoldable(IMenu menu) {
if(!isFoldable()) {
return;
}
if(isAjaxFoldable()) {
menu.addMenuItem(new JqAjaxLink(menu.newItemId(), JQIcon.ui_icon_circle_minus, "Fold") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
setFolded(true);
target.addComponent(RoundPanel.this.menu);
//target.appendJavascript(new JsStatement().$(body).chain(new FadeOut(EffectSpeed.FAST)).render(true).toString());
target.appendJavascript(root.getMarkupId()+".toggleFold();");
}
@Override
public boolean isVisible() {
return !folded;
}
});
menu.addMenuItem(new JqAjaxLink(menu.newItemId(), JQIcon.ui_icon_circle_plus, "Unfold") {
private static final long serialVersionUID = 1L;
@Override