Package freenet.support

Examples of freenet.support.HTMLNode.addChild()


    short level = userAlert.getPriorityClass();
    userAlertNode = new HTMLNode("div", "class", "infobox infobox-"+getAlertLevelName(level));

    userAlertNode.addChild("div", "class", "infobox-header", userAlert.getTitle());
    HTMLNode alertContentNode = userAlertNode.addChild("div", "class", "infobox-content");
    alertContentNode.addChild(userAlert.getHTMLText());
    if (userAlert.userCanDismiss()) {
      HTMLNode dismissFormNode = alertContentNode.addChild("form", new String[] { "action", "method" }, new String[] { "/alerts/", "post" }).addChild("div");
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "disable", String.valueOf(userAlert.hashCode()) });
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", core.formPassword });
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "dismiss-user-alert", userAlert.dismissButtonText() });
View Full Code Here


    userAlertNode.addChild("div", "class", "infobox-header", userAlert.getTitle());
    HTMLNode alertContentNode = userAlertNode.addChild("div", "class", "infobox-content");
    alertContentNode.addChild(userAlert.getHTMLText());
    if (userAlert.userCanDismiss()) {
      HTMLNode dismissFormNode = alertContentNode.addChild("form", new String[] { "action", "method" }, new String[] { "/alerts/", "post" }).addChild("div");
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "disable", String.valueOf(userAlert.hashCode()) });
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", core.formPassword });
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "dismiss-user-alert", userAlert.dismissButtonText() });
    }
    return userAlertNode;
  }
View Full Code Here

    HTMLNode alertContentNode = userAlertNode.addChild("div", "class", "infobox-content");
    alertContentNode.addChild(userAlert.getHTMLText());
    if (userAlert.userCanDismiss()) {
      HTMLNode dismissFormNode = alertContentNode.addChild("form", new String[] { "action", "method" }, new String[] { "/alerts/", "post" }).addChild("div");
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "disable", String.valueOf(userAlert.hashCode()) });
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", core.formPassword });
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "dismiss-user-alert", userAlert.dismissButtonText() });
    }
    return userAlertNode;
  }
View Full Code Here

    alertContentNode.addChild(userAlert.getHTMLText());
    if (userAlert.userCanDismiss()) {
      HTMLNode dismissFormNode = alertContentNode.addChild("form", new String[] { "action", "method" }, new String[] { "/alerts/", "post" }).addChild("div");
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "disable", String.valueOf(userAlert.hashCode()) });
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", core.formPassword });
      dismissFormNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "dismiss-user-alert", userAlert.dismissButtonText() });
    }
    return userAlertNode;
  }

  private String getAlertLevelName(short level) {
View Full Code Here

      summaryBox = new HTMLNode("div", "class", classes + "alert");
    else if (highestLevel <= UserAlert.WARNING)
      summaryBox = new HTMLNode("div", "class", classes + "warning");
    else if (highestLevel <= UserAlert.MINOR)
      summaryBox = new HTMLNode("div", "class", classes + "information");
    summaryBox.addChild("div", "class", "infobox-header", l10n("alertsTitle"));
    HTMLNode summaryContent = summaryBox.addChild("div", "class", "infobox-content");
    if(!oneLine) {
      summaryContent.addChild("#", alertSummaryString.toString() + separator + " ");
      NodeL10n.getBase().addL10nSubstitution(summaryContent, "UserAlertManager.alertsOnAlertsPage",
        new String[] { "link" }, new HTMLNode[] { ALERTS_LINK });
View Full Code Here

    else if (highestLevel <= UserAlert.MINOR)
      summaryBox = new HTMLNode("div", "class", classes + "information");
    summaryBox.addChild("div", "class", "infobox-header", l10n("alertsTitle"));
    HTMLNode summaryContent = summaryBox.addChild("div", "class", "infobox-content");
    if(!oneLine) {
      summaryContent.addChild("#", alertSummaryString.toString() + separator + " ");
      NodeL10n.getBase().addL10nSubstitution(summaryContent, "UserAlertManager.alertsOnAlertsPage",
        new String[] { "link" }, new HTMLNode[] { ALERTS_LINK });
    } else {
      summaryContent.addChild("a", "href", "/alerts/", NodeL10n.getBase().getString("StatusBar.alerts") + " " + alertSummaryString.toString());
    }
View Full Code Here

    if(!oneLine) {
      summaryContent.addChild("#", alertSummaryString.toString() + separator + " ");
      NodeL10n.getBase().addL10nSubstitution(summaryContent, "UserAlertManager.alertsOnAlertsPage",
        new String[] { "link" }, new HTMLNode[] { ALERTS_LINK });
    } else {
      summaryContent.addChild("a", "href", "/alerts/", NodeL10n.getBase().getString("StatusBar.alerts") + " " + alertSummaryString.toString());
    }
    summaryBox.addAttribute("id", "messages-summary-box");
    return summaryBox;
  }
View Full Code Here

    SubConfig sc = node.config.get("node");
    Option<?> o = sc.getOption("name");

    HTMLNode alertNode = new HTMLNode("div");
    HTMLNode textNode = alertNode.addChild("div");
    textNode.addChild("#", l10n("noNodeNick"));
    HTMLNode formNode = alertNode.addChild("form", new String[] { "action", "method" }, new String[] { "/config/"+sc.getPrefix(), "post" });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.clientCore.formPassword });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "subconfig", sc.getPrefix() });
    HTMLNode listNode = formNode.addChild("ul", "class", "config");
    HTMLNode itemNode = listNode.addChild("li");
View Full Code Here

    HTMLNode alertNode = new HTMLNode("div");
    HTMLNode textNode = alertNode.addChild("div");
    textNode.addChild("#", l10n("noNodeNick"));
    HTMLNode formNode = alertNode.addChild("form", new String[] { "action", "method" }, new String[] { "/config/"+sc.getPrefix(), "post" });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.clientCore.formPassword });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "subconfig", sc.getPrefix() });
    HTMLNode listNode = formNode.addChild("ul", "class", "config");
    HTMLNode itemNode = listNode.addChild("li");
    itemNode.addChild("span", new String[]{ "class", "title", "style" },
        new String[]{ "configshortdesc", NodeL10n.getBase().getString("ConfigToadlet.defaultIs", new String[] { "default" }, new String[] { o.getDefault() }),
View Full Code Here

    HTMLNode alertNode = new HTMLNode("div");
    HTMLNode textNode = alertNode.addChild("div");
    textNode.addChild("#", l10n("noNodeNick"));
    HTMLNode formNode = alertNode.addChild("form", new String[] { "action", "method" }, new String[] { "/config/"+sc.getPrefix(), "post" });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.clientCore.formPassword });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "subconfig", sc.getPrefix() });
    HTMLNode listNode = formNode.addChild("ul", "class", "config");
    HTMLNode itemNode = listNode.addChild("li");
    itemNode.addChild("span", new String[]{ "class", "title", "style" },
        new String[]{ "configshortdesc", NodeL10n.getBase().getString("ConfigToadlet.defaultIs", new String[] { "default" }, new String[] { o.getDefault() }),
        "cursor: help;" }).addChild(o.getShortDescNode());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.