|
Author: jleroux
Date: Sat Jan 8 09:13:17 2011 New Revision: 1056670 URL: http://svn.apache.org/viewvc?rev=1056670&view=rev Log: A patch from Sascha Rodekamp "Fix Portal Drag'n'Drop" (https://issues.apache.org/jira/browse/OFBIZ-4062) - OFBIZ-4062 During the last works on the my portal module, the Drag'n'Drop functionality was lost. Here is a fix which enables the Drag'n'Drop again. Modified: ofbiz/trunk/framework/images/webapp/images/myportal.js ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl Modified: ofbiz/trunk/framework/images/webapp/images/myportal.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/myportal.js?rev=1056670&r1=1056669&r2=1056670&view=diff ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/myportal.js (original) +++ ofbiz/trunk/framework/images/webapp/images/myportal.js Sat Jan 8 09:13:17 2011 @@ -189,6 +189,6 @@ function onStartRequest() { p.appendChild(img); - var container = document.getElementById("portalContainerId"); + var container = document.getElementById("content-main-section"); container.appendChild(p); } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java?rev=1056670&r1=1056669&r2=1056670&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java Sat Jan 8 09:13:17 2011 @@ -891,17 +891,18 @@ public class MacroScreenRenderer impleme String originalPortalPageId = portalPage.getOriginalPortalPageId(); String portalPortletId = portalPortlet.getString("portalPortletId"); String portletSeqId = portalPortlet.getString("portletSeqId"); + String columnSeqId = portalPortlet.getString("columnSeqId"); String confMode = portalPage.getConfMode(context); String editFormName = portalPortlet.getString("editFormName"); String editFormLocation = portalPortlet.getString("editFormLocation"); - + String prevPortletId = (String) context.get("prevPortletId"); String prevPortletSeqId = (String) context.get("prevPortletSeqId"); String nextPortletId = (String) context.get("nextPortletId"); String nextPortletSeqId = (String) context.get("nextPortletSeqId"); String prevColumnSeqId = (String) context.get("prevColumnSeqId"); String nextColumnSeqId = (String) context.get("nextColumnSeqId"); - + Map<String, String> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); String delPortletHint = ""; String editAttributeHint = ""; @@ -930,6 +931,8 @@ public class MacroScreenRenderer impleme sr.append(nextPortletId); sr.append("\" nextPortletSeqId=\""); sr.append(nextPortletSeqId); + sr.append("\" columnSeqId=\""); + sr.append(columnSeqId); sr.append("\" prevColumnSeqId=\""); sr.append(prevColumnSeqId); sr.append("\" nextColumnSeqId=\""); Modified: ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl?rev=1056670&r1=1056669&r2=1056670&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl (original) +++ ofbiz/trunk/framework/widget/templates/htmlScreenMacroLibrary.ftl Sat Jan 8 09:13:17 2011 @@ -157,7 +157,16 @@ ${menuString} <#macro renderPortalPageColumnBegin originalPortalPageId portalPageId columnSeqId confMode="false" width="auto" delColumnLabel="Delete column" delColumnHint="Delete this column" addPortletLabel="Add portlet" addPortletHint="Add a new portlet to this column" colWidthLabel="Col. width:" setColumnSizeHint="Set column size"> <#assign columnKey = portalPageId+columnSeqId> <#assign columnKeyFields = '<input name="portalPageId" value="' + portalPageId + '" type="hidden"/><input name="columnSeqId" value="' + columnSeqId + '" type="hidden"/>'> - <td class="portal-column<#if confMode == "true">-config</#if>" style="vertical-align: top; <#if width?has_content> width:${width};</#if>" id="portalColumn_${columnSeqId}"> + <script type="text/javascript"> + if (typeof SORTABLE_COLUMN_LIST != "undefined") { + if (SORTABLE_COLUMN_LIST == null) { + SORTABLE_COLUMN_LIST = "#portalColumn_${columnSeqId}"; + } else { + SORTABLE_COLUMN_LIST += ", #portalColumn_${columnSeqId}"; + } + } + </script> + <td class="portal-column<#if confMode == "true">-config</#if> connectedSortable" style="vertical-align: top; <#if width?has_content> width:${width};</#if>" id="portalColumn_${columnSeqId}"> <#if confMode == "true"> <div class="portal-column-config-title-bar"> <ul> @@ -189,10 +198,10 @@ ${menuString} </td> </#macro> -<#macro renderPortalPagePortletBegin originalPortalPageId portalPageId portalPortletId portletSeqId prevPortletId="" prevPortletSeqId="" nextPortletId="" nextPortletSeqId="" prevColumnSeqId="" nextColumnSeqId="" confMode="false" delPortletHint="Remove this portlet" editAttribute="false" editAttributeHint="Edit portlet parameters"> +<#macro renderPortalPagePortletBegin originalPortalPageId portalPageId portalPortletId portletSeqId prevPortletId="" prevPortletSeqId="" nextPortletId="" nextPortletSeqId="" columnSeqId="" prevColumnSeqId="" nextColumnSeqId="" confMode="false" delPortletHint="Remove this portlet" editAttribute="false" editAttributeHint="Edit portlet parameters"> <#assign portletKey = portalPageId+portalPortletId+portletSeqId> <#assign portletKeyFields = '<input name="portalPageId" value="' + portalPageId + '" type="hidden"/><input name="portalPortletId" value="' + portalPortletId + '" type="hidden"/><input name="portletSeqId" value="' + portletSeqId + '" type="hidden"/>'> - <div id="PP_${portletKey}" name="portalPortlet" class="noClass"> + <div id="PP_${portletKey}" name="portalPortlet" class="noClass" portalPageId="${portalPageId}" portalPortletId="${portalPortletId}" columnSeqId="${columnSeqId}" portletSeqId="${portletSeqId}"> <#if confMode == "true"> <div class="portlet-config" id="PPCFG_${portletKey}"> <div class="portlet-config-title-bar"> |
| Free forum by Nabble | Edit this page |
