svn commit: r1057775 - in /ofbiz/trunk/applications/content: webapp/content/website/WebSiteCMSNav.ftl widget/WebSiteScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1057775 - in /ofbiz/trunk/applications/content: webapp/content/website/WebSiteCMSNav.ftl widget/WebSiteScreens.xml

jleroux@apache.org
Author: jleroux
Date: Tue Jan 11 18:04:19 2011
New Revision: 1057775

URL: http://svn.apache.org/viewvc?rev=1057775&view=rev
Log:
A patch from Martin Kreidenweis "Links to Path Alias and Meta Tags in CMS don't work any more" (https://issues.apache.org/jira/browse/OFBIZ-4108) - OFBIZ-4108

* Go to https://demo-trunk.ofbiz.apache.org/content/control/WebSiteCms?webSiteId=WebStore
* Select some content, e.g. "Store Policies"
* Try to click the "Path Alias" or "Meta Tags" links at the top. They cause a JavaScript error: "destroyEditor is not defined"

This patch removes calls to non-existing destroyEditor() javascript function, fixes the url to the path alias, and adds the missing screenlets to the path alias and meta tags screens

Modified:
    ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl
    ofbiz/trunk/applications/content/widget/WebSiteScreens.xml

Modified: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl?rev=1057775&r1=1057774&r2=1057775&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl (original)
+++ ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl Tue Jan 11 18:04:19 2011
@@ -370,9 +370,6 @@ var rawdata_errors = [
 function callMetaInfo(contentId) {
         var ctx = {"contentId" : contentId, "webSiteId" : webSiteId};
 
-        // destroy the editor
-        destroyEditor();
-
         jQuery.ajax({
             url: metaUrl,
             type: 'POST',
@@ -390,12 +387,9 @@ function callMetaInfo(contentId) {
     function callPathAlias(contentId) {
         var ctx = {"contentId" : contentId, "webSiteId" : webSiteId};
 
-        // destroy the editor
-        destroyEditor();
-
         // get the alias screen
         jQuery.ajax({
-            url: metaUrl,
+            url: aliasUrl,
             type: 'POST',
             data: ctx,
             error: function(msg) {

Modified: ofbiz/trunk/applications/content/widget/WebSiteScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/WebSiteScreens.xml?rev=1057775&r1=1057774&r2=1057775&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/WebSiteScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/WebSiteScreens.xml Tue Jan 11 18:04:19 2011
@@ -288,15 +288,20 @@ under the License.
                 <set field="webSiteId" from-field="parameters.webSiteId"/>
                 <set field="contentId" from-field="parameters.contentId"/>
                 <entity-one entity-name="Content" value-field="content"/>
+                <property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="CommonUiLabels" map-name="uiLabelMap"/>
                 <script location="component://content/webapp/content/WEB-INF/actions/website/WebSiteCMSMetaInfo.groovy"/>
             </actions>
             <widgets>
-                <platform-specific>
-                    <html>
-                        <html-template location="component://content/webapp/content/website/WebSiteCMSMeta.ftl"/>
-                    </html>
-                </platform-specific>
+                <container id="cmscontent" style="no-clear">
+                    <screenlet title="${uiLabelMap.PageTitleWebSiteCMSContent}">
+                        <platform-specific>
+                            <html>
+                                <html-template location="component://content/webapp/content/website/WebSiteCMSMeta.ftl"/>
+                            </html>
+                        </platform-specific>
+                    </screenlet>
+                </container>
             </widgets>
         </section>
     </screen>
@@ -306,6 +311,7 @@ under the License.
             <actions>
                 <set field="webSiteId" from-field="parameters.webSiteId"/>
                 <set field="contentId" from-field="parameters.contentId"/>
+                <property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
                 <entity-one entity-name="WebSite" value-field="webSite"/>
                 <entity-one entity-name="Content" value-field="content"/>
                 <entity-and entity-name="WebSitePathAlias" list="aliases">
@@ -314,11 +320,15 @@ under the License.
                 </entity-and>
             </actions>
             <widgets>
-                <platform-specific>
-                    <html>
-                        <html-template location="component://content/webapp/content/website/WebSiteCMSPathAlias.ftl"/>
-                    </html>
-                </platform-specific>
+                <container id="cmscontent" style="no-clear">
+                    <screenlet title="${uiLabelMap.PageTitleWebSiteCMSContent}">
+                        <platform-specific>
+                            <html>
+                                <html-template location="component://content/webapp/content/website/WebSiteCMSPathAlias.ftl"/>
+                            </html>
+                        </platform-specific>
+                    </screenlet>
+                </container>
             </widgets>
         </section>
     </screen>