Commit 288dca68 authored by Gabriel Monnerat's avatar Gabriel Monnerat

2010-12-10 gabriel

* Refactored code to be possible make upload of Spreadsheet Documents.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41343 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d70e72e2
......@@ -50,9 +50,14 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>document = context.Base_contribute(file=file, \n
<value> <string>portal_type_dict = {"Web Page": "Text",\n
"Web Table": "Spreadsheet",\n
"Web Illustration": "Drawing"}\n
\n
portal_type = context.REQUEST.form.get("portal_type")\n
document = context.Base_contribute(file=file, \n
url=None, \n
portal_type="Text", \n
portal_type=portal_type_dict.get(portal_type), \n
synchronous_metadata_discovery=None, \n
redirect_to_document=False, \n
attach_document_to_context=False, \n
......@@ -65,7 +70,7 @@
follow_up_list=None, \n
)\n
\n
return context.ERP5Site_createNewWebDocument(selection_action="Web Page",\n
return context.ERP5Site_createNewWebDocument(selection_action=portal_type,\n
document_path=document.getPath(),\n
upload_document=1)\n
</string> </value>
......@@ -106,8 +111,10 @@ return context.ERP5Site_createNewWebDocument(selection_action="Web Page",\n
<tuple>
<string>file</string>
<string>kw</string>
<string>portal_type_dict</string>
<string>_getattr_</string>
<string>context</string>
<string>portal_type</string>
<string>None</string>
<string>False</string>
<string>document</string>
......
......@@ -70,6 +70,12 @@
<form action="WebSection_uploadDocument" method="post" enctype="multipart/form-data">\n
<fieldset id="file_box">\n
<input type="file" size="30" name="file">\n
<select name="portal_type">\n
<option value="Web Page">Web Page</option>\n
<option value="Web Illustration">Web Illustration</option>\n
<option value="Web Table">Web Table</option>\n
</select>\n
<br />\n
<input type="submit" value="Submit" id="submit_document">\n
</fieldset>\n
</form> \n
......
......@@ -849,7 +849,7 @@ a.domain_selected {\n
}\n
\n
div#upload_document {\n
height: 36px !important;\n
height: 58px !important;\n
width: 390px !important;\n
font-size: 12px;\n
}\n
......
2010-12-10 gabriel
* Refactored code to be possible make upload of Spreadsheet Documents.
2010-12-10 gabriel
* Added box and feature to make upload of Text documents.
......
Experimental theme to provide an UNG experience as part of an ERP5 web site.
TODO:
- define naming conventions for jquery
\ No newline at end of file
- Define naming conventions for jquery
- Clean up the javascript code
- SpreadSheet Formula is ignored when the document is uploaded
\ No newline at end of file
108
\ No newline at end of file
110
\ 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