Commit 450350b8 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Fixed bug.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@501 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3162ff93
...@@ -118,7 +118,7 @@ public class AdminConsole { ...@@ -118,7 +118,7 @@ public class AdminConsole {
* @return the element. * @return the element.
*/ */
public static Element getElemnetByID(String id) { public static Element getElemnetByID(String id) {
return (Element)generatedModel.selectSingleNode("//item[@id='" + id + "']"); return (Element)generatedModel.selectSingleNode("//*[@id='" + id + "']");
} }
private static void load() { private static void load() {
...@@ -217,9 +217,15 @@ public class AdminConsole { ...@@ -217,9 +217,15 @@ public class AdminConsole {
private static void overrideTab(Element tab, Element overrideTab) { private static void overrideTab(Element tab, Element overrideTab) {
// Override name, url, description. // Override name, url, description.
if (overrideTab.attributeValue("name") != null) {
tab.addAttribute("name", overrideTab.attributeValue("name")); tab.addAttribute("name", overrideTab.attributeValue("name"));
}
if (overrideTab.attributeValue("url") != null) {
tab.addAttribute("url", overrideTab.attributeValue("url")); tab.addAttribute("url", overrideTab.attributeValue("url"));
}
if (overrideTab.attributeValue("description") != null) {
tab.addAttribute("description", overrideTab.attributeValue("description")); tab.addAttribute("description", overrideTab.attributeValue("description"));
}
// Override sidebar items. // Override sidebar items.
for (Iterator i=overrideTab.elementIterator(); i.hasNext(); ) { for (Iterator i=overrideTab.elementIterator(); i.hasNext(); ) {
Element sidebar = (Element)i.next(); Element sidebar = (Element)i.next();
...@@ -240,7 +246,9 @@ public class AdminConsole { ...@@ -240,7 +246,9 @@ public class AdminConsole {
private static void overrideSidebar(Element sidebar, Element overrideSidebar) { private static void overrideSidebar(Element sidebar, Element overrideSidebar) {
// Override name. // Override name.
if (overrideSidebar.attributeValue("name") != null) {
sidebar.addAttribute("name", overrideSidebar.attributeValue("name")); sidebar.addAttribute("name", overrideSidebar.attributeValue("name"));
}
// Override entries. // Override entries.
for (Iterator i=overrideSidebar.elementIterator(); i.hasNext(); ) { for (Iterator i=overrideSidebar.elementIterator(); i.hasNext(); ) {
Element entry = (Element)i.next(); Element entry = (Element)i.next();
...@@ -261,9 +269,15 @@ public class AdminConsole { ...@@ -261,9 +269,15 @@ public class AdminConsole {
private static void overrideEntry(Element entry, Element overrideEntry) { private static void overrideEntry(Element entry, Element overrideEntry) {
// Override name. // Override name.
if (overrideEntry.attributeValue("name") != null) {
entry.addAttribute("name", overrideEntry.attributeValue("name")); entry.addAttribute("name", overrideEntry.attributeValue("name"));
}
if (overrideEntry.attributeValue("url") != null) {
entry.addAttribute("url", overrideEntry.attributeValue("url")); entry.addAttribute("url", overrideEntry.attributeValue("url"));
}
if (overrideEntry.attributeValue("description") != null) {
entry.addAttribute("description", overrideEntry.attributeValue("description")); entry.addAttribute("description", overrideEntry.attributeValue("description"));
}
// Override any sidebars contained in the entry. // Override any sidebars contained in the entry.
for (Iterator i=overrideEntry.elementIterator(); i.hasNext(); ) { for (Iterator i=overrideEntry.elementIterator(); i.hasNext(); ) {
Element sidebar = (Element)i.next(); Element sidebar = (Element)i.next();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment