Search in sources :

Example 11 with AuScript

use of org.zkoss.zk.au.out.AuScript in project adempiere by adempiere.

the class NavBar2Desktop method autoHideMenu.

private void autoHideMenu() {
    if (layout.getWest().isCollapsible() && !layout.getWest().isOpen()) {
        //using undocumented js api, need to be retested after every version upgrade
        String id = layout.getWest().getUuid() + "!real";
        String btn = layout.getWest().getUuid() + "!btn";
        String script = "zk.show('" + id + "', false);";
        script += "$e('" + id + "')._isSlide = false;";
        script += "$e('" + id + "')._lastSize = null;";
        script += "$e('" + btn + "').style.display = '';";
        AuScript aus = new AuScript(layout.getWest(), script);
        Clients.response("autoHideWest", aus);
    }
}
Also used : AuScript(org.zkoss.zk.au.out.AuScript)

Example 12 with AuScript

use of org.zkoss.zk.au.out.AuScript in project adempiere by adempiere.

the class LayoutUtils method sendDeferLayoutEvent.

/**
	 * @param layout
	 */
public static void sendDeferLayoutEvent(Borderlayout layout, int timeout) {
    StringBuilder content = new StringBuilder();
    content.append("ad_deferRenderBorderLayout('").append(layout.getUuid()).append("',").append(timeout).append(");");
    AuScript as = new AuScript(null, content.toString());
    Clients.response("deferRenderBorderLayout", as);
}
Also used : AuScript(org.zkoss.zk.au.out.AuScript)

Aggregations

AuScript (org.zkoss.zk.au.out.AuScript)12 UnsupportedEncodingException (java.io.UnsupportedEncodingException)3 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)3 ApplicationException (org.adempiere.webui.exception.ApplicationException)1 MSession (org.compiere.model.MSession)1 MUser (org.compiere.model.MUser)1 KeyNamePair (org.compiere.util.KeyNamePair)1 Language (org.compiere.util.Language)1 Login (org.compiere.util.Login)1 Text (org.zkoss.zhtml.Text)1 AbstractComponent (org.zkoss.zk.ui.AbstractComponent)1 Component (org.zkoss.zk.ui.Component)1 HtmlBasedComponent (org.zkoss.zk.ui.HtmlBasedComponent)1 Session (org.zkoss.zk.ui.Session)1 WrongValueException (org.zkoss.zk.ui.WrongValueException)1 Div (org.zkoss.zul.Div)1