Commit fa2b231a authored by Xiaowu Zhang's avatar Xiaowu Zhang

Load js file only once in a page

Really useful when same field declared in one page
parent 3ab9b24f
...@@ -80,7 +80,7 @@ IDEAS:\n ...@@ -80,7 +80,7 @@ IDEAS:\n
tal:attributes="type python:\'text/css\'">\n tal:attributes="type python:\'text/css\'">\n
</style>\n </style>\n
</tal:block>\n </tal:block>\n
<tal:block tal:define="dummy python: js_list.extend(field.get_javascript_list(REQUEST=request))" />\n <tal:block tal:define="dummy python: js_list.extend(x for x in field.get_javascript_list(REQUEST=request) if not (x in js_list))" />\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
...@@ -149,8 +149,7 @@ IDEAS:\n ...@@ -149,8 +149,7 @@ IDEAS:\n
</html>\n </html>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>
]]></unicode> </value> ]]></unicode> </value>
</item> </item>
......
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