fixes for R5 redirector
This commit is contained in:
parent
d35b881cf1
commit
c5f5689714
|
@ -580,7 +580,7 @@ public class NpmPackage {
|
|||
for (NpmPackageFolder folder : folders.values()) {
|
||||
if (folder.index != null) {
|
||||
for (JsonObject fi : folder.index.getJsonObjects("files")) {
|
||||
if (Utilities.existsInList(fi.asString("resourceType"), types)) {
|
||||
if (Utilities.existsInList(fi.asString("resourceType"), types) || types.isEmpty()) {
|
||||
res.add(new PackageResourceInformation(folder.folder == null ? "@"+folder.getName() : folder.folder.getAbsolutePath(), fi));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -837,4 +837,33 @@ public class XhtmlNode extends XhtmlFluent implements IBaseXhtml {
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
public XhtmlNode getElementById(String id) {
|
||||
if (id.equals(getAttribute("id"))) {
|
||||
return this;
|
||||
}
|
||||
if (childNodes != null) {
|
||||
for (XhtmlNode x : childNodes) {
|
||||
XhtmlNode r = x.getElementById(id);
|
||||
if (r != null) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public List<XhtmlNode> getChildren(String name) {
|
||||
List<XhtmlNode> res = new ArrayList<>();
|
||||
XhtmlNode x = getFirstElement();
|
||||
while (x != null) {
|
||||
if (name.equals(x.getName())) {
|
||||
res.add(x);
|
||||
}
|
||||
x = getNextElement(x);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue