Commit 43f542b9 authored by Kevin Deldycke's avatar Kevin Deldycke

Move planning box generic header stuff there.

Only add default ERP5 JavaScript and CSS file if we are not in Web Mode.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9469 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9a0b941f
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
\n
<tal:block metal:define-macro="header_definitions">\n <tal:block metal:define-macro="header_definitions">\n
<tal:block tal:define="\n <tal:block tal:define="\n
cancel_url request/cancel_url | request/ACTUAL_URL;\n cancel_url request/cancel_url | request/ACTUAL_URL;\n
...@@ -64,10 +63,10 @@ ...@@ -64,10 +63,10 @@
dummy python: request.set(\'here\', here);\n dummy python: request.set(\'here\', here);\n
\n \n
global css_list css_list | python: [];\n global css_list css_list | python: [];\n
dummy python: css_list.append(\'%s/erp5.css\' % (here.portal_url.getPortalPath(), ));\n dummy python: not is_web_mode and css_list.append(\'%s/erp5.css\' % (here.portal_url.getPortalPath(), ));\n
\n \n
global js_list js_list | python: [];\n global js_list js_list | python: [];\n
dummy python: js_list.append(\'%s/erp5.js\' % (here.portal_url.getPortalPath(), ));\n dummy python: not is_web_mode and js_list.append(\'%s/erp5.js\' % (here.portal_url.getPortalPath(), ));\n
\n \n
global http_parameter_list request/form/copy;\n global http_parameter_list request/form/copy;\n
http_parameter_list python: here.ERP5XhtmlStyle_filterParameterList(http_parameter_list);\n http_parameter_list python: here.ERP5XhtmlStyle_filterParameterList(http_parameter_list);\n
...@@ -76,9 +75,11 @@ ...@@ -76,9 +75,11 @@
"/>\n "/>\n
</tal:block>\n </tal:block>\n
\n \n
<!-- ============================================================== -->\n
\n \n
<tal:block metal:define-macro="http_definitions">\n <tal:block metal:define-macro="http_definitions">\n
<tal:block tal:repeat="parameter http_parameter_list/items">\n <tal:block tal:repeat="parameter http_parameter_list/items">\n
<!-- Generic way of specifying http parameters -->\n
<tal:block tal:condition="python: same_type(parameter[1], [])">\n <tal:block tal:condition="python: same_type(parameter[1], [])">\n
<tal:block tal:repeat="list_item python: parameter[1]">\n <tal:block tal:repeat="list_item python: parameter[1]">\n
<input type="hidden"\n <input type="hidden"\n
...@@ -92,14 +93,44 @@ ...@@ -92,14 +93,44 @@
tal:attributes="name python: parameter[0];\n tal:attributes="name python: parameter[0];\n
value python: parameter[1];"/>\n value python: parameter[1];"/>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
\n
<!-- ============================================================== -->\n
\n
<tal:block metal:define-macro="planning_box_definitions">\n
<tal:block tal:condition="form/pt | nothing">\n
<tal:block tal:define="planning_box python: here.ERP5XhtmlStyle_getPlanningBox(form)">\n
<tal:block tal:condition="python: planning_box">\n
<!-- PlanningBox generic stuff -->\n
<style tal:content="structure python: planning_box.render_css(None,REQUEST=request)"\n
tal:attributes="type python:\'text/css\'">\n
</style>\n
<tal:block tal:condition="python: planning_box.get_value(\'js_enabled\')">\n
<tal:block tal:define="dummy python:js_list.append(\'%s/wz_dragdrop.js\' % (here.portal_url.getPortalPath(), ));" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block> </tal:block>
]]></string> </value> ]]></string> </value>
</item> </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> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>global_definitions</string> </value> <value> <string>global_definitions</string> </value>
</item> </item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
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