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
1
Merge Requests
1
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
Boxiang Sun
erp5
Commits
e12c637e
Commit
e12c637e
authored
Mar 19, 2013
by
Lingnan Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the new render presentation which now is totally based on javascript
parent
a42877cf
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
554 additions
and
15 deletions
+554
-15
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb.xml
...plateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb.xml
+2
-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/page_content.xml
...tal_skins/erp5_dms/OOoDocument_viewAsWeb/page_content.xml
+158
-0
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Presentation_renderSlidePage.xml
...em/portal_skins/erp5_dms/Presentation_renderSlidePage.xml
+208
-0
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Presentation_renderWithNavigation.xml
...rtal_skins/erp5_dms/Presentation_renderWithNavigation.xml
+126
-0
No files found.
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_viewAsWeb.xml
View file @
e12c637e
...
...
@@ -66,7 +66,6 @@
<key>
<string>
bottom
</string>
</key>
<value>
<list>
<string>
iframe_content
</string>
<string>
download_pdf
</string>
</list>
</value>
...
...
@@ -75,7 +74,8 @@
<key>
<string>
webcontent header bottom
</string>
</key>
<value>
<list>
<string>
my_title
</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 @
e12c637e
...
...
@@ -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/
page_content
.xml
View file @
e12c637e
This diff is collapsed.
Click to expand it.
bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Presentation_renderSlidePage.xml
0 → 100644
View file @
e12c637e
<?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_total_pages=1\n
var slide_current_page=""\n
\n
function goToNewSlide(relative_path){\n
slide_current_page=relative_path;\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
resetPageSelector();\n
}\n
\n
function resetNavigation(name,id_a,id_img,class_default,class_hide){\n
$nav_default=$("a:contains(\'"+name+"\')")\n
if($nav_default.length>
0){\n
$nav_default.addClass("hidden");\n
$("#"+id_a).attr("onclick","goToNewSlide(\'"+$nav_default.attr("href")+"\')");\n
$("#"+id_a).css("cursor","pointer")\n
$("#"+id_img).attr("class",class_default);\n
}\n
else\n
{\n
//remove the string without tag\n
$("#slide_content").html($("#slide_content").html().replace(name, ""));\n
$("#"+id_a).attr("onclick","");\n
$("#"+id_a).css("cursor","default")\n
$("#"+id_img).attr("class",class_hide);\n
}\n
}\n
\n
function renderNavigation(){\n
resetNavigation("First page","first_slide","first_slide_img","first","first shaded");\n
resetNavigation("Back","previous_slide","previous_slide_img","previous","previous shaded");\n
resetNavigation("Continue","next_slide","next_slide_img","next","next shaded");\n
resetNavigation("Last page","last_slide","last_slide_img","last","last shaded");\n
resetNavigation("Text","text_slide","text_slide_img","text","text hidden");\n
resetNavigation("Graphics","graphics_slide","graphics_slide_img","graphics","graphics hidden");\n
}\n
\n
function resetPageSelector(){\n
$("#slides_total_number").text(slide_total_pages);\n
$("#slide_selection_index").keyup(function(event) {\n
if (event.keyCode==13) {\n
redirectPresentationPage()\n
}\n
});\n
if(slide_current_page.indexOf("text")==-1){\n
if(parseInt(slide_current_page.replace(".html","").replace("img","")))\n
$("#slide_selection_index").val(parseInt(slide_current_page.replace(".html","").replace("img",""))+1);\n
else\n
$("#slide_selection_index").val(1);\n
}\n
else\n
if(parseInt(slide_current_page.replace(".html","").replace("text","")))\n
$("#slide_selection_index").val(parseInt(slide_current_page.replace(".html","").replace("text",""))+1);\n
else\n
$("#slide_selection_index").val(1);\n
}\n
\n
function redirectPresentationPage(){\n
//Graphic pages\n
if(slide_current_page.indexOf("text")==-1){\n
if(slide_total_pages!=1)\n
{\n
//if entered number bigger than total number, go to last page, else incorrect number go to first page\n
if( $("#slide_selection_index").val()>1
&&
$("#slide_selection_index").val()
<slide_total_pages
){\n
real_page_number=
$("#slide_selection_index").val()-1;\n
goToNewSlide("img"+real_page_number+".html");\n
}\n
else
if($("#slide_selection_index").val()
>
=slide_total_pages){\n
real_page_number=slide_total_pages-1\n
goToNewSlide("img"+real_page_number+".html");\n
}\n
else{\n
goToNewSlide("asPresentationHTML");\n
}\n
}\n
else\n
goToNewSlide("asPresentationHTML");\n
}\n
//Text pages\n
else{\n
//if entered number bigger than total number, go to last page, else incorrect number go to first page\n
if( $("#slide_selection_index").val()>1
&&
$("#slide_selection_index").val()
<slide_total_pages
){\n
real_page_number=
$("#slide_selection_index").val()-1;\n
goToNewSlide("text"+real_page_number+".html");\n
}\n
else
if($("#slide_selection_index").val()
>
=slide_total_pages){\n
real_page_number=slide_total_pages-1\n
goToNewSlide("text"+real_page_number+".html");\n
}\n
else{\n
goToNewSlide("text0.html");\n
}\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
goToNewSlide("asPresentationHTML");\n
var last_page_href=$("a:contains(\'Last page\')").attr("href");\n
if(last_page_href)\n
slide_total_pages=parseInt(last_page_href.replace(".html","").replace("img",""))+1;\n
else\n
slide_total_pages=1;\n
resetPageSelector();\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 @
e12c637e
<?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_block.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>
\n
<!--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>
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