Commit 963f0f6b authored by Ivan Tyagov's avatar Ivan Tyagov

Include needed .js / .css only once not for every post.

parent c34a926c
...@@ -36,11 +36,6 @@ ...@@ -36,11 +36,6 @@
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[ <value> <unicode encoding="cdata"><![CDATA[
<!-- XXX: include only once not for every post item -->\n
\n
<script src="erp5_discussion.js" type="text/javascript"></script>\n
<link href="erp5_discussion.css" rel="stylesheet" type="text/css">\n
\n
<tal:block tal:define="discussion_post_object here/getObject;\n <tal:block tal:define="discussion_post_object here/getObject;\n
author_dict discussion_post_object/DiscussionPost_getAuthorDict;\n author_dict discussion_post_object/DiscussionPost_getAuthorDict;\n
author_url author_dict/author_url;\n author_url author_dict/author_url;\n
...@@ -58,7 +53,7 @@ ...@@ -58,7 +53,7 @@
isUserAllowedToPost python: discussion_post_object.getParentValue().DiscussionThread_isUserAllowedToPost()">\n isUserAllowedToPost python: discussion_post_object.getParentValue().DiscussionThread_isUserAllowedToPost()">\n
\n \n
<div class="discussion-post-header"\n <div class="discussion-post-header"\n
tal:attributes="style python: test(is_author_thumbnai_available, \'height:96px\',\'\')">\n tal:attributes="style python: test(is_author_thumbnai_available, \'height:104px\',\'\')">\n
\n \n
<div class="thumbnail"\n <div class="thumbnail"\n
tal:condition="is_author_thumbnai_available">\n tal:condition="is_author_thumbnai_available">\n
......
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
<value> <value>
<list> <list>
<string>my_title</string> <string>my_title</string>
<string>my_include</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>css_class</string>
<string>default</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_include</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</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>hidden_label</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_editor_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</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[
string:<script src="erp5_discussion.js" type="text/javascript"></script> <link href="erp5_discussion.css" rel="stylesheet" type="text/css">
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts06927933.02</string> </value> <value> <string>ts06928671.63</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -43,10 +43,12 @@ ...@@ -43,10 +43,12 @@
\n \n
.discussion-post-header .thumbnail{\n .discussion-post-header .thumbnail{\n
width:14%;\n width:14%;\n
margin:4px;\n
}\n }\n
\n \n
.discussion-post-header .title{\n .discussion-post-header .title{\n
width:85%;\n width:85%;\n
margin-top:4px;\n
}\n }\n
\n \n
a.discussion-post-title{\n a.discussion-post-title{\n
...@@ -93,7 +95,7 @@ blockquote {\n ...@@ -93,7 +95,7 @@ blockquote {\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>913</int> </value> <value> <int>945</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
97 98
\ 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