java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java |
19 +++++++++-
java/code/src/com/redhat/rhn/frontend/taglibs/list/decorators/ExpansionDecorator.java |
3 +
2 files changed, 20 insertions(+), 2 deletions(-)
New commits:
commit c2dfd93413b74413e464fcc5949b6b7c3b90d94a
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Mon Feb 3 15:14:28 2014 +0100
make ExpansionDecorator work again
due to changes in ListTag id of table no longer belongs to table but to some
<div> enveloping the table
new id is generated for the the <table> if the ListTag has ExpansionDecorator to
make javascript around it work again
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java
b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java
index a98fc99..30f28e1 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java
@@ -36,6 +36,7 @@ import com.redhat.rhn.frontend.context.Context;
import com.redhat.rhn.frontend.html.HtmlTag;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.taglibs.RhnListTagFunctions;
+import com.redhat.rhn.frontend.taglibs.list.decorators.ExpansionDecorator;
import com.redhat.rhn.frontend.taglibs.list.decorators.ListDecorator;
import com.redhat.rhn.frontend.taglibs.list.decorators.PageSizeDecorator;
import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
@@ -999,7 +1000,13 @@ public class ListTag extends BodyTagSupport {
}
private void startTable() throws JspException {
- ListTagUtil.write(pageContext, "<table class=\"table
table-striped\"");
+ if (hasExpansionDecorator()) {
+ ListTagUtil.write(pageContext, "<table class=\"table
table-striped\"" +
+ "id=\"" + this.getStyleId() + "_exp\"");
+ }
+ else {
+ ListTagUtil.write(pageContext, "<table class=\"table
table-striped\"");
+ }
if (width != null) {
ListTagUtil.write(pageContext, " width=\"");
@@ -1237,4 +1244,14 @@ public class ListTag extends BodyTagSupport {
public void setReflinkkeyarg0(String refLinkKeyArg0In) {
this.refLinkKeyArg0 = refLinkKeyArg0In;
}
+
+ private boolean hasExpansionDecorator() {
+ for (ListDecorator dec : getDecorators()) {
+ if (dec.getClass().equals(ExpansionDecorator.class)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git
a/java/code/src/com/redhat/rhn/frontend/taglibs/list/decorators/ExpansionDecorator.java
b/java/code/src/com/redhat/rhn/frontend/taglibs/list/decorators/ExpansionDecorator.java
index 9343e30..6cc7e59 100644
---
a/java/code/src/com/redhat/rhn/frontend/taglibs/list/decorators/ExpansionDecorator.java
+++
b/java/code/src/com/redhat/rhn/frontend/taglibs/list/decorators/ExpansionDecorator.java
@@ -63,6 +63,7 @@ public class ExpansionDecorator extends BaseListDecorator {
public void afterList() throws JspException {
ListTag list = getCurrentList();
ListTagUtil.write(pageContext, String.format(LOAD_SCRIPT,
- list.getColumnCount(), list.getStyleId(), listName,
listName));
+ list.getColumnCount(), list.getStyleId() + "_exp",
+ listName, listName));
}
}
Show replies by date