Author: jleroux
Date: Tue Jan 18 13:51:10 2011
New Revision: 1060377

URL: http://svn.apache.org/viewvc?rev=1060377&view=rev
Log:
A patch from Sascha "Small issues in Content/CMS " 
(https://issues.apache.org/jira/browse/OFBIZ-4111) - OFBIZ-4111

Martin Kreidenweis fixed some issues in Content/ CMS (see 
https://demo-trunk.ofbiz.apache.org/content/control/WebSiteCms?webSiteId=CmsSite)

So now it works, but he simultaneoulsy signaled some points.
    * He used regular form submit instead of ajax for new content for now, thus:
          o ajaxSubmitForm() can't handle new content, it won't reload the form 
because it doesn't know the new contentId
            + some controller changes would probably be necessary to make that 
work (return new contentId as JSON)
          o nav tree is not updated with ajax submit currently

Sascha:I think there is no need to rewrite all the create content methods to 
return a JSON Object, we can simply use the initial select function from the js 
tree.
When i now create a new long/short text and do a "real" form submit the tree 
notice the new contentId from the parameters and select the corresponding tree 
node.

JLR: I agree with Sascha, it works well

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

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=1060377&r1=1060376&r2=1060377&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl 
(original)
+++ ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl 
Tue Jan 18 13:51:10 2011
@@ -132,6 +132,9 @@ var rawdata_errors = [
             "core" : {
                 "html_titles" : true,
             },
+            "ui" : {
+                "initially_select" : ["${parameters.contentId!}"]
+            },
             "json_data" : {
                 "data" : rawdata_subsites,
                 "progressive_render" : false


Reply via email to