Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matevz Golob
erp5
Commits
2ee47c39
Commit
2ee47c39
authored
Mar 13, 2013
by
Lingnan Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the new presentation.
parent
380a7837
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
962 additions
and
65 deletions
+962
-65
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb.xml
...plateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb.xml
+3
-2
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb/js.xml
...teItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb/js.xml
+60
-13
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb/navigation.xml
...ortal_skins/erp5_dms/OOoDocument_viewAsWeb/navigation.xml
+84
-37
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb/page_content.xml
...tal_skins/erp5_dms/OOoDocument_viewAsWeb/page_content.xml
+158
-0
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Presentation_renderHTMLPreviewNavigation.xml
...ins/erp5_dms/Presentation_renderHTMLPreviewNavigation.xml
+124
-0
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Presentation_renderSlidePage.xml
...em/portal_skins/erp5_dms/Presentation_renderSlidePage.xml
+283
-0
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Presentation_renderWithNavigation.xml
...rtal_skins/erp5_dms/Presentation_renderWithNavigation.xml
+67
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml
...inTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml
+30
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/images/slide.png.xml
...teItem/portal_skins/erp5_xhtml_style/images/slide.png.xml
+57
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/images/text.png.xml
...ateItem/portal_skins/erp5_xhtml_style/images/text.png.xml
+58
-0
product/ERP5/mixin/extensible_traversable.py
product/ERP5/mixin/extensible_traversable.py
+2
-0
product/ERP5OOo/Document/OOoDocument.py
product/ERP5OOo/Document/OOoDocument.py
+36
-13
No files found.
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb.xml
View file @
2ee47c39
...
...
@@ -66,7 +66,6 @@
<key>
<string>
bottom
</string>
</key>
<value>
<list>
<string>
iframe_content
</string>
<string>
download_pdf
</string>
</list>
</value>
...
...
@@ -75,7 +74,9 @@
<key>
<string>
webcontent header bottom
</string>
</key>
<value>
<list>
<string>
my_title
</string>
<string>
navigation
</string>
<string>
page_content
</string>
<string>
js
</string>
</list>
</value>
</item>
...
...
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb/
iframe_content
.xml
→
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb/
js
.xml
View file @
2ee47c39
...
...
@@ -11,14 +11,15 @@
<value>
<list>
<string>
css_class
</string>
<string>
description
</string>
<string>
enabled
</string>
<string>
default
</string>
<string>
editable
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
iframe_content
</string>
</value>
<value>
<string>
js
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
...
...
@@ -59,11 +60,13 @@
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
e
nabled
</string>
</key>
<key>
<string>
e
ditable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
...
...
@@ -78,6 +81,12 @@
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -87,32 +96,70 @@
<dictionary>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string>
page iframe
hidden_label
</string>
</value>
<value>
<string>
hidden_label
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
<key>
<string>
default
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<script tal:content="structure here/WebSection_renderSubscriptionRequestFormValidator">
</script>
]]>
</string>
</value>
</item>
<item>
<key>
<string>
e
nabled
</string>
</key>
<value>
<int>
1
</int>
</value>
<key>
<string>
e
ditable
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
iframe_content
</string>
</value>
<value>
<string>
my_editor_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
WebPag
e_viewFieldLibrary
</string>
</value>
<value>
<string>
Bas
e_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Editor Field
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</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
encoding=
"cdata"
>
<![CDATA[
python:\'<script>
%s
</script>
\' % here.Presentation_renderSlidePage()
]]>
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
string:
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb/
my_title
.xml
→
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb/
navigation
.xml
View file @
2ee47c39
...
...
@@ -2,13 +2,13 @@
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"
StringField"
module=
"Products.Formulator.StandardFields
"
/>
<global
name=
"
EditorField"
module=
"Products.ERP5Form.EditorField
"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_title
</string>
</value>
<value>
<string>
navigation
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
...
...
@@ -18,13 +18,21 @@
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
<item>
<key>
<string>
line_too_long
</string>
</key>
<value>
<string>
A line was too long.
</string>
</value>
</item>
<item>
<key>
<string>
required_not_found
</string>
</key>
<value>
<string>
Input is required but no input given.
</string>
</value>
</item>
<item>
<key>
<string>
too_long
</string>
</key>
<value>
<string>
Too much input was given.
</string>
</value>
<value>
<string>
You entered too many characters.
</string>
</value>
</item>
<item>
<key>
<string>
too_many_lines
</string>
</key>
<value>
<string>
You entered too many lines.
</string>
</value>
</item>
</dictionary>
</value>
...
...
@@ -49,14 +57,6 @@
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_maxwidth
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -73,6 +73,10 @@
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -81,16 +85,24 @@
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_linelength
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_lines
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
t
itle
</string>
</key>
<key>
<string>
t
ext_editor
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
t
runcat
e
</string>
</key>
<key>
<string>
t
itl
e
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
...
...
@@ -101,6 +113,10 @@
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -118,20 +134,14 @@
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_maxwidth
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -148,6 +158,10 @@
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -156,16 +170,24 @@
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_linelength
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_lines
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
t
itle
</string>
</key>
<key>
<string>
t
ext_editor
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
t
runcat
e
</string>
</key>
<key>
<string>
t
itl
e
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
...
...
@@ -176,6 +198,10 @@
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -189,7 +215,7 @@
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string>
h
eadline
</string>
</value>
<value>
<string>
h
idden_label
</string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
...
...
@@ -197,16 +223,8 @@
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The name of a document in ERP5
</string>
</value>
</item>
<item>
<key>
<string>
display_maxwidth
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_width
</string>
</key>
<value>
<int>
40
</int>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
0
</int>
</value>
...
...
@@ -223,6 +241,10 @@
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
5
</int>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
...
...
@@ -231,17 +253,25 @@
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_linelength
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_lines
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
t
itle
</string>
</key>
<value>
<string>
Title
</string>
</value>
<key>
<string>
t
ext_editor
</string>
</key>
<value>
<string>
text_area
</string>
</value>
</item>
<item>
<key>
<string>
t
runcat
e
</string>
</key>
<value>
<
int>
0
</int
>
</value>
<key>
<string>
t
itl
e
</string>
</key>
<value>
<
string>
Navigation
</string
>
</value>
</item>
<item>
<key>
<string>
unicode
</string>
</key>
...
...
@@ -251,10 +281,27 @@
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
40
</int>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</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/Presentation_renderHTMLPreviewNavigation
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb/page_content.xml
0 → 100644
View file @
2ee47c39
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"LabelField"
module=
"Products.Formulator.StandardFields"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
page_content
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary/>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</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>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<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>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
page_content
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</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
encoding=
"cdata"
>
<![CDATA[
python:\'<div id="slide_content">
</div>
\'
]]>
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Presentation_renderHTMLPreviewNavigation.xml
0 → 100644
View file @
2ee47c39
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<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_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<unicode
encoding=
"cdata"
>
<![CDATA[
<tal:block>
\n
<div
class=
"presentation-preview-navigation"
>
\n
<a
id=
"first_slide"
>
\n
<img
id=
"first_slide_img"
src=
"images/transparent-image.gif"
\n
i18n:attributes=
"alt; title"
\n
i18n:domain=
"ui"
\n
alt=
"First"
\n
title=
"First"
\n
class=
"first"
/>
\n
</a>
\n
<a
id=
"previous_slide"
>
\n
<img
id=
"previous_slide_img"
src=
"images/transparent-image.gif"
\n
i18n:attributes=
"alt; title"
\n
i18n:domain=
"ui"
\n
alt=
"Previous"
\n
title=
"Previous"
\n
class=
"previous"
/>
\n
</a>
\n
\n
<!-- Current Thumbnail / Total Thumbnails -->
\n
<input
id=
"slide_selection_index"
\n
size=
"1"
\n
value=
"1"
/>
\n
/
<span
id=
"slides_total_number"
>
1
</span>
\n
\n
<a
id=
"next_slide"
>
\n
<img
id=
"next_slide_img"
src=
"images/transparent-image.gif"
\n
i18n:attributes=
"alt; title"
\n
i18n:domain=
"ui"
\n
alt=
"Next"
\n
title=
"Next"
\n
class=
"next"
/>
\n
</a>
\n
<a
id=
"last_slide"
>
\n
<img
id=
"last_slide_img"
src=
"images/transparent-image.gif"
\n
i18n:attributes=
"alt; title"
\n
i18n:domain=
"ui"
\n
alt=
"Last"
\n
title=
"Last"
\n
class=
"last"
/>
\n
</a>
\n
<a
id=
"text_slide"
>
\n
<img
id=
"text_slide_img"
src=
"images/text.png"
\n
i18n:attributes=
"alt; title"
\n
i18n:domain=
"ui"
\n
alt=
"Text"
\n
title=
"Text"
\n
class=
"text"
/>
\n
</a>
\n
<a
id=
"graphics_slide"
>
\n
<img
id=
"graphics_slide_img"
src=
"images/slide.png"
\n
i18n:attributes=
"alt; title"
\n
i18n:domain=
"ui"
\n
alt=
"Graphics"
\n
title=
"Graphics"
\n
class=
"graphics"
/>
\n
</a>
\n
</div>
\n
</tal:block>
]]>
</unicode>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Presentation_renderHTMLPreviewNavigation
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Presentation_renderSlidePage.xml
0 → 100644
View file @
2ee47c39
<?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
encoding=
"cdata"
>
<![CDATA[
from json import dumps\n
\n
absolute_url = "%s" % context.absolute_url()\n
\n
return """\n
\n
var slide_current_page=""\n
var slide_current_page_number=0\n
var current_page_is_img=true\n
var slide_total_number=0\n
img_file_name_list=[]\n
text_file_name_list=[]\n
\n
function getTextFileNameList(file_name_list){\n
var text_list=[];\n
for (var i=0; i<file_name_list.length; i++) {\n
if(file_name_list[i].indexOf("text")!=-1)\n
text_list.push(file_name_list[i]);\n
}\n
text_list.sort();\n
return text_list;\n
}\n
\n
function getFileNameList(){\n
var file_name_list=[];\n
$.ajax({\n
url: %(absolute_url)s+"/"+"getPresentationFileNameList",\n
type: \'get\',\n
async: false,\n
success: function(data) {\n
file_name_list=$.parseJSON(data);\n
} \n
});\n
return file_name_list;\n
}\n
\n
function getImgFileNameList(file_name_list){\n
var img_list=[];\n
var img_list_without_first=[];\n
var img_first=[];\n
for (var i=0; i<file_name_list.length; i++) {\n
if(file_name_list[i].indexOf(".impr.")!=-1)\n
img_first.push(file_name_list[i]); \n
else if(file_name_list[i].indexOf("img")!=-1)\n
img_list_without_first.push(file_name_list[i]);\n
}\n
img_list_without_first.sort();\n
img_list=img_first.concat(img_list_without_first)\n
return img_list;\n
}\n
\n
function goToNewSlide(relative_path){\n
slide_current_page=relative_path;\n
for (var j=0; j<img_file_name_list.length; j++) {\n
if (img_file_name_list[j].match(slide_current_page)){\n
slide_current_page_number=j;\n
current_page_is_img=true; \n
}\n
}\n
for (var j=0; j<text_file_name_list.length; j++) {\n
if (text_file_name_list[j].match(slide_current_page)){\n
slide_current_page_number=j;\n
current_page_is_img=false; \n
}\n
}\n
$.ajax({\n
url: %(absolute_url)s+"/"+relative_path,\n
type: \'get\',\n
async: false,\n
success: function(data) {\n
$(\'#slide_content\').html(data);\n
} \n
});\n
renderNavigation();\n
deleteTheDefaultNavigation();\n
$("#slide_selection_index").val(slide_current_page_number+1);\n
}\n
\n
function deleteTheDefaultNavigation(){\n
if(slide_current_page_number!=0 && slide_current_page_number+1!=slide_total_number)\n
for(var i=1;i<11;i++)\n
$("#slide_content").contents().get(1).remove();\n
else\n
for(var i=1;i<7;i++)\n
$("#slide_content").contents().get(1).remove();\n
}\n
\n
function hideOneNavigation(nav_id,nav_img_id,nav_img_class){\n
$("#"+nav_id).attr("onclick","");\n
$("#"+nav_id).css("cursor","default")\n
$("#"+nav_img_id).attr("class",nav_img_class);\n
}\n
\n
function resetOneNavigation(nav_id,nav_img_id,nav_img_class,new_href){\n
$("#"+nav_id).attr("onclick","goToNewSlide(\'"+new_href+"\')");\n
$("#"+nav_id).css("cursor","pointer")\n
$("#"+nav_img_id).attr("class",nav_img_class);\n
}\n
\n
function renderNavigation(){\n
if(slide_current_page_number==0){\n
hideOneNavigation("first_slide","first_slide_img","first shaded")\n
hideOneNavigation("previous_slide","previous_slide_img","previous shaded")\n
if(current_page_is_img){\n
resetOneNavigation("next_slide","next_slide_img","next",img_file_name_list[slide_current_page_number+1])\n
resetOneNavigation("last_slide","last_slide_img","last",img_file_name_list[slide_total_number-1])\n
resetOneNavigation("text_slide","text_slide_img","text",text_file_name_list[slide_current_page_number])\n
hideOneNavigation("graphics_slide","graphics_slide_img","graphics hidden")\n
}\n
else{\n
resetOneNavigation("next_slide","next_slide_img","next",text_file_name_list[slide_current_page_number+1])\n
resetOneNavigation("last_slide","last_slide_img","last",text_file_name_list[slide_total_number-1])\n
resetOneNavigation("graphics_slide","graphics_slide_img","graphics",img_file_name_list[slide_current_page_number])\n
hideOneNavigation("text_slide","text_slide_img","text hidden")\n
}\n
}\n
else if(slide_current_page_number+1==slide_total_number){\n
if(current_page_is_img){\n
resetOneNavigation("first_slide","first_slide_img","first",img_file_name_list[0])\n
resetOneNavigation("previous_slide","previous_slide_img","previous",img_file_name_list[slide_current_page_number-1])\n
resetOneNavigation("text_slide","text_slide_img","text",text_file_name_list[slide_current_page_number])\n
hideOneNavigation("graphics_slide","graphics_slide_img","graphics hidden")\n
}\n
else{\n
resetOneNavigation("first_slide","first_slide_img","first",text_file_name_list[0])\n
resetOneNavigation("previous_slide","previous_slide_img","previous",text_file_name_list[slide_current_page_number-1])\n
resetOneNavigation("graphics_slide","graphics_slide_img","graphics",img_file_name_list[slide_current_page_number])\n
hideOneNavigation("text_slide","text_slide_img","text hidden")\n
}\n
hideOneNavigation("next_slide","next_slide_img","next shaded")\n
hideOneNavigation("last_slide","last_slide_img","last shaded")\n
}\n
else{\n
if(current_page_is_img){\n
resetOneNavigation("first_slide","first_slide_img","first",img_file_name_list[0])\n
resetOneNavigation("previous_slide","previous_slide_img","previous",img_file_name_list[slide_current_page_number-1])\n
resetOneNavigation("next_slide","next_slide_img","next",img_file_name_list[slide_current_page_number+1])\n
resetOneNavigation("last_slide","last_slide_img","last",img_file_name_list[slide_total_number-1])\n
resetOneNavigation("text_slide","text_slide_img","text",text_file_name_list[slide_current_page_number])\n
hideOneNavigation("graphics_slide","graphics_slide_img","graphics hidden")\n
}\n
else{\n
resetOneNavigation("first_slide","first_slide_img","first",text_file_name_list[0])\n
resetOneNavigation("previous_slide","previous_slide_img","previous",text_file_name_list[slide_current_page_number-1])\n
resetOneNavigation("next_slide","next_slide_img","next",text_file_name_list[slide_current_page_number+1])\n
resetOneNavigation("last_slide","last_slide_img","last",text_file_name_list[slide_total_number-1])\n
resetOneNavigation("graphics_slide","graphics_slide_img","graphics",img_file_name_list[slide_current_page_number])\n
hideOneNavigation("text_slide","text_slide_img","text hidden")\n
}\n
}\n
}\n
\n
function checkTheSelectionFieldAndGoToNewSlide(next_page_number,file_list){\n
//if entered number bigger than total number, go to last page, else incorrect number go to first page\n
if( next_page_number>
1
&&
next_page_number
<slide_total_number
){\n
real_page_number=
next_page_number-1;\n
goToNewSlide(file_list[real_page_number]);\n
}\n
else
if(next_page_number
>
=slide_total_number){\n
real_page_number=slide_total_number-1\n
goToNewSlide(file_list[real_page_number]);\n
}\n
else{\n
goToNewSlide(file_list[0]);\n
}\n
}\n
\n
function redirectPresentationPage(){\n
next_page_number = $("#slide_selection_index").val()\n
//Graphic pages\n
if(current_page_is_img){\n
checkTheSelectionFieldAndGoToNewSlide(next_page_number,img_file_name_list)\n
}\n
//Text pages\n
else{\n
checkTheSelectionFieldAndGoToNewSlide(next_page_number,text_file_name_list)\n
}\n
}\n
\n
function preventEnterKeyInGlobal(){\n
$(function(){\n
var keyStop = {\n
13: "input:text", // stop enter = submit \n
end: null\n
};\n
$(document).bind("keydown", function(event){\n
var selector = keyStop[event.which];\n
if(selector !== undefined
&&
$(event.target).is(selector)) {\n
event.preventDefault(); //stop event\n
}\n
return true;\n
});\n
});\n
}\n
\n
$(document).ready(function() {\n
file_name_list=getFileNameList();\n
img_file_name_list=getImgFileNameList(file_name_list);\n
text_file_name_list=getTextFileNameList(file_name_list);\n
slide_total_number=file_name_list.length/2;\n
$("#slides_total_number").text(slide_total_number);\n
$("#slide_selection_index").keyup(function(event) {\n
if (event.keyCode==13) {\n
redirectPresentationPage()\n
}\n
});\n
goToNewSlide(img_file_name_list[0]);\n
preventEnterKeyInGlobal();\n
});\n
\n
""" % dict(\n
absolute_url = dumps(absolute_url)\n
)\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Presentation_renderSlidePage
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Presentation_renderWithNavigation.xml
0 → 100644
View file @
2ee47c39
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<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_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<unicode
encoding=
"cdata"
>
<![CDATA[
<!--The content of the presentation-->
\n
<tal:block
tal:content=
"structure options/data"
/>
]]>
</unicode>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Presentation_renderWithNavigation
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml
View file @
2ee47c39
...
...
@@ -1418,6 +1418,36 @@ div.pdf-preview-navigation img.last{\n
background-image:url("images/2rightarrowb.png");\n
}\n
\n
/* DMS Presentation navigation \n
XXX: probably part of erp5_dms.bt5 */\n
div.presentation-preview-navigation img{\n
width: 22px;\n
height: 22px;\n
margin-right: 1px;\n
background-repeat: no-repeat;\n
vertical-align: middle;\n
}\n
\n
div.presentation-preview-navigation img.shaded{\n
opacity: 0.2;\n
}\n
\n
div.presentation-preview-navigation img.first{\n
background-image:url("images/2leftarrowb.png");\n
}\n
\n
div.presentation-preview-navigation img.previous{\n
background-image:url("images/1leftarrowb.png");\n
}\n
\n
div.presentation-preview-navigation img.next{\n
background-image:url("images/1rightarrowb.png");\n
}\n
\n
div.presentation-preview-navigation img.last{\n
background-image:url("images/2rightarrowb.png");\n
}\n
\n
.horizontal_align_form_box > div.input {\n
float: right;\n
width: 70%; /* because label width is 30%*/\n
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/images/slide.png.xml
0 → 100644
View file @
2ee47c39
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Image"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts63601597.84
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
slide.png
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
image/png
</string>
</value>
</item>
<item>
<key>
<string>
data
</string>
</key>
<value>
<string
encoding=
"base64"
>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ
bWFnZVJlYWR5ccllPAAAAatJREFUeNqkU79LAzEYfclVe9dfohZswUGHOjvUVRSh4Ca4FdpdXSr0
zxDc7FawUHAUhw7SzcXFxUUcHOyBDsUWKbT3o5eYpLZ4tCqlgeTuu3zvfe99lxDOOWYZAblUKpUL
8TiaElvK5/PHkArK5TJnjE01JUZilQLxQVEeXJmAx6BxC4TocCkFBYfc1cSUZu0+Qy23NsIogn6/
r4KETmG93QKtO5DoFmhyF9SICyAXhAOG7iB1hPERtBvXsF7PoTldGF2GqB7DwlIGmqaDwAMXJK5L
JhNIPxGvC7sTge3MwfZMLK82kAgL+fMijQsTAus4XOX6CFzXVUGIBvD0bqD5aaAX0BFOLmLTCIHK
BuC7sjawMMT4FKTTe1jR58Dvb6Dt57CR2kEwFgRTZ4WoHjgefldgfpwiuh5H68EE0S/x+HIGx+0M
SgowFZ10GMdh6nlcgRy21YZlt8AzBpjbhPjhCGgR3+mhvDfeRMkmZZ1s1/Df0SZChcwZKqBy8TxP
BdVqFfV6XSVMmnJP5vzE+CwUCoU/q2ez2dG7z4JgKxWLxakvk7I063X+EmAAIPsjzZFOpdwAAAAA
SUVORK5CYII=
</string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
16
</int>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
521
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
16
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/images/text.png.xml
0 → 100644
View file @
2ee47c39
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Image"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<string>
http_cache
</string>
</value>
</item>
<item>
<key>
<string>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts65602636.96
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
text.png
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
image/png
</string>
</value>
</item>
<item>
<key>
<string>
data
</string>
</key>
<value>
<string
encoding=
"base64"
>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABOUlEQVR4XpWSsaqDQBREr5Iqvfkc
G0vRsI0pAso2gmksxK8IKWy0SCAYMH1+wNJvMQmkVxd8by+sGMXlvYHLgNw5zq4qfd/D7XZLASAA
uTLXdQ8wEQKu12vveZ40nec5QiilXxCVG2MMA+/3G16vF87z+YS6rnG4LMvie8H5fE5ngK7rEKAo
yteoqorO1bYtEEL4bpD+SgBWU0BVVTCVbdvDjuM4UBRFkCQJhGF4wDs4Ho99FEXw+XwwwJ8J56Np
2gx6Op0gjmNlJeqJBmVZYmhJuq7DZrMZMghommYAGIYhAIs+zowb4KU9Hg9pA9M00RcbbLfbpbfL
GwjA/X4fBefa7XbyBvv9XgAkjpnZf4C6XC4gE6UURpn5EXzfF/UlDSZHYIzhF1iv1/AH8V3MjAEZ
ISSA/ynj9gNx+uMEce180wAAAABJRU5ErkJggg==
</string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
16
</int>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
370
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
16
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/mixin/extensible_traversable.py
View file @
2ee47c39
...
...
@@ -215,6 +215,8 @@ class OOoDocumentExtensibleTraversableMixin(BaseExtensibleTraversableMixin):
self
.
_convert
(
format
=
'html'
)
_setCacheHeaders
(
_ViewEmulator
().
__of__
(
self
),
web_cache_kw
)
mime
,
data
=
self
.
getConversion
(
format
=
EMBEDDED_FORMAT
,
filename
=
name
)
if
name
.
endswith
(
'.html'
)
and
self
.
getPortalType
()
==
'Presentation'
:
data
=
self
.
Presentation_renderWithNavigation
(
data
=
self
.
_stripHTML
(
html
=
data
)).
encode
(
'utf-8'
)
document
=
OFSFile
(
name
,
name
,
data
,
content_type
=
mime
).
__of__
(
self
.
aq_parent
)
except
(
NotConvertedError
,
ConversionError
,
KeyError
):
document
=
DocumentExtensibleTraversableMixin
.
getExtensibleContent
(
self
,
request
,
name
)
...
...
product/ERP5OOo/Document/OOoDocument.py
View file @
2ee47c39
...
...
@@ -44,6 +44,7 @@ from Products.ERP5.Document.Document import Document, \
from
Products.ERP5.Document.Image
import
getDefaultImageQuality
from
Products.ERP5Type.Utils
import
fill_args_from_request
from
zLOG
import
LOG
,
ERROR
from
json
import
dumps
# Mixin Import
from
Products.ERP5.mixin.base_convertable
import
BaseConvertableFileMixin
...
...
@@ -273,6 +274,31 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi
# XXX: handle possible OOOd server failure
return response_dict['
mime
'], Pdata(dec(response_dict['
data
']))
def getPresentationFileNameList(self, **kw):
"""
Get the file list of name of the converted file
"""
format ="html"
original_format = format
allowed_format_list = self.getTargetFormatList()
format_list = [x for x in allowed_format_list
if x.startswith('
html
') or x.endswith('
html
')]
format = format_list[0]
# Do real conversion
mime, data = self._getConversionFromProxyServer(format)
# Extra processing required since
# we receive a zip file
cs = cStringIO.StringIO()
cs.write(str(data))
z = zipfile.ZipFile(cs) # A disk file would be more RAM efficient
mime = '
text
/
html
'
file_name_list = self._populateConversionCacheWithHTML(zip_file=z, **kw) # Maybe some parts should be asynchronous for
# better usability
z.close()
cs.close()
return dumps(file_name_list)
# Conversion API
def _convert(self, format, frame=0, **kw):
"""Convert the document to the given format.
...
...
@@ -353,21 +379,14 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi
cs
=
cStringIO
.
StringIO
()
cs
.
write
(
str
(
data
))
z
=
zipfile
.
ZipFile
(
cs
)
# A disk file would be more RAM efficient
for
f
in
z
.
infolist
():
fn
=
f
.
filename
if
fn
.
endswith
(
'html'
):
if
self
.
getPortalType
()
==
'Presentation'
\
and
not
(
fn
.
find
(
'impr'
)
>=
0
):
continue
data
=
z
.
read
(
fn
)
break
mime
=
'text/html'
self
.
_populateConversionCacheWithHTML
(
zip_file
=
z
)
# Maybe some parts should be asynchronous for
self
.
_populateConversionCacheWithHTML
(
zip_file
=
z
,
**
kw
)
# Maybe some parts should be asynchronous for
# better usability
z
.
close
()
cs
.
close
()
if
original_format
not
in
VALID_IMAGE_FORMAT_LIST
\
and
not
requires_pdf_first
:
and
not
requires_pdf_first
:
if
not
self
.
getPortalType
()
==
'Presentation'
:
self
.
setConversion
(
data
,
mime
,
format
=
original_format
,
**
kw
)
else
:
# create temporary image and use it to resize accordingly
...
...
@@ -381,12 +400,11 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi
mime
,
data
=
temp_image
.
convert
(
original_format
,
frame
=
frame
,
**
kw
)
# store conversion
self
.
setConversion
(
data
,
mime
,
format
=
original_format
,
**
kw
)
return
self
.
getConversion
(
format
=
original_format
,
**
kw
)
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'_populateConversionCacheWithHTML'
)
def
_populateConversionCacheWithHTML
(
self
,
zip_file
=
None
):
def
_populateConversionCacheWithHTML
(
self
,
zip_file
=
None
,
**
kw
):
"""
Extract content from the ODF zip file and populate the document.
Optional parameter zip_file prevents from converting content twice.
...
...
@@ -402,6 +420,7 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi
must_close
=
1
else
:
must_close
=
0
file_name_list
=
[]
for
f
in
zip_file
.
infolist
():
filename
=
f
.
filename
document
=
self
.
get
(
filename
,
None
)
...
...
@@ -416,13 +435,17 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi
zip_file
.
read
(
filename
),
object
=
self
,
context
=
self
,
mimetype
=
mime
)
file_name_list
.
append
(
filename
)
else
:
mime
=
guess_content_type
(
filename
)[
0
]
data
=
Pdata
(
zip_file
.
read
(
filename
))
if
".impr."
in
filename
and
self
.
getPortalType
()
==
'Presentation'
:
self
.
setConversion
(
data
,
mime
,
format
=
"html"
,
**
kw
)
self
.
setConversion
(
data
,
mime
=
mime
,
format
=
EMBEDDED_FORMAT
,
filename
=
filename
)
if
must_close
:
zip_file
.
close
()
archive_file
.
close
()
return
file_name_list
security
.
declarePrivate
(
'_convertToBaseFormat'
)
def
_convertToBaseFormat
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment