Commit bb655f5d authored by Rafael Monnerat's avatar Rafael Monnerat

Use UrlMixin instead ad-hoc implementation of samething.

parent 77158e5b
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</item> </item>
<item> <item>
<key> <string>priority</string> </key> <key> <string>priority</string> </key>
<value> <float>1.0</float> </value> <value> <float>1.1</float> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -55,7 +55,9 @@ ...@@ -55,7 +55,9 @@
<item> <item>
<key> <string>type_mixin</string> </key> <key> <string>type_mixin</string> </key>
<value> <value>
<tuple/> <tuple>
<string>UrlMixin</string>
</tuple>
</value> </value>
</item> </item>
</dictionary> </dictionary>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document_url_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: \'\'</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -50,17 +50,21 @@ ...@@ -50,17 +50,21 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if document_url is not None or not document_url:\n <value> <string>translateString = context.Base_translateString\n
\n
if document_url is not None or not document_url:\n
context.setTextContent(context.ERP5RunMyDocs_importWebPage(document_url))\n context.setTextContent(context.ERP5RunMyDocs_importWebPage(document_url))\n
context.setDocumentUrl(document_url)\n context.fromURL(document_url)\n
translateString = context.Base_translateString\n
portal_status_message = "Web Page successfully imported"\n portal_status_message = "Web Page successfully imported"\n
context.Base_redirect(\'view\', keep_items = dict(portal_status_message=translateString(portal_status_message)))\n else:\n
portal_status_message = "Url was not Provided."\n
\n
context.Base_redirect(\'view\', keep_items = dict(portal_status_message=translateString(portal_status_message)))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>document_url = \'\'</string> </value> <value> <string>document_url=\'\'</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<string>my_title</string> <string>my_title</string>
<string>my_short_title</string> <string>my_short_title</string>
<string>my_reference</string> <string>my_reference</string>
<string>my_document_url</string> <string>my_url_string</string>
<string>my_annotation</string> <string>my_annotation</string>
</list> </list>
</value> </value>
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<value> <value>
<list> <list>
<string>description</string> <string>description</string>
<string>title</string>
<string>display_width</string> <string>display_width</string>
<string>title</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>default</string>
<string>description</string> <string>description</string>
<string>editable</string> <string>editable</string>
<string>title</string> <string>title</string>
...@@ -18,7 +19,7 @@ ...@@ -18,7 +19,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_document_url</string> </value> <value> <string>my_url_string</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -54,6 +55,20 @@ ...@@ -54,6 +55,20 @@
<key> <string>tales</string> </key> <key> <string>tales</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -66,6 +81,10 @@ ...@@ -66,6 +81,10 @@
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -73,6 +92,10 @@ ...@@ -73,6 +92,10 @@
<key> <string>values</string> </key> <key> <string>values</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>The URL of the original document</string> </value> <value> <string>The URL of the original document</string> </value>
...@@ -103,4 +126,17 @@ ...@@ -103,4 +126,17 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/asURL</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>not:here/isExternalDocument</string> </value> <value> <string>here/isExternalDocument</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
16 17
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment