/** * @param transparent - needed when this page is shown in dialog mode, * then true means show faded previous page under dialog window * and don't bother prev page with lifecycle events (show, hide, ...). * * <br> See <a href="http://tqcblog.com/2012/04/19/transparent-jquery-mobile-dialogs/">Transparent jQuery mobile dialogs</a> */ public void setDlgTransparent(boolean transparent) { this.transparent = transparent; if (this.transparent) addStyleName(JQM4GWT_DLG_TRANSPARENT); else removeStyleName(JQM4GWT_DLG_TRANSPARENT); }
/** * @param transparent - needed when this page is shown in dialog mode, * then true means show faded previous page under dialog window * and don't bother prev page with lifecycle events (show, hide, ...). * * <br> See <a href="http://tqcblog.com/2012/04/19/transparent-jquery-mobile-dialogs/">Transparent jQuery mobile dialogs</a> */ public void setDlgTransparent(boolean transparent) { this.transparent = transparent; if (this.transparent) addStyleName(JQM4GWT_DLG_TRANSPARENT); else removeStyleName(JQM4GWT_DLG_TRANSPARENT); }
/** * @param transparent - needed when this page is shown in dialog mode, * then true means show faded previous page under dialog window * and don't bother prev page with lifecycle events (show, hide, ...). * * <br> See <a href="http://tqcblog.com/2012/04/19/transparent-jquery-mobile-dialogs/">Transparent jQuery mobile dialogs</a> */ public void setDlgTransparent(boolean transparent) { this.transparent = transparent; if (this.transparent) addStyleName(JQM4GWT_DLG_TRANSPARENT); else removeStyleName(JQM4GWT_DLG_TRANSPARENT); }
/** * There is no "correct" way to restore page after it was called as dialog, * so this method is ugly hack, but it's useful and working. */ public void restoreRolePage() { JQMCommon.setDataRole(this, "page"); JQMCommon.setDataDialog(this, false); removeStyleName(STYLE_UI_DIALOG); Element elt = getElement(); Element dlgContain = JQMCommon.findChild(elt, UI_DIALOG_CONTAIN); if (dlgContain != null) { JQMCommon.moveChildren(dlgContain, elt); elt.removeChild(dlgContain); } JQMHeader h = getHeader(); if (h != null) { Element btn = JQMCommon.findChild(h.getElement(), "ui-btn-icon-notext"); if (btn != null && "#".equals(JQMCommon.getAttribute(btn, "href")) && (DataIcon.DELETE == JQMCommon.getIcon(btn) || DataIcon.DELETE == JQMCommon.getStyleIcon(btn))) { h.getElement().removeChild(btn); } } }
/** * There is no "correct" way to restore page after it was called as dialog, * so this method is ugly hack, but it's useful and working. */ public void restoreRolePage() { JQMCommon.setDataRole(this, "page"); JQMCommon.setDataDialog(this, false); removeStyleName(STYLE_UI_DIALOG); Element elt = getElement(); Element dlgContain = JQMCommon.findChild(elt, UI_DIALOG_CONTAIN); if (dlgContain != null) { JQMCommon.moveChildren(dlgContain, elt); elt.removeChild(dlgContain); } JQMHeader h = getHeader(); if (h != null) { Element btn = JQMCommon.findChild(h.getElement(), "ui-btn-icon-notext"); if (btn != null && "#".equals(JQMCommon.getAttribute(btn, "href")) && (DataIcon.DELETE == JQMCommon.getIcon(btn) || DataIcon.DELETE == JQMCommon.getStyleIcon(btn))) { h.getElement().removeChild(btn); } } }
/** * There is no "correct" way to restore page after it was called as dialog, * so this method is ugly hack, but it's useful and working. */ public void restoreRolePage() { JQMCommon.setDataRole(this, "page"); JQMCommon.setDataDialog(this, false); removeStyleName(STYLE_UI_DIALOG); Element elt = getElement(); Element dlgContain = JQMCommon.findChild(elt, UI_DIALOG_CONTAIN); if (dlgContain != null) { JQMCommon.moveChildren(dlgContain, elt); elt.removeChild(dlgContain); } JQMHeader h = getHeader(); if (h != null) { Element btn = JQMCommon.findChild(h.getElement(), "ui-btn-icon-notext"); if (btn != null && "#".equals(JQMCommon.getAttribute(btn, "href")) && (DataIcon.DELETE == JQMCommon.getIcon(btn) || DataIcon.DELETE == JQMCommon.getStyleIcon(btn))) { h.getElement().removeChild(btn); } } }