/** * Sets up a table to be a consistent style. * @param html the HTML to use to render. * @param tableId the ID of the table to set styles on. * @param innerStyles any other styles to add to the table. */ protected void setTableStyles(Page.HTML<_> html, String tableId, String... innerStyles) { List<String> styles = Lists.newArrayList(); styles.add(join('#', tableId, "_paginate span {font-weight:normal}")); styles.add(join('#', tableId, " .progress {width:8em}")); styles.add(join('#', tableId, "_processing {top:-1.5em; font-size:1em;")); styles.add(" color:#000; background:rgba(255, 255, 255, 0.8)}"); for (String style : innerStyles) { styles.add(join('#', tableId, " ", style)); } html.style(styles.toArray()); } }
/** * Sets up a table to be a consistent style. * @param html the HTML to use to render. * @param tableId the ID of the table to set styles on. * @param innerStyles any other styles to add to the table. */ protected void setTableStyles(Page.HTML<_> html, String tableId, String... innerStyles) { List<String> styles = Lists.newArrayList(); styles.add(join('#', tableId, "_paginate span {font-weight:normal}")); styles.add(join('#', tableId, " .progress {width:8em}")); styles.add(join('#', tableId, "_processing {top:-1.5em; font-size:1em;")); styles.add(" color:#000; background:rgba(255, 255, 255, 0.8)}"); for (String style : innerStyles) { styles.add(join('#', tableId, " ", style)); } html.style(styles.toArray()); } }
title($(TITLE)). link(root_url("static","yarn.css")). style("#layout { height: 100%; }", "#layout thead td { height: 3em; }", "#layout #navcell { width: 11em; padding: 0 1em; }",
title($(TITLE)). link(root_url("static","yarn.css")). style("#layout { height: 100%; }", "#layout thead td { height: 3em; }", "#layout #navcell { width: 11em; padding: 0 1em; }",
@Override protected void postHead(Page.HTML<_> html) { html. style().$type("text/css"). _("#cs { padding: 0.5em 0 1em 0; margin-bottom: 1em; position: relative }", "#cs ul { list-style: none }", "#cs a { font-weight: normal; margin: 2px; position: relative }", "#cs a span { font-weight: normal; font-size: 80% }", "#cs-wrapper .ui-widget-header { padding: 0.2em 0.5em }", "table.info tr th {width: 50%}")._(). // to center info table script("/static/jt/jquery.jstree.js"). script().$type("text/javascript"). _("$(function() {", " $('#cs a span').addClass('ui-corner-all').css('position', 'absolute');", " $('#cs').bind('loaded.jstree', function (e, data) {", " data.inst.open_all(); }).", " jstree({", " core: { animation: 188, html_titles: true },", " plugins: ['themeroller', 'html_data', 'ui'],", " themeroller: { item_open: 'ui-icon-minus',", " item_clsd: 'ui-icon-plus', item_leaf: 'ui-icon-gear'", " }", " });", " $('#cs').bind('select_node.jstree', function(e, data) {", " var q = $('.q', data.rslt.obj).first().text();", " if (q == 'root') q = '';", " $('#apps').dataTable().fnFilter(q, 4);", " });", " $('#cs').show();", "});")._(); }
title($("title")). link(root_url("static","yarn.css")). style(".main { min-height: 100%; height: auto !important; height: 100%;", " margin: 0 auto -4em; border: 0; }", ".footer, .push { height: 4em; clear: both; border: 0 }",
title($("title")). link(root_url("static","yarn.css")). style(".main { min-height: 100%; height: auto !important; height: 100%;", " margin: 0 auto -4em; border: 0; }", ".footer, .push { height: 4em; clear: both; border: 0 }",
@Override protected void postHead(Page.HTML<_> html) { html. style().$type("text/css"). _("#cs { padding: 0.5em 0 1em 0; margin-bottom: 1em; position: relative }", "#cs ul { list-style: none }",
@Override protected void postHead(Page.HTML<_> html) { html. style().$type("text/css"). _("#cs { padding: 0.5em 0 1em 0; margin-bottom: 1em; position: relative }", "#cs ul { list-style: none }", "#cs a { font-weight: normal; margin: 2px; position: relative }", "#cs a span { font-weight: normal; font-size: 80% }", "#cs-wrapper .ui-widget-header { padding: 0.2em 0.5em }", "table.info tr th {width: 50%}")._(). // to center info table script("/static/jt/jquery.jstree.js"). script().$type("text/javascript"). _("$(function() {", " $('#cs a span').addClass('ui-corner-all').css('position', 'absolute');", " $('#cs').bind('loaded.jstree', function (e, data) {", " data.inst.open_all(); }).", " jstree({", " core: { animation: 188, html_titles: true },", " plugins: ['themeroller', 'html_data', 'ui'],", " themeroller: { item_open: 'ui-icon-minus',", " item_clsd: 'ui-icon-plus', item_leaf: 'ui-icon-gear'", " }", " });", " $('#cs').bind('select_node.jstree', function(e, data) {", " var q = $('.q', data.rslt.obj).first().text();", " if (q == 'root') q = '';", " $('#apps').dataTable().fnFilter(q, 4);", " });", " $('#cs').show();", "});")._(); }
@Override protected void postHead(Page.HTML<_> html) { html. style().$type("text/css"). _("#cs { padding: 0.5em 0 1em 0; margin-bottom: 1em; position: relative }", "#cs ul { list-style: none }",
@Override protected void render(Page.HTML<_> html) { set(JQueryUI.ACCORDION_ID, "msg"); String title = "Sorry, got error "+ status(); html. title(title). link(root_url("static","yarn.css")). _(JQueryUI.class). // an embedded sub-view style("#msg { margin: 1em auto; width: 88%; }", "#msg h1 { padding: 0.2em 1.5em; font: bold 1.3em serif; }"). div("#msg"). h1(title). div(). _("Please consult"). a("http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "RFC 2616")._(" for meanings of the error code.")._(). h1("Error Details"). pre(). _(errorDetails())._()._()._(); }
@Override protected void render(Page.HTML<_> html) { set(JQueryUI.ACCORDION_ID, "msg"); String title = "Sorry, got error "+ status(); html. title(title). link(root_url("static","yarn.css")). _(JQueryUI.class). // an embedded sub-view style("#msg { margin: 1em auto; width: 88%; }", "#msg h1 { padding: 0.2em 1.5em; font: bold 1.3em serif; }"). div("#msg"). h1(title). div(). _("Please consult"). a("http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "RFC 2616")._(" for meanings of the error code.")._(). h1("Error Details"). pre(). _(errorDetails())._()._()._(); }
@Override public HTML<T> style(Object... lines) { return style().$type("text/css")._(lines)._(); }
@Override public HTML<T> style(Object... lines) { return style().$type("text/css")._(lines)._(); }
@Override protected void postHead(Page.HTML<_> html) { html. style("#counters, .dt-counters { table-layout: fixed }", "#counters th { overflow: hidden; vertical-align: middle }", "#counters .dataTables_wrapper { min-height: 1em }", "#counters .group { width: 15em }", "#counters .name { width: 30em }"); }
@Override protected void postHead(Page.HTML<_> html) { html. style("#counters, .dt-counters { table-layout: fixed }", "#counters th { overflow: hidden; vertical-align: middle }", "#counters .dataTables_wrapper { min-height: 1em }", "#counters .group { width: 15em }", "#counters .name { width: 30em }"); }
@Override protected void postHead(Page.HTML<_> html) { html. style("#counters, .dt-counters { table-layout: fixed }", "#counters th { overflow: hidden; vertical-align: middle }", "#counters .dataTables_wrapper { min-height: 1em }", "#counters .group { width: 15em }", "#counters .name { width: 30em }"); }
@Override protected void postHead(Page.HTML<_> html) { html. style("#counters, .dt-counters { table-layout: fixed }", "#counters th { overflow: hidden; vertical-align: middle }", "#counters .dataTables_wrapper { min-height: 1em }", "#counters .group { width: 15em }", "#counters .name { width: 30em }"); }
@Override protected void postHead(Page.HTML<_> html) { html. style("#counters, .dt-counters { table-layout: fixed }", "#counters th { overflow: hidden; vertical-align: middle }", "#counters .dataTables_wrapper { min-height: 1em }", "#counters .group { width: 15em }", "#counters .name { width: 30em }"); }
@Override public HTML<T> style(Object... lines) { return style().$type("text/css")._(lines)._(); }