Author: julien(a)jboss.com
Date: 2007-03-30 12:43:04 -0400 (Fri, 30 Mar 2007)
New Revision: 6883
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaPortletRenderer.java
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java
Log:
better handling of empty drop zones
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaPortletRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaPortletRenderer.java 2007-03-30
16:07:35 UTC (rev 6882)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaPortletRenderer.java 2007-03-30
16:43:04 UTC (rev 6883)
@@ -66,10 +66,10 @@
DynaWindowRenderer.handleProvided.set(Boolean.TRUE);
//
- StringBuffer out = renderContext.getMarkupFragment();
- out.append("<span class=\"handle\">");
+// StringBuffer out = renderContext.getMarkupFragment();
+// out.append("<span class=\"handle\">");
delegate.render(renderContext, prc);
- out.append("</span>");
+// out.append("</span>");
}
else
{
Modified:
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java
===================================================================
---
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2007-03-30
16:07:35 UTC (rev 6882)
+++
trunk/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2007-03-30
16:43:04 UTC (rev 6883)
@@ -183,13 +183,7 @@
//
"for(var i = 0;i < regions_on_page.length;i++) {\n" +
" var region = regions_on_page[i];" +
- " Sortable.create(region,
{dropOnEmpty:true,handle:'handle',tag:'div',containment:regions_on_page,constraint:false,
ghosting: false,\n" +
- " onChange: function(el)\n" +
- " {\n" +
- " },\n" +
- " onUpdate: function (el)\n" +
- " {\n" +
- " }\n" +
+ " Sortable.create(region,
{dropOnEmpty:true,handle:'handle',tag:'div',containment:regions_on_page,constraint:false"
+
" });\n" +
"}\n");
@@ -218,8 +212,8 @@
//
delegate.preRender(renderContext, rrc);
- //
- markup.append("<div class=\"draggable-region\"
id=\"").append(rrc.getId()).append("\">");
+ // We need height and width otherwise the region will not be usable when empty
+ markup.append("<div class=\"draggable-region\"
style=\"height:200px;width=200px\"
id=\"").append(rrc.getId()).append("\">");
}
else
{
@@ -235,7 +229,7 @@
StringBuffer markup = renderContext.getMarkupFragment();
// Always content so it can be used as a droppable element
- markup.append("<div> </div>");
+// markup.append("<p style=\"border:1px solid
black;\"> </p>");
markup.append("</div>");
}
Show replies by date