[Erp5-report] r41543 gabriel - in /erp5/trunk/bt5/erp5_web_ung_theme: PathTemplateItem/web_...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Dec 20 14:19:17 CET 2010


Author: gabriel
Date: Mon Dec 20 14:19:16 2010
New Revision: 41543

URL: http://svn.erp5.org?rev=41543&view=rev
Log:
2010-12-20 gabriel
* Initial implementation to share documents in UNG.
* Added redirect to be possible open the document with the key.

Added:
    erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_renderer.xml
    erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_shareDocument.xml
Modified:
    erp5/trunk/bt5/erp5_web_ung_theme/PathTemplateItem/web_site_module/ung.xml
    erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_js/ung.js.xml
    erp5/trunk/bt5/erp5_web_ung_theme/bt/change_log
    erp5/trunk/bt5/erp5_web_ung_theme/bt/revision

Modified: erp5/trunk/bt5/erp5_web_ung_theme/PathTemplateItem/web_site_module/ung.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/PathTemplateItem/web_site_module/ung.xml?rev=41543&r1=41542&r2=41543&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/PathTemplateItem/web_site_module/ung.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ung_theme/PathTemplateItem/web_site_module/ung.xml [utf8] Mon Dec 20 14:19:16 2010
@@ -159,6 +159,10 @@
             <value> <string>erp5_web_ung_content_layout</string> </value>
         </item>
         <item>
+            <key> <string>custom_render_method_id</string> </key>
+            <value> <string>WebSection_renderer</string> </value>
+        </item>
+        <item>
             <key> <string>description</string> </key>
             <value>
               <none/>

Added: erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_renderer.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_renderer.xml?rev=41543&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_renderer.xml (added)
+++ erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_renderer.xml [utf8] Mon Dec 20 14:19:16 2010
@@ -0,0 +1,135 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>if context.REQUEST.form.has_key("key"):\n
+  webpage = context.portal_catalog.getResultValue(reference=context.REQUEST.form.get("key"))\n
+  webpage_id = webpage.getId()\n
+  editor_name = context.Base_getEditorViewName(webpage.getPortalType())\n
+  return context.Base_redirect("/web_page_module/%s/%s" % (webpage_id, editor_name),\n
+                              keep_items=dict(editable_mode=1))\n
+else:\n
+  return context.Base_redirect("unfoldDomain", \n
+                               keep_items = dict(domain_url="ung_domain/all_document_list",\n
+                                                 form_id="erp5_web_ung_layout",\n
+                                                 list_selection_name="ung_document_list_selection",\n
+                                                 domain_depth=0,\n
+                                                 reset=1))\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>webpage</string>
+                            <string>webpage_id</string>
+                            <string>editor_name</string>
+                            <string>dict</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>WebSection_renderer</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_shareDocument.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_shareDocument.xml?rev=41543&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_shareDocument.xml (added)
+++ erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_shareDocument.xml [utf8] Mon Dec 20 14:19:16 2010
@@ -0,0 +1,122 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>if context.getReference().startswith("default-"):\n
+  context.setReference(DateTime().millis())\n
+return "%s/?key=%s" % (context.REQUEST.get("URL3"), context.getReference())\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>DateTime</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>WebSection_shareDocument</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_js/ung.js.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_js/ung.js.xml?rev=41543&r1=41542&r2=41543&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_js/ung.js.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/ung_js/ung.js.xml [utf8] Mon Dec 20 14:19:16 2010
@@ -116,7 +116,7 @@ $(document).ready(function(){\n
     if (getWebEditorName() == "WebPage_viewEditor")\n
      $("div.content").css({"top": "5em"});\n
     if (getWebEditorName() == "WebTable_viewEditor")\n
-     $("div.content").css({"top": "7em"});\n
+     $("div.content").css({"top": "6em"});\n
   }\n
   $("a[name=\'document_title\']").html(getObjectPropertyValue("getTitle"));\n
   $("input#upload").click(function(event){\n
@@ -168,6 +168,17 @@ $(document).ready(function(){\n
           },\n
    });\n
   });\n
+  $("div.action_menu li ul").append("<li><a id=\'share_document\' href=\'#\'>" + \n
+                                    "<h6>Share this Document</h6></a></li>");\n
+  $("div.action_menu li ul").css("height", 101);\n
+  $("div.action_menu ul li a#share_document").click(function(event){\n
+    event.preventDefault();\n
+    reference = $.ajax({\n
+                  url: \'WebSection_shareDocument\',\n
+                  async: false,\n
+                }).responseText;\n
+    alert(reference);\n
+  });\n
  }\n
  $("#edit_document").dialog({\n
     autoOpen: false,\n

Modified: erp5/trunk/bt5/erp5_web_ung_theme/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/bt/change_log?rev=41543&r1=41542&r2=41543&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ung_theme/bt/change_log [utf8] Mon Dec 20 14:19:16 2010
@@ -1,3 +1,7 @@
+2010-12-20 gabriel
+* Initial implementation to share documents in UNG.
+* Added redirect to be possible open the document with the key.
+
 2010-12-16 gabriel
 * Implemented feature to change the state of Document via UNG Theme
 

Modified: erp5/trunk/bt5/erp5_web_ung_theme/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_ung_theme/bt/revision?rev=41543&r1=41542&r2=41543&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_ung_theme/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_ung_theme/bt/revision [utf8] Mon Dec 20 14:19:16 2010
@@ -1 +1 @@
-132
\ No newline at end of file
+134
\ No newline at end of file



More information about the Erp5-report mailing list