Package freenet.support

Examples of freenet.support.HTMLNode.addAttribute()


      if(!dontShowFilter) {
        HTMLNode filterControl = optionForm.addChild("div", l10n("filterData"));
        HTMLNode f = filterControl.addChild("input",
                new String[] { "type", "name", "value" },
                new String[] { "checkbox", "filterData", "filterData"});
        if(filterChecked) f.addAttribute("checked", "checked");
        filterControl.addChild("div", l10n("filterDataMessage"));
      }
      if (threatLevel == PHYSICAL_THREAT_LEVEL.HIGH) {
        optionForm.addChild("br");
        NodeL10n.getBase().addL10nSubstitution(optionForm,
View Full Code Here


      if(!dontShowFilter) {
        HTMLNode filterControl = optionForm.addChild("div", l10n("filterData"));
        HTMLNode f = filterControl.addChild("input",
            new String[] { "type", "name", "value" },
            new String[] { "checkbox", "filterData", "filterData"});
        if(filterChecked) f.addAttribute("checked", "checked");
        filterControl.addChild("div", l10n("filterDataMessage"));
      }
    }
  }
View Full Code Here

          //If the user has enabled javascript, we add a <noscript> http refresh(if he has disabled it in the browser)
          headNode.addChild("noscript").addChild("meta", "http-equiv", "Refresh").addAttribute("content", "2;URL=" + location);
            // If pushing is disabled, but js is enabled, then we add the original progresspage.js
            if ((isWebPushingEnabled = ctx.getContainer().isFProxyWebPushingEnabled()) == false) {
              HTMLNode scriptNode = headNode.addChild("script", "//abc");
              scriptNode.addAttribute("type", "text/javascript");
              scriptNode.addAttribute("src", "/static/js/progresspage.js");
            }
        }else{
          //If he disabled it, we just put the http refresh meta, without the noscript
          headNode.addChild("meta", "http-equiv", "Refresh").addAttribute("content", "2;URL=" + location);
View Full Code Here

          headNode.addChild("noscript").addChild("meta", "http-equiv", "Refresh").addAttribute("content", "2;URL=" + location);
            // If pushing is disabled, but js is enabled, then we add the original progresspage.js
            if ((isWebPushingEnabled = ctx.getContainer().isFProxyWebPushingEnabled()) == false) {
              HTMLNode scriptNode = headNode.addChild("script", "//abc");
              scriptNode.addAttribute("type", "text/javascript");
              scriptNode.addAttribute("src", "/static/js/progresspage.js");
            }
        }else{
          //If he disabled it, we just put the http refresh meta, without the noscript
          headNode.addChild("meta", "http-equiv", "Refresh").addAttribute("content", "2;URL=" + location);
        }
View Full Code Here

        }
        HTMLNode contentNode = page.content;
        HTMLNode infobox = contentNode.addChild("div", "class", "infobox infobox-information");
        infobox.addChild("div", "class", "infobox-header", l10n("fetchingPageBox"));
        HTMLNode infoboxContent = infobox.addChild("div", "class", "infobox-content");
        infoboxContent.addAttribute("id", "infoContent");
        infoboxContent.addChild(new ProgressInfoElement(fetchTracker, key, fctx, maxSize, ctx.isAdvancedModeEnabled(), ctx, isWebPushingEnabled));


        HTMLNode table = infoboxContent.addChild("table", "border", "0");
        HTMLNode progressCell = table.addChild("tr").addChild("td", "class", "request-progress");
View Full Code Here

      String restartName = NodeL10n.getBase().getString(/*followRedirect ? "QueueToadlet.follow" : */ isUpload ? "QueueToadlet.restartUploads" : "QueueToadlet.restartDownloads");
      deleteDiv.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "restart_request", restartName });
      if(mimeType != null) {
        HTMLNode input = deleteDiv.addChild("input", new String[] { "type", "name", "value" }, new String[] {"checkbox", "disableFilterData", "disableFilterData" });
        if(disableFilterChecked) {
          input.addAttribute("checked", "checked");
        }
        deleteDiv.addChild("#", l10n("disableFilter", "type", mimeType));
      }
    }
    return deleteDiv;
View Full Code Here

    }

    // Search Box
        // FIXME search box is BELOW bookmarks for now, until we get search fixed properly.
    HTMLNode searchBox = contentNode.addChild("div", "class", "infobox infobox-normal");
    searchBox.addAttribute("id", "search-freenet");
        searchBox.addChild("div", "class", "infobox-header").addChild("span", "class", "search-title-label", NodeL10n.getBase().getString("WelcomeToadlet.searchBoxLabel"));
    HTMLNode searchBoxContent = searchBox.addChild("div", "class", "infobox-content");
    // Search form
    if(node.pluginManager != null &&
        node.pluginManager.isPluginLoaded("plugins.Library.Main")) {
View Full Code Here

          searchBoxContent.addChild("span", "class", "search-warning-text", l10n("searchBoxWarningSlow"));
      HTMLNode searchForm = container.addFormChild(searchBoxContent, "/library/", "searchform");
          searchForm.addChild("input", new String[] { "type", "size", "name" }, new String[] { "text", "80", "search" });
          searchForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "find", l10n("searchFreenet") });
          // Search must be in a new window so that the user is able to browse the bookmarks.
          searchForm.addAttribute("target", "_blank");
        } else if(node.pluginManager == null ||
            node.pluginManager.isPluginLoadedOrLoadingOrWantLoad("Library")) {
      // Warn that search plugin is not loaded.
      HTMLNode textSpan = searchBoxContent.addChild("span", "class", "search-not-availible-warning");
      NodeL10n.getBase().addL10nSubstitution(textSpan, "WelcomeToadlet.searchPluginLoading", new String[] { "link" }, new HTMLNode[] { HTMLNode.link("/plugins/") });
View Full Code Here

    }

  private void putFetchKeyBox(ToadletContext ctx, HTMLNode contentNode) {
    // Fetch-a-key box
    HTMLNode fetchKeyContent = ctx.getPageMaker().getInfobox("infobox-normal", l10n("fetchKeyLabel"), contentNode, "fetch-key", true);
    fetchKeyContent.addAttribute("id", "keyfetchbox");
    HTMLNode fetchKeyForm = fetchKeyContent.addChild("form", new String[]{"action", "method"}, new String[]{"/", "get"}).addChild("div");
    fetchKeyForm.addChild("span", "class", "fetch-key-label", l10n("keyRequestLabel") + ' ');
    fetchKeyForm.addChild("input", new String[]{"type", "size", "name"}, new String[]{"text", "80", "key"});
    fetchKeyForm.addChild("input", new String[]{"type", "value"}, new String[]{"submit", l10n("fetch")});
  }
View Full Code Here

    HTMLNode input = insertForm.addChild("input",
            new String[] { "type", "name", "value" },
            new String[] { "radio", "keytype", "CHK" });
    if ((!rememberedLastTime && seclevel == NETWORK_THREAT_LEVEL.LOW) ||
            (rememberedLastTime && wasCanonicalLastTime && seclevel != NETWORK_THREAT_LEVEL.MAXIMUM)) {
      input.addAttribute("checked", "checked");
    }
    insertForm.addChild("b", l10n("insertCanonicalTitle"));
    insertForm.addChild("#", ": "+l10n("insertCanonical"));
    if(isAdvancedModeEnabled)
      insertForm.addChild("#", " "+l10n("insertCanonicalAdvanced"));
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.