Commit 650a24e4 authored by Aurel's avatar Aurel

Merge remote-tracking branch 'origin/master' into syncml

parents ee96a7fd c741f04f
......@@ -87,6 +87,7 @@ reversal = accounting_module.newContent (\n
mapping={\'title\': unicode(context.getTitleOrId(), \'utf8\'),\n
\'specific_reference\': specific_reference}),\n
resource=context.getResource(),\n
specialise_list=context.getSpecialiseList(),\n
causality_value_list=causality_value_list,\n
created_by_builder=1 # XXX to prevent init script to create lines\n
)\n
......
1522
\ No newline at end of file
1523
\ No newline at end of file
<?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>from json import dumps\n
return dumps(d)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>d</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_asJSON</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>return context.ERP5Site_viewQuickSearchResultList(\n
field_your_search_text = field_your_search_text,\n
field_your_search_portal_type = field_your_search_portal_type,\n
all_languages=all_languages)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>field_your_search_text=\'\', field_your_search_portal_type=None, all_languages=False</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_processAdvancedSearch</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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 xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n
tal:define="tab here/ERP5Site_getSelectedTab;\n
preferred_access_tab python:here.portal_preferences.getPreferredHtmlStyleAccessTab()">\n
<tal:block tal:condition="python:tab is not None and preferred_access_tab">\n
<tal:block tal:define="tab_renderer_form_object python: getattr(here, tab[\'renderer\'], None)">\n
<metal:block use-macro="here/erp5_site_main_template/macros/master">\n
<!--\n
<metal:block fill-slot="tabs">\n
<tal:block tal:replace="structure python:here.ERP5Site_renderTabList(selected_tab=tab[\'id\'])" />\n
</metal:block>\n
<metal:block fill-slot="content">\n
<tal:block tal:condition="tab_renderer_form_object"\n
tal:replace="structure python: tab_renderer_form_object()" />\n
<tal:block tal:condition="not: tab_renderer_form_object">\n
Server side error.\n
</tal:block>\n
</metal:block>\n
-->\n
\n
</metal:block>\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python:tab is None or not preferred_access_tab">\n
<tal:block tal:replace="structure here/ERP5Site_viewClassicFrontPage" />\n
</tal:block>\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>ERP5Site_view</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>
......@@ -90,7 +90,7 @@ for field_id in form.get_field_ids():\n
field_dict[\'display_width\'] = None\n
\n
# XXX: DateTime not serialize-able (see Base_viewMetaData)?\n
# in what format to transfer to client renderjs.js ? (seconds sinc eepoch?)\n
# in what format to transfer to client renderjs.js ? (seconds since epoch?)\n
if field_meta_type in ["DateTimeField"]:\n
if field_value not in MARKER:\n
field_value = field_value.strftime("%Y/%m/%d")\n
......@@ -102,6 +102,7 @@ for field_id in form.get_field_ids():\n
field_dict[\'listbox\'][\'lines\'] = original_field.get_value("lines")\n
field_dict[\'listbox\'][\'columns\'] = [x for x in original_field.get_value("columns")]\n
field_dict[\'listbox\'][\'listbox_data_url\'] = "Listbox_asJSON"\n
field_dict[\'listbox\'][\'listbox_html\'] = original_field.render()\n
\n
if field_meta_type in LIST_FIELDS:\n
# form contains selects, pass list of selects\' values and calculate default one?\n
......
......@@ -59,7 +59,7 @@
\n
<!-- render gadget asynchronously -->\n
<div data-gadget-cacheable="1"\n
tal:attributes="data-gadget string:gadgets/form/${field_type}/gadget?field_name=${field_name};\n
tal:attributes="data-gadget string:gadgets/form/${field_type}/gadget?field_name=${field_name}&form_id=${form_id};\n
id string:${form_id}_${field_name};\n
data-gadget-cache-id string:${form_id}_${field_name};"></div>\n
\n
......
......@@ -67,7 +67,6 @@ request = context.REQUEST\n
# Get the form\n
form = getattr(context,form_id)\n
edit_order = form.edit_order\n
\n
try:\n
# Validate\n
form.validate_all_to_request(request, key_prefix=key_prefix)\n
......@@ -81,8 +80,8 @@ except FormValidationError, validation_errors:\n
return dumps(result)\n
\n
(kw, encapsulated_editor_list), action = context.Base_edit(form_id, silent_mode=1)\n
context.log(\'%s %s\' %(kw, encapsulated_editor_list))\n
\n
context.log(kw)\n
context.edit(REQUEST=request, edit_order=edit_order, **kw)\n
for encapsulated_editor in encapsulated_editor_list:\n
encapsulated_editor.edit(context)\n
......
<?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 xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
<metal:block define-macro="master">\n
<tal:block tal:define="title here/Title;\n
enctype string:multipart/form-data;\n
portal context/portal_url/getPortalObject;">\n
<tal:block metal:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="main">\n
<tal:block tal:condition="here/portal_membership/isAnonymousUser">\n
<tal:block tal:define="dummy python:request.RESPONSE.redirect(\'%s/login_form\' % portal.absolute_url())" />\n
</tal:block>\n
<tal:block tal:condition="python:not here.portal_membership.isAnonymousUser()">\n
<div class="index_html">\n
<div class="document">\n
<tal:block tal:condition="python: here.getPortalObject().restrictedTraverse(\'portal_gadgets\', None) is not None">\n
<tal:block tal:condition="exists:here/ERP5Site_viewHomeAreaRenderer"\n
tal:replace="structure python: here.ERP5Site_viewHomeAreaRenderer(create_default_pad=True, \n
make_security_check=True)" />\n
</tal:block>\n
</div>\n
</div>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</metal:block>\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>erp5_site_main_template</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>\074html\076\n
\074head\076\n
\074title tal:content="template/title"\076The title\074/title\076\n
\074meta http-equiv="content-type" content="text/html;charset=utf-8"\076\n
\074/head\076\n
\074body\076\n
\n
\074script type="text/javascript" language="javascript"\076\n
//\074![CDATA[\n
$(document).ready(function() {\n
gadget = RenderJs.getSelfGadget();\n
\n
// default tab should be openned fist\n
gadget.redirect = function () {\n
$.url.redirect(\'/\' + gadget.default_tab_url + \'/\');\n
};\n
\n
// default route\n
RenderJs.RouteGadget.add(\'\', gadget.redirect, 1);\n
\n
$.each(gadget.action_id_list, function(index, value) {\n
// add dynamic function to gadget that will take care to render tab using gadgets\n
gadget[value] = function () {\n
ERP5Form.openFormInTabbularGadget(gadget.tab_container_id, value);\n
};\n
//add dynamic route\n
RenderJs.RouteGadget.add(\'/\' + value + \'/\', gadget[value], 1);\n
});\n
});\n
//]]\076\n
\074/script\076\n
\n
\074/body\076\n
\074/html\076</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>erp5_tabbular_form_renderer</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts63093392.7</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>gadget-style.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>.document .content{\n
min-height:100px;\n
}\n
.required-field label{\n
font-weight: bold;\n
}\n
\n
\n
.validation-failed {\n
border: 1px solid red;\n
}\n
\n
.center_left {\n
float:left;\n
width: 50%;\n
}\n
\n
.center_right {\n
float: left;\n
margin-left: 0.5%;\n
width: 47.5%;\n
}\n
\n
fieldset.left {\n
margin-right:0px;\n
}\n
\n
fieldset.right {\n
width:47.5%;\n
margin-left:0.5%;\n
}\n
.center_left,\n
.center_right{\n
border: 1px solid #97B0D1;\n
padding-left: 5px;\n
padding-right: 5px;\n
padding-top: 5px;\n
margin-bottom: 5px;\n
}\n
\n
//portal_status_gadget CSS\n
#portal_status_message p {\n
display:none;\n
color:red;\n
}</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>587</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -37,9 +37,9 @@
<value> <unicode encoding="cdata"><![CDATA[
<tal:block tal:define="field_name request/field_name | options/field_name">\n
<table tal:attributes="id field_name">\n
<div tal:attributes="id field_name">\n
<!-- Listbox content -->\n
</table>\n
</div>\n
<div tal:attributes="id string:${field_name}_pager">\n
<!-- Listbox navigation -->\n
</div>\n
......
......@@ -37,9 +37,14 @@
<value> <unicode encoding="cdata"><![CDATA[
<tal:block tal:define="field_name request/field_name | options/field_name">\n
<select tal:attributes="name string:subfield_${field_name}"\n
<select tal:attributes="name string:subfield_${field_name}_default:list"\n
size="1">\n
</select>\n
\n
<input type="hidden"\n
value="0"\n
class="serialize-able"\n
tal:attributes="name string:default_subfield_${field_name}_default:list:int">\n
</tal:block>
]]></unicode> </value>
......
......@@ -36,12 +36,19 @@
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<tal:block tal:define="field_name request/field_name | options/field_name">\n
<tal:block tal:define="field_name request/field_name | options/field_name;\n
field_name_stipped python: field_name.replace(\'field_\', \'\');\n
form_id request/form_id | options/form_id;">\n
\n
<input type="text"\n
tal:attributes="name field_name"/>\n
<input type="image" name="portal_selections/viewSearchRelatedDocumentDialog0:method"\n
value="update..." src="images/exec16.png">\n
\n
<a tal:attributes="href string:Base_jumpToRelatedDocument?field_id=${field_name_stipped}&amp;form_id=${form_id}">\n
<img alt="jump" src="images/jump.png">\n
</a>\n
\n
</tal:block>
]]></unicode> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>portal_status_message</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>\074html\076\n
\074head\076\n
\074/head\076\n
\074body\076\n
\074p class="portal-status-message" style="display:none; color:red;font-weight:bold;"\076\074/p\076\n
\n
\074script type="text/javascript" language="javascript"\076\n
//\074![CDATA[\n
$(document).ready(function() {\n
gadget = RenderJs.getSelfGadget();\n
\n
gadget.showMessage = function (message, timeout) {\n
// show message in UI\n
var msg_element = $("#portal_status_message p");\n
if (timeout===undefined) {\n
timeout = 4000;\n
}\n
msg_element.toggle();\n
msg_element.html(message);\n
window.setTimeout(\'$("#portal_status_message p").toggle();\', timeout);\n
};\n
});\n
//]]\076\n
\074/script\076\n
\074/body\076\n
\074/html\076</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>gadget</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -46,13 +46,19 @@
current_form_id python: request.get(\'current_form_id\', \'view\');\n
current_url python: \'%s/%s\' % (url, current_form_id);\n
current_action python: portal.ERP5Site_getCurrentAction(current_url, actions);\n
actions actions/object_view | python: [];">\n
actions actions/object_view | python: [];\n
action_id_list python:[x[\'url\'].split(\'/\')[-1] for x in actions];\n
data_gadget_property python: {\'tab_container_id\': \'form_gadget\',\n
\'default_tab_url\': action_id_list[0],\n
\'action_id_list\': action_id_list}">\n
\n
\n
<div data-gadget="gadgets/portal_status_message/gadget"\n
data-gadget-cache-id="portal_status_message"\n
data-gadget-cacheable="1"\n
id="portal_status_message"></div>\n
\n
\n
<div id="portal_status_message" style="height:20px; display:none;">\n
<p style="color:red; font-weight: bold;"></p>\n
</div>\n
\n
<div class="document">\n
\n
<div class="actions">\n
......@@ -62,16 +68,10 @@
<span class="description">Save</span>\n
</button>\n
\n
<script type="text/javascript"\n
tal:content="python:\'\'\'ERP5Form.setCurrentFormId(\'%s\');;\n
RenderJs.TabbularGadget.addNewTabGadget(\n
\'form_gadget\',\n
\'gadget-%s\',\n
\'%s/Form_asRenderJSGadget\',\n
\'ERP5Form.update\',\n
\'Form_asJSON?form_id=%s\', false);;\n
\'\'\' %(current_form_id, current_form_id, current_form_id, current_form_id)">\n
</script>\n
<!-- Test -->\n
<div data-gadget="erp5_tabbular_form_renderer"\n
id="erp5_tabbular_form_renderer"\n
tal:attributes="data-gadget-property python: here.Base_asJSON(data_gadget_property);"> </div>\n
\n
<!-- get all tabs from server -->\n
<ul class="tabs">\n
......@@ -80,8 +80,7 @@
tal:define="action_form python: action[\'url\'].split(\'/\')[-1]"\n
tal:attributes="id action_form;\n
class python: action == current_action and \'selected\' or \'not_selected\'">\n
\n
<a tal:attributes="onclick python: \'\'\'javascript: ERP5Form.openFormInTabbularGadget(\'form_gadget\', \'%s\');; return false ;;\'\'\' %(action_form)">\n
<a tal:attributes="onclick python: \'\'\'javascript: return ERP5Form.onTabClickHandler(\'%s\')\'\'\' %action_form">\n
<span i18n:translate=""\n
i18n:domain="ui"\n
tal:content="action/name">action_name</span>\n
......@@ -93,13 +92,13 @@
</div>\n
\n
<div class="content editable">\n
\n
\n
<!--Form rendered content goes here -->\n
<div id="form_gadget"></div>\n
\n
</div>\n
</div>\n
\n
\n
</div>
]]></unicode> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>lib</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts62123078.31</string> </value>
<value> <string>ts63100043.51</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -107,12 +107,31 @@ var ERP5Form = ( function () {\n
\n
ParallelListField: function (field_id, field_dict) {\n
/* mutiple select fields */\n
var field_value, select_dom;\n
// XXX: we render only first value but it can be many how to get them ?\n
field_value = field_dict.value[0];\n
select_dom = $("select[name=subfield_field_" + field_id + "]");\n
this.addOptionTagList(select_dom, field_dict.items, field_value);\n
return select_dom;\n
var tag_name = "subfield_field_" + field_id + "_default",\n
initial_select_dom = $("select[name="+ tag_name + "\\\\:list]"),\n
gadget = initial_select_dom.parent("div[data-gadget]"),\n
new_select_id;\n
// render first value in initial select box\n
ERP5Form.addOptionTagList(initial_select_dom, field_dict.items, field_dict.value[0]);\n
\n
// render all other elements\n
$.each(field_dict.value, function (index, index_value) {\n
if (index !== 0) {\n
// we need to create dynamically a select box for all element except first\n
new_select_id = \'parallel_\' + field_id + index;\n
gadget.append(\'<br/><select class="serialize-able" name=\' + tag_name + \':list \' + \'id=\' + new_select_id + \'></select>\');\n
ERP5Form.addOptionTagList($("#"+new_select_id), field_dict.items, index_value);\n
}\n
});\n
\n
// add a new select with all values under main one with already selected \n
if (field_dict.value.length > 0) {\n
// we need to add another select if initial one is empty\n
new_select_id = \'parallel_last\' + field_id;\n
gadget.append(\'<br/><select class="dynamic serialize-able" name=\' + tag_name + \':list \' + \'id=\' + new_select_id + \'></select>\');\n
ERP5Form.addOptionTagList($("#"+new_select_id), field_dict.items, \'\');\n
}\n
return initial_select_dom;\n
},\n
\n
CheckBoxField: function (field_id, field_dict) {\n
......@@ -161,6 +180,11 @@ var ERP5Form = ( function () {\n
/* Email field */\n
return this.BaseInputField(field_id, field_dict);\n
},\n
\n
FloatField: function (field_id, field_dict) {\n
/* Float field */\n
return this.BaseInputField(field_id, field_dict);\n
},\n
\n
FormBox: function (field_id, field_dict) {\n
/* Email field */\n
......@@ -191,47 +215,49 @@ var ERP5Form = ( function () {\n
\n
listbox_dict = field_dict.listbox;\n
listbox_data_url = listbox_dict.listbox_data_url;\n
colModel = [];\n
column_title_list = [];\n
$.each(listbox_dict.columns,\n
function(i, value){\n
var index, title, column;\n
index = value[0];\n
title = value[1];\n
column_title_list.push(title);\n
column = {\'name\': index,\n
\'index\': index,\n
\'width\': 185,\n
\'align\': \'left\'};\n
colModel.push(column);\n
});\n
\n
listbox_table.jqGrid({url:listbox_data_url + \'?form_id=\' + current_form_id + \'&amps;listbox_id=\' + field_id,\n
datatype: "json",\n
colNames: column_title_list,\n
colModel: colModel,\n
rowNum: listbox_dict.lines,\n
pager: \'#\'+navigation_id,\n
sortname: \'id\',\n
viewrecords: true,\n
sortorder: "desc",\n
loadError : function(xhr, textStatus, errorThrown) {\n
// XXX: handle better than just alert.\n
alert("Error occurred during getting data from server.");\n
},\n
cmTemplate: {sortable:false}, // XXX: until we get list of sortable columns from server\n
caption: field_dict.title});\n
listbox_table.jqGrid(\'navGrid\', \'#\'+navigation_id, {edit:false,add:false,del:false});\n
return listbox_table;\n
$("#" + listbox_id).html(listbox_dict["listbox_html"]);\n
return;\n
// Uncomment below to use jqgrid plugin to render listbox\n
// colModel = [];\n
// column_title_list = [];\n
// $.each(listbox_dict.columns,\n
// function(i, value){\n
// var index, title, column;\n
// index = value[0];\n
// title = value[1];\n
// column_title_list.push(title);\n
// column = {\'name\': index,\n
// \'index\': index,\n
// \'width\': 185,\n
// \'align\': \'left\'};\n
// colModel.push(column);\n
// });\n
// \n
// listbox_table.jqGrid({url:listbox_data_url + \'?form_id=\' + current_form_id + \'&amps;listbox_id=\' + field_id,\n
// datatype: "json",\n
// colNames: column_title_list,\n
// colModel: colModel,\n
// rowNum: listbox_dict.lines,\n
// pager: \'#\'+navigation_id,\n
// sortname: \'id\',\n
// viewrecords: true,\n
// sortorder: "desc",\n
// loadError : function(xhr, textStatus, errorThrown) {\n
// // XXX: handle better than just alert.\n
// alert("Error occurred during getting data from server.");\n
// },\n
// cmTemplate: {sortable:false}, // XXX: until we get list of sortable columns from server\n
// caption: field_dict.title});\n
// listbox_table.jqGrid(\'navGrid\', \'#\'+navigation_id, {edit:false,add:false,del:false});\n
// return listbox_table;\n
},\n
\n
update: function(data) {\n
/* Update form values */\n
$.each(data.form_data,\n
function(field_id, field_dict){\n
var type, dom;\n
type = field_dict.type;\n
dom = undefined;\n
var type=field_dict.type,\n
dom;\n
if(ERP5Form.hasOwnProperty(type)){\n
dom = ERP5Form[type](field_id, field_dict);\n
}\n
......@@ -244,7 +270,9 @@ var ERP5Form = ( function () {\n
\n
// mark required fields visually\n
if (field_dict.required){\n
dom.parent().parent().children("label").css("font-weight", "bold");}\n
//dom.parent().parent().parent().children("label").css("font-weight", "bold");}\n
dom.parent().parent().parent().addClass("required-field");\n
}\n
\n
});\n
},\n
......@@ -255,11 +283,12 @@ var ERP5Form = ( function () {\n
form_value_dict = {};\n
$("." + ERP5Form.SERIALIZE_ABLE_CLASS_NAME).each(function(index){\n
// DOM can change values, i.e. alter checkbox (on / off)\n
var element,name, value, type;\n
element = $(this);\n
name = element.attr("name");\n
value = element.val();\n
type = element.attr("type");\n
var element = $(this),\n
name = element.attr("name"),\n
value = element.val(),\n
type = element.attr("type"),\n
element_class = element.attr("class");\n
\n
if (type==="checkbox") {\n
value = element.is(":checked");\n
if (value===true) {\n
......@@ -269,9 +298,27 @@ var ERP5Form = ( function () {\n
converted_value=0;\n
}\n
value = converted_value;\n
}\n
}\n
// XXX: save DateTimeField values\n
\n
if (element_class.indexOf("hasDatepicker") !== -1) {\n
console.log(name, element_class, value);\n
}\n
// XXX: how to handle file uploads ?\n
form_value_dict[name] = value;\n
// some values end with :list and we need to collect them all\n
if (/:list$/.test(name)) {\n
if (form_value_dict[name] === undefined) {\n
// init it\n
form_value_dict[name] = [];\n
//console.log("init", name);\n
}\n
form_value_dict[name].push(value);\n
//console.log("set", name, form_value_dict[name]);\n
}\n
else {\n
// single value\n
form_value_dict[name] = value;\n
}\n
});\n
//console.log(form_value_dict);\n
\n
......@@ -282,6 +329,8 @@ var ERP5Form = ( function () {\n
$.ajax({url:\'Form_save\',\n
data: form_value_dict,\n
dataType: "json",\n
// it\'s important for Zope to have traditional way of encoding an URL\n
traditional: 1,\n
success: function (data) {\n
var field_errors;\n
field_errors = data.field_errors;\n
......@@ -290,7 +339,8 @@ var ERP5Form = ( function () {\n
$.each(field_errors, function(index, value){\n
var dom, field;\n
dom = $("[name=" + ERP5Form.getFieldId(index) + "]");\n
dom.css("border", "1px solid red"); // XXX: use class / css\n
//dom.css("border", "1px solid red"); // XXX: use class / css\n
dom.addClass("validation-failed");\n
field = dom.parent().parent();\n
if (field.children("span.error").length > 0){\n
// just update message\n
......@@ -306,16 +356,27 @@ var ERP5Form = ( function () {\n
// delete validation messages\n
var element;\n
element = $(this);\n
element.parent().children("div.input").children("." +ERP5Form.SERIALIZE_ABLE_CLASS_NAME).css("border", "none");\n
element.remove();\n
// XXX: remove all rendered in red input classes\n
$(".validation-failed").each(function () {\n
$(this).removeClass("validation-failed");\n
});\n
});\n
// show a fading portal_status_message\n
$("#portal_status_message").toggle();\n
$("#portal_status_message p").html("Saved");\n
window.setTimeout(\'$("#portal_status_message").toggle();\', 4000);\n
RenderJs.GadgetIndex.getGadgetById(\'portal_status_message\').showMessage("Saved", 1000);\n
}\n
}});\n
},\n
\n
onTabClickHandler: function (form_id) {\n
/*\n
* When a tab gets clicked change url (part after \'#\') so router can detect\n
change and load proper gadget.\n
This function preserves all URL arguments.\n
*/\n
window.location = window.location.toString().split(\'#\')[0] + \'#/\'+form_id + \'/\';\n
return false;\n
},\n
\n
openFormInTabbularGadget: function (container_id, form_id) {\n
/*\n
......@@ -331,6 +392,19 @@ var ERP5Form = ( function () {\n
\'Form_asJSON?form_id=\' + form_id);;\n
RenderJs.TabbularGadget.toggleVisibility($(\'#\' + form_id));\n
ERP5Form.setCurrentFormId(form_id);\n
// when all gadgets are loaded adjust left and right side of forms to have same height\n
RenderJs.bindReady(function () {\n
setTimeout(function() {\n
var left_height = $(\'fieldset.left\').height(),\n
right_height = $(\'fieldset.right\').height();\n
if (right_height <= left_height) {\n
$(\'fieldset.right\').height(left_height);\n
}\n
else {\n
$(\'fieldset.left\').height(right_height);\n
}\n
}, 500);\n
});\n
}\n
}\n
\n
......@@ -345,7 +419,7 @@ var ERP5Form = ( function () {\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>14861</int> </value>
<value> <int>18852</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts62754937.18</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>require-erp5.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>// JavaScript file that is used to load ERP5\'s JavaScript depenencies\n
require.config({\n
paths: {\n
"erp5_form": "lib/erp5_form",\n
route: "lib/route",\n
url: "lib/url",\n
jquery: "jquery/core/jquery",\n
renderjs: "jquery/plugin/renderjs/renderjs",\n
"jquery-ui": "jquery/ui/js/jquery-ui.min",\n
"jquery.jqGrid.src": "jquery/plugin/jqgrid/jquery.jqGrid.src",\n
"grid.locale-en": "jquery/plugin/jqgrid/i18n/grid.locale-en"\n
},\n
shim: {\n
erp5: ["jquery"],\n
erp5_xhtml_appearance: ["erp5"],\n
erp5_knowledge_box: ["jquery", "jquery-ui"],\n
route: ["jquery"],\n
url: ["jquery"],\n
"jquery-ui": ["jquery"],\n
"jquery.jqGrid.src": ["jquery"],\n
"grid.locale-en": ["jquery.jqGrid.src"]\n
}\n
});\n
\n
require(["erp5_xhtml_appearance", "erp5_knowledge_box", "erp5", "erp5_form",\n
"renderjs", "jquery", "jquery-ui", "route", "url",\n
"jquery.jqGrid.src", "grid.locale-en"],\n
function(domReady) {\n
RenderJs.init();\n
RenderJs.bindReady(function (){\n
$.url.onhashchange(function () {\n
//console.log("go to route", $.url.getPath());\n
RenderJs.RouteGadget.go($.url.getPath(),\n
function () {\n
//console.log("bad route");\n
// All routes have been deleted by fail.\n
// So recreate the default routes using RouteGadget\n
RenderJs.RouteGadget.init();\n
});\n
});\n
});\n
});\n
</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1474</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>anonymous_http_cache</string> </value>
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts62728867.75</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>require.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*\n
RequireJS 2.1.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.\n
Available via the MIT or new BSD license.\n
see: http://github.com/jrburke/requirejs for details\n
*/\n
var requirejs,require,define;\n
(function(Y){function I(b){return"[object Function]"===L.call(b)}function J(b){return"[object Array]"===L.call(b)}function x(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function M(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function r(b,c){return da.call(b,c)}function i(b,c){return r(b,c)&&b[c]}function E(b,c){for(var d in b)if(r(b,d)&&c(b[d],d))break}function Q(b,c,d,i){c&&E(c,function(c,h){if(d||!r(b,h))i&&"string"!==typeof c?(b[h]||(b[h]={}),Q(b[h],\n
c,d,i)):b[h]=c});return b}function t(b,c){return function(){return c.apply(b,arguments)}}function Z(b){if(!b)return b;var c=Y;x(b.split("."),function(b){c=c[b]});return c}function F(b,c,d,i){c=Error(c+"\\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=i;d&&(c.originalError=d);return c}function ea(b){function c(a,f,v){var e,n,b,c,d,k,g,h=f&&f.split("/");e=h;var l=m.map,j=l&&l["*"];if(a&&"."===a.charAt(0))if(f){e=i(m.pkgs,f)?h=[f]:h.slice(0,h.length-1);f=a=e.concat(a.split("/"));\n
for(e=0;f[e];e+=1)if(n=f[e],"."===n)f.splice(e,1),e-=1;else if(".."===n)if(1===e&&(".."===f[2]||".."===f[0]))break;else 0<e&&(f.splice(e-1,2),e-=2);e=i(m.pkgs,f=a[0]);a=a.join("/");e&&a===f+"/"+e.main&&(a=f)}else 0===a.indexOf("./")&&(a=a.substring(2));if(v&&(h||j)&&l){f=a.split("/");for(e=f.length;0<e;e-=1){b=f.slice(0,e).join("/");if(h)for(n=h.length;0<n;n-=1)if(v=i(l,h.slice(0,n).join("/")))if(v=i(v,b)){c=v;d=e;break}if(c)break;!k&&(j&&i(j,b))&&(k=i(j,b),g=e)}!c&&k&&(c=k,d=g);c&&(f.splice(0,d,\n
c),a=f.join("/"))}return a}function d(a){z&&x(document.getElementsByTagName("script"),function(f){if(f.getAttribute("data-requiremodule")===a&&f.getAttribute("data-requirecontext")===k.contextName)return f.parentNode.removeChild(f),!0})}function y(a){var f=i(m.paths,a);if(f&&J(f)&&1<f.length)return d(a),f.shift(),k.require.undef(a),k.require([a]),!0}function g(a){var f,b=a?a.indexOf("!"):-1;-1<b&&(f=a.substring(0,b),a=a.substring(b+1,a.length));return[f,a]}function h(a,f,b,e){var n,u,d=null,h=f?f.name:\n
null,l=a,m=!0,j="";a||(m=!1,a="_@r"+(L+=1));a=g(a);d=a[0];a=a[1];d&&(d=c(d,h,e),u=i(p,d));a&&(d?j=u&&u.normalize?u.normalize(a,function(a){return c(a,h,e)}):c(a,h,e):(j=c(a,h,e),a=g(j),d=a[0],j=a[1],b=!0,n=k.nameToUrl(j)));b=d&&!u&&!b?"_unnormalized"+(M+=1):"";return{prefix:d,name:j,parentMap:f,unnormalized:!!b,url:n,originalName:l,isDefine:m,id:(d?d+"!"+j:j)+b}}function q(a){var f=a.id,b=i(j,f);b||(b=j[f]=new k.Module(a));return b}function s(a,f,b){var e=a.id,n=i(j,e);if(r(p,e)&&(!n||n.defineEmitComplete))"defined"===\n
f&&b(p[e]);else q(a).on(f,b)}function A(a,f){var b=a.requireModules,e=!1;if(f)f(a);else if(x(b,function(f){if(f=i(j,f))f.error=a,f.events.error&&(e=!0,f.emit("error",a))}),!e)l.onError(a)}function w(){R.length&&(fa.apply(G,[G.length-1,0].concat(R)),R=[])}function B(a,f,b){var e=a.map.id;a.error?a.emit("error",a.error):(f[e]=!0,x(a.depMaps,function(e,c){var d=e.id,h=i(j,d);h&&(!a.depMatched[c]&&!b[d])&&(i(f,d)?(a.defineDep(c,p[d]),a.check()):B(h,f,b))}),b[e]=!0)}function C(){var a,f,b,e,n=(b=1E3*m.waitSeconds)&&\n
k.startTime+b<(new Date).getTime(),c=[],h=[],g=!1,l=!0;if(!T){T=!0;E(j,function(b){a=b.map;f=a.id;if(b.enabled&&(a.isDefine||h.push(b),!b.error))if(!b.inited&&n)y(f)?g=e=!0:(c.push(f),d(f));else if(!b.inited&&(b.fetched&&a.isDefine)&&(g=!0,!a.prefix))return l=!1});if(n&&c.length)return b=F("timeout","Load timeout for modules: "+c,null,c),b.contextName=k.contextName,A(b);l&&x(h,function(a){B(a,{},{})});if((!n||e)&&g)if((z||$)&&!U)U=setTimeout(function(){U=0;C()},50);T=!1}}function D(a){r(p,a[0])||\n
q(h(a[0],null,!0)).init(a[1],a[2])}function H(a){var a=a.currentTarget||a.srcElement,b=k.onScriptLoad;a.detachEvent&&!V?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=k.onScriptError;(!a.detachEvent||V)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function K(){var a;for(w();G.length;){a=G.shift();if(null===a[0])return A(F("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));D(a)}}var T,W,k,N,U,m={waitSeconds:7,\n
baseUrl:"./",paths:{},pkgs:{},shim:{},map:{},config:{}},j={},X={},G=[],p={},S={},L=1,M=1;N={require:function(a){return a.require?a.require:a.require=k.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?a.exports:a.exports=p[a.map.id]={}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return m.config&&i(m.config,a.map.id)||{}},exports:p[a.map.id]}}};W=function(a){this.events=i(X,a.id)||{};this.map=a;this.shim=\n
i(m.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};W.prototype={init:function(a,b,c,e){e=e||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=t(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=c;this.inited=!0;this.ignore=e.ignore;e.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=\n
b)},fetch:function(){if(!this.fetched){this.fetched=!0;k.startTime=(new Date).getTime();var a=this.map;if(this.shim)k.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],t(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;S[a]||(S[a]=!0,k.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var e=this.exports,n=this.factory;\n
if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(I(n)){if(this.events.error)try{e=k.execCb(c,n,b,e)}catch(d){a=d}else e=k.execCb(c,n,b,e);this.map.isDefine&&((b=this.module)&&void 0!==b.exports&&b.exports!==this.exports?e=b.exports:void 0===e&&this.usingExports&&(e=this.exports));if(a)return a.requireMap=this.map,a.requireModules=[this.map.id],a.requireType="define",A(this.error=a)}else e=n;this.exports=e;if(this.map.isDefine&&\n
!this.ignore&&(p[c]=e,l.onResourceLoad))l.onResourceLoad(k,this.map,this.depMaps);delete j[c];this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=h(a.prefix);this.depMaps.push(d);s(d,"defined",t(this,function(e){var n,d;d=this.map.name;var v=this.map.parentMap?this.map.parentMap.name:null,g=k.makeRequire(a.parentMap,{enableBuildCallback:!0});\n
if(this.map.unnormalized){if(e.normalize&&(d=e.normalize(d,function(a){return c(a,v,!0)})||""),e=h(a.prefix+"!"+d,this.map.parentMap),s(e,"defined",t(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=i(j,e.id)){this.depMaps.push(e);if(this.events.error)d.on("error",t(this,function(a){this.emit("error",a)}));d.enable()}}else n=t(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),n.error=t(this,function(a){this.inited=!0;this.error=a;a.requireModules=\n
[b];E(j,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&delete j[a.map.id]});A(a)}),n.fromText=t(this,function(e,c){var d=a.name,u=h(d),v=O;c&&(e=c);v&&(O=!1);q(u);r(m.config,b)&&(m.config[d]=m.config[b]);try{l.exec(e)}catch(j){return A(F("fromtexteval","fromText eval for "+b+" failed: "+j,j,[b]))}v&&(O=!0);this.depMaps.push(u);k.completeLoad(d);g([d],n)}),e.load(a.name,g,n,m)}));k.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){this.enabling=this.enabled=!0;x(this.depMaps,t(this,function(a,\n
b){var c,e;if("string"===typeof a){a=h(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=i(N,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;s(a,"defined",t(this,function(a){this.defineDep(b,a);this.check()}));this.errback&&s(a,"error",this.errback)}c=a.id;e=j[c];!r(N,c)&&(e&&!e.enabled)&&k.enable(a,this)}));E(this.pluginMaps,t(this,function(a){var b=i(j,a.id);b&&!b.enabled&&k.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=\n
this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){x(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};k={config:m,contextName:b,registry:j,defined:p,urlFetched:S,defQueue:G,Module:W,makeModuleMap:h,nextTick:l.nextTick,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=m.pkgs,c=m.shim,e={paths:!0,config:!0,map:!0};E(a,function(a,b){e[b]?"map"===b?Q(m[b],a,!0,!0):Q(m[b],a,!0):m[b]=a});a.shim&&(E(a.shim,function(a,\n
b){J(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=k.makeShimExports(a);c[b]=a}),m.shim=c);a.packages&&(x(a.packages,function(a){a="string"===typeof a?{name:a}:a;b[a.name]={name:a.name,location:a.location||a.name,main:(a.main||"main").replace(ga,"").replace(aa,"")}}),m.pkgs=b);E(j,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=h(b))});if(a.deps||a.callback)k.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(Y,arguments));\n
return b||a.exports&&Z(a.exports)}},makeRequire:function(a,d){function g(e,c,u){var i,m;d.enableBuildCallback&&(c&&I(c))&&(c.__requireJsBuild=!0);if("string"===typeof e){if(I(c))return A(F("requireargs","Invalid require call"),u);if(a&&r(N,e))return N[e](j[a.id]);if(l.get)return l.get(k,e,a);i=h(e,a,!1,!0);i=i.id;return!r(p,i)?A(F("notloaded",\'Module name "\'+i+\'" has not been loaded yet for context: \'+b+(a?"":". Use require([])"))):p[i]}K();k.nextTick(function(){K();m=q(h(null,a));m.skipMap=d.skipMap;\n
m.init(e,c,u,{enabled:!0});C()});return g}d=d||{};Q(g,{isBrowser:z,toUrl:function(b){var d,f=b.lastIndexOf("."),h=b.split("/")[0];if(-1!==f&&(!("."===h||".."===h)||1<f))d=b.substring(f,b.length),b=b.substring(0,f);b=k.nameToUrl(c(b,a&&a.id,!0),d||".fake");return d?b:b.substring(0,b.length-5)},defined:function(b){return r(p,h(b,a,!1,!0).id)},specified:function(b){b=h(b,a,!1,!0).id;return r(p,b)||r(j,b)}});a||(g.undef=function(b){w();var c=h(b,a,!0),d=i(j,b);delete p[b];delete S[c.url];delete X[b];\n
d&&(d.events.defined&&(X[b]=d.events),delete j[b])});return g},enable:function(a){i(j,a.id)&&q(a).enable()},completeLoad:function(a){var b,c,d=i(m.shim,a)||{},h=d.exports;for(w();G.length;){c=G.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);D(c)}c=i(j,a);if(!b&&!r(p,a)&&c&&!c.inited){if(m.enforceDefine&&(!h||!Z(h)))return y(a)?void 0:A(F("nodefine","No define call for "+a,null,[a]));D([a,d.deps||[],d.exportsFn])}C()},nameToUrl:function(a,b){var c,d,h,g,k,j;if(l.jsExtRegExp.test(a))g=\n
a+(b||"");else{c=m.paths;d=m.pkgs;g=a.split("/");for(k=g.length;0<k;k-=1)if(j=g.slice(0,k).join("/"),h=i(d,j),j=i(c,j)){J(j)&&(j=j[0]);g.splice(0,k,j);break}else if(h){c=a===h.name?h.location+"/"+h.main:h.location;g.splice(0,k,c);break}g=g.join("/");g+=b||(/\\?/.test(g)?"":".js");g=("/"===g.charAt(0)||g.match(/^[\\w\\+\\.\\-]+:/)?"":m.baseUrl)+g}return m.urlArgs?g+((-1===g.indexOf("?")?"?":"&")+m.urlArgs):g},load:function(a,b){l.load(k,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===\n
a.type||ha.test((a.currentTarget||a.srcElement).readyState))P=null,a=H(a),k.completeLoad(a.id)},onScriptError:function(a){var b=H(a);if(!y(b.id))return A(F("scripterror","Script error",a,[b.id]))}};k.require=k.makeRequire();return k}var l,w,B,D,s,H,P,K,ba,ca,ia=/(\\/\\*([\\s\\S]*?)\\*\\/|([^:]|^)\\/\\/(.*)$)/mg,ja=/[^.]\\s*require\\s*\\(\\s*["\']([^\'"\\s]+)["\']\\s*\\)/g,aa=/\\.js$/,ga=/^\\.\\//;w=Object.prototype;var L=w.toString,da=w.hasOwnProperty,fa=Array.prototype.splice,z=!!("undefined"!==typeof window&&navigator&&\n
document),$=!z&&"undefined"!==typeof importScripts,ha=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,V="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),C={},q={},R=[],O=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(I(requirejs))return;q=requirejs;requirejs=void 0}"undefined"!==typeof require&&!I(require)&&(q=require,require=void 0);l=requirejs=function(b,c,d,y){var g,h="_";!J(b)&&"string"!==typeof b&&(g=b,J(c)?(b=c,c=d,d=y):b=[]);\n
g&&g.context&&(h=g.context);(y=i(C,h))||(y=C[h]=l.s.newContext(h));g&&y.configure(g);return y.require(b,c,d)};l.config=function(b){return l(b)};l.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=l);l.version="2.1.4";l.jsExtRegExp=/^\\/|:|\\?|\\.js$/;l.isBrowser=z;w=l.s={contexts:C,newContext:ea};l({});x(["toUrl","undef","defined","specified"],function(b){l[b]=function(){var c=C._;return c.require[b].apply(c,arguments)}});if(z&&(B=w.head=document.getElementsByTagName("head")[0],\n
D=document.getElementsByTagName("base")[0]))B=w.head=D.parentNode;l.onError=function(b){throw b;};l.load=function(b,c,d){var i=b&&b.config||{},g;if(z)return g=i.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),g.type=i.scriptType||"text/javascript",g.charset="utf-8",g.async=!0,g.setAttribute("data-requirecontext",b.contextName),g.setAttribute("data-requiremodule",c),g.attachEvent&&!(g.attachEvent.toString&&0>g.attachEvent.toString().indexOf("[native code"))&&\n
!V?(O=!0,g.attachEvent("onreadystatechange",b.onScriptLoad)):(g.addEventListener("load",b.onScriptLoad,!1),g.addEventListener("error",b.onScriptError,!1)),g.src=d,K=g,D?B.insertBefore(g,D):B.appendChild(g),K=null,g;$&&(importScripts(d),b.completeLoad(c))};z&&M(document.getElementsByTagName("script"),function(b){B||(B=b.parentNode);if(s=b.getAttribute("data-main"))return q.baseUrl||(H=s.split("/"),ba=H.pop(),ca=H.length?H.join("/")+"/":"./",q.baseUrl=ca,s=ba),s=s.replace(aa,""),q.deps=q.deps?q.deps.concat(s):\n
[s],!0});define=function(b,c,d){var i,g;"string"!==typeof b&&(d=c,c=b,b=null);J(c)||(d=c,c=[]);!c.length&&I(d)&&d.length&&(d.toString().replace(ia,"").replace(ja,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c));if(O){if(!(i=K))P&&"interactive"===P.readyState||M(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return P=b}),i=P;i&&(b||(b=i.getAttribute("data-requiremodule")),g=C[i.getAttribute("data-requirecontext")])}(g?\n
g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};l.exec=function(b){return eval(b)};l(q)}})(this);\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>14629</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>require.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" 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>ts62728561.31</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>route.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*global window, jQuery */\n
/*!\n
* route.js v1.0.0\n
*\n
* Copyright 2012, Romain Courteaud\n
* Dual licensed under the MIT or GPL Version 2 licenses.\n
*\n
* Date: Mon Jul 16 2012\n
*/\n
"use strict";\n
(function (window, $) {\n
\n
$.extend({\n
StatelessDeferred: function () {\n
var doneList = $.Callbacks("memory"),\n
promise = {\n
done: doneList.add,\n
\n
// Get a promise for this deferred\n
// If obj is provided, the promise aspect is added to the object\n
promise: function (obj) {\n
var i,\n
keys = [\'done\', \'promise\'];\n
if (obj === undefined) {\n
obj = promise;\n
} else {\n
for (i = 0; i < keys.length; i += 1) {\n
obj[keys[i]] = promise[keys[i]];\n
}\n
}\n
return obj;\n
}\n
},\n
deferred = promise.promise({});\n
\n
deferred.resolveWith = doneList.fireWith;\n
\n
// All done!\n
return deferred;\n
}\n
});\n
\n
var routes = [],\n
current_priority = 0,\n
methods = {\n
add: function (pattern, priority) {\n
var i = 0,\n
inserted = false,\n
length = routes.length,\n
dfr = $.StatelessDeferred(),\n
context = $(this),\n
escapepattern,\n
matchingpattern;\n
\n
if (priority === undefined) {\n
priority = 0;\n
}\n
if (pattern !== undefined) {\n
\n
// http://simonwillison.net/2006/Jan/20/escape/\n
escapepattern = pattern.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, "\\\\$&");\n
matchingpattern = escapepattern\n
.replace(/<int:\\w+>/g, "(\\\\d+)")\n
.replace(/<path:\\w+>/g, "(.+)")\n
.replace(/<\\w+>/g, "([^/]+)");\n
\n
while (!inserted) {\n
if ((i === length) || (priority >= routes[i][2])) {\n
routes.splice(i, 0, [new RegExp(\'^\' + matchingpattern + \'$\'), dfr, priority, context]);\n
inserted = true;\n
} else {\n
i += 1;\n
}\n
}\n
}\n
return dfr.promise();\n
},\n
go: function (path, min_priority) {\n
var dfr = $.Deferred(),\n
context = $(this),\n
result;\n
\n
if (min_priority === undefined) {\n
min_priority = 0;\n
}\n
setTimeout(function () {\n
var i = 0,\n
found = false,\n
slice_index = -1,\n
slice_priority = -1;\n
for (i = 0; i < routes.length; i += 1) {\n
if (slice_priority !== routes[i][2]) {\n
slice_priority = routes[i][2];\n
slice_index = i;\n
}\n
if (routes[i][2] < min_priority) {\n
break;\n
} else if (routes[i][0].test(path)) {\n
result = routes[i][0].exec(path);\n
dfr = routes[i][1];\n
context = routes[i][3];\n
current_priority = routes[i][2];\n
found = true;\n
break;\n
}\n
}\n
if (i === routes.length) {\n
slice_index = i;\n
}\n
if (slice_index > -1) {\n
routes = routes.slice(slice_index);\n
}\n
if (found) {\n
dfr.resolveWith(\n
context,\n
result.slice(1)\n
);\n
} else {\n
dfr.rejectWith(context);\n
}\n
});\n
return dfr.promise();\n
},\n
};\n
\n
\n
$.routereset = function () {\n
routes = [];\n
current_priority = 0;\n
};\n
\n
$.routepriority = function () {\n
return current_priority;\n
};\n
\n
$.fn.route = function (method) {\n
var result;\n
if (methods.hasOwnProperty(method)) {\n
result = methods[method].apply(\n
this,\n
Array.prototype.slice.call(arguments, 1)\n
);\n
} else {\n
$.error(\'Method \' + method +\n
\' does not exist on jQuery.route\');\n
}\n
return result;\n
};\n
\n
}(window, jQuery));\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3939</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>route.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" 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>ts62728569.21</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>url.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*!\n
* url.js v1.0.0\n
*\n
* Copyright 2012, Romain Courteaud\n
* Dual licensed under the MIT or GPL Version 2 licenses.\n
*\n
* Date: Mon Jul 16 2012\n
*/\n
"use strict";\n
(function (window, $) {\n
\n
var hashchangeinitialized = false,\n
previousurl,\n
currentcallback,\n
getRawHash = function () {\n
return window.location.toString().split(\'#\')[1];\n
},\n
callbackwrapper = function () {\n
if (previousurl !== window.location.hash) {\n
previousurl = window.location.hash;\n
if (currentcallback !== undefined) {\n
currentcallback();\n
}\n
}\n
},\n
timeoutwrapper = function () {\n
callbackwrapper();\n
window.setTimeout(timeoutwrapper, 500);\n
};\n
\n
function UrlHandler() {}\n
\n
UrlHandler.prototype = {\n
\'generateUrl\': function (path, options) {\n
var pathhash,\n
hash = \'#\',\n
key;\n
if (path !== undefined) {\n
hash += encodeURIComponent(path);\n
}\n
hash = hash.replace(/%2F/g, \'/\');\n
pathhash = hash;\n
for (key in options) {\n
if (options.hasOwnProperty(key)) {\n
if (hash === pathhash) {\n
hash = hash + \'?\';\n
} else {\n
hash = hash + \'&\';\n
}\n
hash += encodeURIComponent(key) +\n
\'=\' + encodeURIComponent(options[key]);\n
}\n
}\n
return hash;\n
},\n
\n
\'go\': function (path, options) {\n
window.location.hash = this.generateUrl(path, options);\n
},\n
\n
\'redirect\': function (path, options) {\n
var host = window.location.protocol + \'//\' +\n
window.location.host +\n
window.location.pathname +\n
window.location.search;\n
window.location.replace(host + this.generateUrl(path, options));\n
// window.location.replace(window.location.href.replace(/#.*/, ""));\n
},\n
\n
\'getPath\': function () {\n
var hash = getRawHash(),\n
result = \'\';\n
if (hash !== undefined) {\n
result = decodeURIComponent(hash.split(\'?\')[0]);\n
}\n
return result;\n
},\n
\n
\'getOptions\': function () {\n
var options = {},\n
hash = getRawHash(),\n
subhashes,\n
subhash,\n
index,\n
keyvalue;\n
if (hash !== undefined) {\n
hash = hash.split(\'?\')[1];\n
if (hash !== undefined) {\n
subhashes = hash.split(\'&\');\n
for (index in subhashes) {\n
if (subhashes.hasOwnProperty(index)) {\n
subhash = subhashes[index];\n
if (subhash !== \'\') {\n
keyvalue = subhash.split(\'=\');\n
if (keyvalue.length === 2) {\n
options[decodeURIComponent(keyvalue[0])] =\n
decodeURIComponent(keyvalue[1]);\n
}\n
}\n
}\n
}\n
}\n
}\n
return options;\n
},\n
\n
\'onhashchange\': function (callback) {\n
previousurl = undefined;\n
currentcallback = callback;\n
\n
if (!hashchangeinitialized) {\n
if (window.onhashchange !== undefined) {\n
$(window).bind(\'hashchange\', callbackwrapper);\n
window.setTimeout(callbackwrapper);\n
} else {\n
timeoutwrapper();\n
}\n
hashchangeinitialized = true;\n
}\n
},\n
};\n
\n
// Expose to the global object\n
$.url = new UrlHandler();\n
\n
}(window, jQuery));\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3293</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>url.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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 xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
<tal:block tal:define="portal here/getPortalObject;\n
actions python:portal.portal_actions.listFilteredActionsFor(here)">\n
<span class="first">\n
<span id="favourites" class="favourites">\n
<select name="select_favorite"\n
onChange="submitAction(this.form,\'Base_doFavorite\')"\n
tal:define="ordered_global_actions python:here.getOrderedGlobalActionList(actions[\'global\']);\n
user_actions actions/user;">\n
<option selected="selected" value=""\n
i18n:translate="" i18n:domain="ui">My Favourites</option>\n
<tal:block tal:repeat="action ordered_global_actions">\n
<option tal:condition="action/disabled"\n
disabled="disabled">-- <tal:block tal:content="action/title" i18n:translate="" i18n:domain="ui" /> --</option>\n
<tal:block tal:condition="not:action/disabled"\n
tal:define="name python: action.get(\'name\', \'\');\n
index python: name.find(\' (\');">\n
<option tal:condition="python: index &gt;= 0"\n
tal:attributes="value action/url"><tal:block tal:content="python: name[:index]" i18n:translate="" i18n:domain="ui"></tal:block><tal:block tal:replace="python: name[index:]" /></option>\n
<option tal:condition="python: index &lt; 0"\n
tal:attributes="value action/url"\n
tal:content="action/name"\n
i18n:translate="" i18n:domain="ui"></option>\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="user_actions">\n
<option disabled="disabled">-- <tal:block i18n:translate="" i18n:domain="ui">User</tal:block> --</option>\n
<option tal:repeat="action user_actions"\n
tal:content="action/name"\n
tal:attributes="value action/url"\n
i18n:translate="" i18n:domain="ui"></option>\n
</tal:block>\n
</select>\n
<button type="submit" name="Base_doFavorite:method" title="Select Favourite"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description"\n
i18n:translate="" i18n:domain="ui">Select Favourite</span>\n
</button>\n
</span>\n
<span class="separator"><!--separator--></span>\n
<span id="modules" class="modules">\n
<select name="select_module"\n
onChange="submitAction(this.form,\'Base_doModule\')"\n
tal:define="module_list here/ERP5Site_getModuleItemList;">\n
<option selected="selected" value="" i18n:translate="" i18n:domain="ui">Modules</option>\n
<option tal:repeat="module module_list"\n
tal:attributes="value python: module[1]"\n
tal:content="python: module[0]"\n
tal:omit-tag="nothing" />\n
</select>\n
<button type="submit" name="Base_doModule:method" title="Select Module"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description"\n
i18n:translate="" i18n:domain="ui">Select Module</span>\n
</button>\n
</span>\n
</span>\n
<span class="second">\n
<span id="language" class="language">\n
<select name="select_language"\n
tal:define="language_list python:portal.portal_preferences.getPreference(\'preferred_user_interface_language_list\', None)"\n
onChange="submitAction(this.form,\'Base_doLanguage\')">\n
<option value=""\n
i18n:translate="" i18n:domain="ui">My Language</option>\n
<tal:block tal:repeat="language python:portal.Localizer.get_languages_map()">\n
<option \n
tal:condition="python:not language_list or language[\'id\'] in language_list"\n
tal:omit-tag="nothing"\n
tal:attributes="value language/id;\n
selected python: language[\'selected\'] and \'selected\' or nothing;"\n
tal:content="python: here.Localizer.erp5_ui.gettext(language[\'title\'], lang=language[\'id\'])" />\n
</tal:block>\n
</select>\n
<button type="submit" name="Base_doLanguage:method" title="Select Language"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description"\n
i18n:translate="" i18n:domain="ui">Select Language</span>\n
</button>\n
</span>\n
<span class="separator"><!--separator--></span>\n
<span id="search" class="search" tal:define="search_default_text python:here.Base_translateString(\'Search\')">\n
<input type="hidden" name="all_languages" value="1" />\n
<input class="quick_search_field" accesskey="4" type="text" name="field_your_search_text"\n
value="Search" tal:attributes="value string:${search_default_text};\n
onfocus string:if (this.value==\'${search_default_text}\') this.value=\'\';"\n
onfocus="this.value=\'\';"\n
onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_processAdvancedSearch\');" />\n
\n
<select size="1" class="input" name="field_your_search_portal_type">\n
<option value="" selected="selected" i18n:translate="" i18n:domain="ui">Everything</option>\n
<option value="all" i18n:translate="" i18n:domain="ui">All Documents</option>\n
<option tal:repeat="ptype here/getPortalDocumentTypeList"\n
tal:attributes="value ptype"\n
tal:content="python:ptype"\n
i18n:translate="" i18n:domain="ui">Standard Type</option>\n
<option value="Person" i18n:translate="" i18n:domain="ui">Person</option>\n
<option value="Organisation" i18n:translate="" i18n:domain="ui">Organisation</option>\n
</select>\n
\n
<button type="submit" name="ERP5Site_processAdvancedSearch:method" title="Search"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description"\n
i18n:translate="" i18n:domain="ui">Search</span>\n
</button>\n
</span>\n
</span>\n
<p class="clear"></p>\n
</tal:block>\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>navigation_box_render</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>
......@@ -36,8 +36,7 @@
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<div id="status" class="status"\n
tal:define="portal here/getPortalObject">\n
<div tal:define="portal here/getPortalObject">\n
\n
<div id="breadcrumb" class="breadcrumb">\n
<tal:block metal:use-macro="here/breadcrumb_render/macros/breadcrumb" />\n
......@@ -58,6 +57,7 @@
</div>\n
</tal:block>\n
\n
<!-- XXX add portal_status_message gadget -->\n
<div tal:content="request/portal_status_message | nothing" id="transition_message"\n
class="transition_message"/>\n
\n
......
......@@ -34,127 +34,114 @@
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode>\074tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
<value> <unicode encoding="cdata"><![CDATA[
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"\076\n
\074tal:block tal:replace="nothing"\076\n
\074!--\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
<tal:block tal:replace="nothing">\n
<!--\n
IDEAS:\n
- Add callbacks to ERP5Form object (selection ?) to gather needed fields -\076 put them in http_parameter_list.\n
--\076\n
\074/tal:block\076\n
\074tal:block metal:define-macro="master"\076\n
\074tal:block tal:define="global_definitions_macros here/global_definitions/macros;\n
subject_list subject_list | python:here.getProperty(\'subject_list\', []) or []"\076\n
\074tal:block metal:use-macro="global_definitions_macros/header_definitions" /\076\n
\074!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"\076\n
\074html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"\076\n
\074head\076\n
\074base tal:attributes="href python: \'%s/\' % (url, )" /\076\n
\074meta name="generator" content="ERP5 - Copyright (C) 2001 - 2008. All rights reserved." /\076\n
\074meta name="description" content=""\n
tal:attributes="content description | title | string:ERP5 Free Open Source ERP and CRM" /\076\n
\074meta name="keywords" content=""\n
tal:attributes="content python:\', \'.join(subject_list)" /\076\n
\074meta name="robots" content="index, follow" /\076\n
\074meta http-equiv="Content-Type" content="text/html; charset=utf-8" /\076\n
\074meta http-equiv="Content-Script-Type" content="text/javascript" /\076\n
\074meta http-equiv="Content-Style-Type" content="text/css" /\076\n
\074title tal:define="title title | string:ERP5;\n
- Add callbacks to ERP5Form object (selection ?) to gather needed fields -> put them in http_parameter_list.\n
-->\n
</tal:block>\n
<tal:block metal:define-macro="master">\n
<tal:block tal:define="global_definitions_macros here/global_definitions/macros;\n
subject_list subject_list | python:here.getProperty(\'subject_list\', []) or []">\n
<tal:block metal:use-macro="global_definitions_macros/header_definitions" />\n
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n
<head>\n
<base tal:attributes="href python: \'%s/\' % (url, )" />\n
<meta name="generator" content="ERP5 - Copyright (C) 2001 - 2008. All rights reserved." />\n
<meta name="description" content=""\n
tal:attributes="content description | title | string:ERP5 Free Open Source ERP and CRM" />\n
<meta name="keywords" content=""\n
tal:attributes="content python:\', \'.join(subject_list)" />\n
<meta name="robots" content="index, follow" />\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n
<meta http-equiv="Content-Script-Type" content="text/javascript" />\n
<meta http-equiv="Content-Style-Type" content="text/css" />\n
<title tal:define="title title | string:ERP5;\n
header_title header_title | nothing"\n
tal:content="python:header_title or \'%s | %s\' % (title, here.getPortalObject().title_or_id())"\076\074/title\076\n
\074tal:block tal:repeat="css css_list"\076\n
\074link tal:attributes="href css" type="text/css" rel="stylesheet" /\076\n
\074/tal:block\076\n
\074tal:block tal:replace="nothing"\076\n
\074!-- Render each field\'s css and javascript. --\076\n
\074/tal:block\076\n
\074tal:block tal:condition="python: form is not None"\076\n
\074tal:block tal:repeat="group python: [x for x in form.get_groups(include_empty=0) if x != \'hidden\']"\076\n
\074tal:block tal:repeat="field python: form.get_fields_in_group(group)"\076\n
\074tal:block tal:define="css python: field.render_css(REQUEST=request)"\076\n
\074style tal:condition="python: css is not None"\n
tal:content="python:header_title or \'%s | %s\' % (title, here.getPortalObject().title_or_id())"></title>\n
<tal:block tal:repeat="css css_list">\n
<link tal:attributes="href css" type="text/css" rel="stylesheet" />\n
</tal:block>\n
<tal:block tal:replace="nothing">\n
<!-- Render each field\'s css and javascript. -->\n
</tal:block>\n
<tal:block tal:condition="python: form is not None">\n
<tal:block tal:repeat="group python: [x for x in form.get_groups(include_empty=0) if x != \'hidden\']">\n
<tal:block tal:repeat="field python: form.get_fields_in_group(group)">\n
<tal:block tal:define="css python: field.render_css(REQUEST=request)">\n
<style tal:condition="python: css is not None"\n
tal:content="css"\n
tal:attributes="type python:\'text/css\'"\076\n
\074/style\076\n
\074/tal:block\076\n
\074tal:block tal:define="dummy python: js_list.extend(field.get_javascript_list(REQUEST=request))" /\076\n
\074/tal:block\076\n
\074/tal:block\076\n
\074/tal:block\076\n
\074tal:block tal:repeat="js js_list"\076\n
\074script tal:attributes="src js" type="text/javascript"\076\074/script\076\n
\074/tal:block\076\n
tal:attributes="type python:\'text/css\'">\n
</style>\n
</tal:block>\n
<tal:block tal:define="dummy python: js_list.extend(field.get_javascript_list(REQUEST=request))" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
\074!-- RenderJs added libraries (WIP, XXX: use requirejs) --\076\n
\074script src="jquery/ui/js/jquery-ui.js" type="text/javascript"\076\074/script\076\n
\074link rel="stylesheet" type="text/css" media="screen" href="jquery/plugin/jqgrid/ui.jqgrid.css" /\076\n
\074link rel="stylesheet" type="text/css" media="screen" href="jquery/ui/css/erp5-theme/jquery-ui.css" /\076\n
\074script type="text/javascript" src="jquery/plugin/jqgrid/i18n/grid.locale-en.js"\076\074/script\076\n
\074script type="text/javascript" src="jquery/plugin/jqgrid/jquery.jqGrid.src.js"\076\074/script\076\n
\074!--[if IE]\076\n
\074script type="text/javascript" src="jquery/plugin/jstorage/jquery.json-2.3.js"\076\074/script\076\n
\074!--\074![endif]--\076\n
\074script src="jquery/plugin/renderjs/renderjs.js"\076\074/script\076\n
\074script src="erp5_form.js"\076\074/script\076\n
<link rel="stylesheet" type="text/css" media="screen" href="gadget-style.css" />\n
<link rel="stylesheet" type="text/css" media="screen" href="jquery/plugin/jqgrid/ui.jqgrid.css" />\n
<link rel="stylesheet" type="text/css" media="screen" href="jquery/ui/css/erp5-theme/jquery-ui.css" />\n
\n
\074script type="text/javascript" language="javascript"\076\n
//\074![CDATA[\n
$(document).ready(function() {\n
// we need to explicitly fire it\n
RenderJs.init();\n
});\n
//]]\076\n
\074/script\076\n
<script data-main="lib/require-erp5.js"\n
type="text/javascript"\n
src="lib/require.js"></script>\n
\n
\074link rel="icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" /\076\n
\074link rel="shortcut icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" /\076\n
\074tal:block metal:define-slot="head"\076\n
\074!-- this is a placeholder for different extensions to head which could be required by web themes --\076\n
\074/tal:block\076\n
\074/head\076\n
\074body tal:attributes="class body_css_class|nothing"\076\n
\074form id="main_form"\n
<link rel="icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" />\n
<link rel="shortcut icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" />\n
<tal:block metal:define-slot="head">\n
<!-- this is a placeholder for different extensions to head which could be required by web themes -->\n
</tal:block>\n
</head>\n
<body tal:attributes="class body_css_class|nothing">\n
<form id="main_form"\n
class="main_form"\n
onsubmit="changed=false; return true"\n
tal:attributes="enctype enctype | form/Form_getEnctype | nothing;\n
action url;\n
method python:str(path(\'form/method | string:post\')).lower()"\076\n
\074fieldset id="hidden_fieldset" class="hidden_fieldset"\076\n
\074input tal:condition="form_action | nothing"\n
method python:str(path(\'form/method | string:post\')).lower()">\n
<fieldset id="hidden_fieldset" class="hidden_fieldset">\n
<input tal:condition="form_action | nothing"\n
id="hidden_button" class="hidden_button" type="submit" value="dummy"\n
tal:attributes="name string:${form_action}:method" /\076\n
\074tal:block metal:use-macro="global_definitions_macros/http_definitions" /\076\n
\074/fieldset\076\n
\074tal:block metal:define-slot="layout"\076\n
tal:attributes="name string:${form_action}:method" />\n
<tal:block metal:use-macro="global_definitions_macros/http_definitions" />\n
</fieldset>\n
<tal:block metal:define-slot="layout">\n
\n
\074div id="bars" class="bars"\076\n
<div id="bars" class="bars">\n
\n
\074div id="main_bar"\n
data-gadget="ERP5Site_renderCachedNavigationBox"\076\074/div\076\n
<div id="main_bar"\n
data-gadget="ERP5Site_renderCachedNavigationBox"></div>\n
\n
\074!-- XXX: make a gadget --\076\n
\074div id="context_bar" class="context_bar"\076\n
\074tal:block metal:define-slot="context_bar" /\076\n
\074/div\076\n
<div id="context_bar" class="context_bar">\n
<tal:block metal:define-slot="context_bar" />\n
</div>\n
\n
\074/div\076\n
</div>\n
\n
\074div id="status"\n
<div id="status"\n
class="status"\n
data-gadget="status_gadget"\076\074/div\076\n
data-gadget="status_gadget"></div>\n
\n
\074div id="master" class="master"\076\n
\074tal:block metal:define-slot="main" /\076\n
\074/div\076\n
<div id="master" class="master">\n
<tal:block metal:define-slot="main" />\n
</div>\n
\n
\074/tal:block\076\n
\074/form\076\n
\074/body\076\n
\074/html\076\n
\074/tal:block\076\n
\074/tal:block\076\n
\074/tal:block\076</unicode> </value>
</tal:block>\n
</form>\n
</body>\n
</html>\n
</tal:block>\n
</tal:block>\n
</tal:block>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
2012-03-02 Ivan
* Initial work
\ No newline at end of file
* Initial worka
\ No newline at end of file
14
\ No newline at end of file
18
\ No newline at end of file
......@@ -109,7 +109,7 @@
</chain>
<chain>
<type>Preference</type>
<workflow>preference_workflow</workflow>
<workflow>edit_workflow, preference_workflow</workflow>
</chain>
<chain>
<type>Property Existence Constraint</type>
......@@ -137,7 +137,7 @@
</chain>
<chain>
<type>System Preference</type>
<workflow>preference_workflow</workflow>
<workflow>edit_workflow, preference_workflow</workflow>
</chain>
<chain>
<type>TALES Constraint</type>
......
......@@ -32,6 +32,7 @@ Extension Component | edit_workflow
Mapped Value | edit_workflow
Memcached Plugin | memcached_plugin_interaction_workflow
Predicate | rule_interaction_workflow
Preference | edit_workflow
Preference | preference_workflow
Property Existence Constraint | dynamic_class_generation_interaction_workflow
Property Sheet Tool | dynamic_class_generation_interaction_workflow
......@@ -39,6 +40,7 @@ Property Sheet | dynamic_class_generation_interaction_workflow
Property Type Validity Constraint | dynamic_class_generation_interaction_workflow
Standard Property | dynamic_class_generation_interaction_workflow
String Attribute Match Constraint | dynamic_class_generation_interaction_workflow
System Preference | edit_workflow
System Preference | preference_workflow
TALES Constraint | dynamic_class_generation_interaction_workflow
Test Component | component_validation_workflow
......
......@@ -689,8 +689,8 @@ def main(argument_list=None):
os.environ["erp5_tests_data_fs_path"] = arg
os.environ["erp5_tests_recreate_catalog"] = "1"
elif opt == '--bt5_path':
os.environ["erp5_tests_bt5_path"] = \
os.environ.get("erp5_tests_bt5_path", "") + arg
os.environ["erp5_tests_bt5_path"] = ','.join([arg] +
os.environ.get('erp5_tests_bt5_path', '').split(','))
elif opt == '--firefox_bin':
os.environ["firefox_bin"] = arg
elif opt == '--xvfb_bin':
......
......@@ -452,7 +452,7 @@ class Field:
elif obj_type is unicode:
return obj.encode('utf-8')
return str(obj)
return ''.join(map(getSearchSource,
return ' '.join(map(getSearchSource,
(self.values.values()+self.tales.values()+
self.overrides.values())))
......
......@@ -194,13 +194,6 @@ m.DeferredConnection = DeferredConnection
del m
folder_methods={
'manage_addZMySQLConnection':
manage_addZMySQLConnection,
'manage_addZMySQLConnectionForm':
manage_addZMySQLConnectionForm,
}
__ac_permissions__=(
('Add Z MySQL Database Connections',
('manage_addZMySQLConnectionForm',
......
......@@ -89,20 +89,17 @@ __version__='$Revision: 1.4 $'[11:-2]
from . import DA
methods=DA.folder_methods
misc_=DA.misc_
def initialize(context):
permission = "Add Z MySQL Database Connections"
context.registerClass(
DA.Connection,
permission=permission,
permission="Add Z MySQL Database Connections",
constructors=(DA.manage_addZMySQLConnectionForm,
DA.manage_addZMySQLConnection),
)
context.registerClass(
DA.DeferredConnection,
permission=permission,
visibility=None,
)
import Products
Products.meta_types += dict(Products.meta_types[-1],
name=DA.DeferredConnection.meta_type,
action=None),
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