Commit 8e7afa30 authored by Aurel's avatar Aurel

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

Conflicts:
	bt5/erp5_syncml/bt/revision
	bt5/erp5_syncml_test_data/bt/revision
	bt5/erp5_tiosafe_core/bt/template_extension_id_list
	product/ERP5Type/dynamic/component_package.py
parents 76e1ba08 f14c1ac4

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

Changes Changes
======= =======
0.4.36 (2013-06-30)
-------------------
* erp5.util.testsuite:
- delete git repos if url has changed [Sebastien Robin]
0.4.35 (2013-06-21) 0.4.35 (2013-06-21)
------------------- -------------------
......
6 7
\ No newline at end of file \ No newline at end of file
...@@ -65,9 +65,12 @@ simulation_state = request[\'simulation_state\']\n ...@@ -65,9 +65,12 @@ simulation_state = request[\'simulation_state\']\n
role_filter_list = request.get(\'mirror_section_category_list\', None)\n role_filter_list = request.get(\'mirror_section_category_list\', None)\n
omit_balanced_accounts = request[\'omit_balanced_accounts\']\n omit_balanced_accounts = request[\'omit_balanced_accounts\']\n
from_date = request.get(\'from_date\', None)\n from_date = request.get(\'from_date\', None)\n
gap_root = request.get(\'gap_root\', None)\n
project = request.get(\'project\', None)\n project = request.get(\'project\', None)\n
\n \n
currency = portal.Base_getCurrencyForSection(request[\'section_category\'])\n
precision = portal.account_module.getQuantityPrecisionFromResource(currency)\n
request.set(\'precision\', precision)\n
\n
request.other[\'is_accounting_report\'] = True\n request.other[\'is_accounting_report\'] = True\n
\n \n
# role_filter_list == None means no filter on the role\n # role_filter_list == None means no filter on the role\n
...@@ -140,11 +143,12 @@ for party in context.Account_zDistinctSectionList(\n ...@@ -140,11 +143,12 @@ for party in context.Account_zDistinctSectionList(\n
if omit_balanced_accounts and (\n if omit_balanced_accounts and (\n
round(simulation_tool.getInventoryAssetPrice(\n round(simulation_tool.getInventoryAssetPrice(\n
mirror_section_uid=party.uid,\n mirror_section_uid=party.uid,\n
precision=precision,\n
node_category_strict_membership=(\n node_category_strict_membership=(\n
\'account_type/asset/receivable\',\n \'account_type/asset/receivable\',\n
\'account_type/liability/payable\'),\n \'account_type/liability/payable\'),\n
**params\n **params\n
), 3) == 0.):\n ), precision) == 0.):\n
pass\n pass\n
else:\n else:\n
title = o.getTitle()\n title = o.getTitle()\n
......
...@@ -94,7 +94,6 @@ ...@@ -94,7 +94,6 @@
<string>your_project</string> <string>your_project</string>
<string>your_at_date</string> <string>your_at_date</string>
<string>your_omit_balanced_accounts</string> <string>your_omit_balanced_accounts</string>
<string>your_omit_empty_accounts</string>
<string>your_omit_grouping_reference</string> <string>your_omit_grouping_reference</string>
<string>your_mirror_section_category_list</string> <string>your_mirror_section_category_list</string>
<string>your_gap_root</string> <string>your_gap_root</string>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="CheckBoxField" module="Products.Formulator.StandardFields"/> <global name="StringField" module="Products.Formulator.StandardFields"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -18,6 +18,14 @@ ...@@ -18,6 +18,14 @@
<key> <string>external_validator_failed</string> </key> <key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value> <value> <string>The input failed the external validator.</string> </value>
</item> </item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -41,6 +49,14 @@ ...@@ -41,6 +49,14 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -61,10 +77,30 @@ ...@@ -61,10 +77,30 @@
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -82,12 +118,22 @@ ...@@ -82,12 +118,22 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -108,10 +154,30 @@ ...@@ -108,10 +154,30 @@
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -129,12 +195,20 @@ ...@@ -129,12 +195,20 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <int>1</int> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
...@@ -155,9 +229,29 @@ ...@@ -155,9 +229,29 @@
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Omit Empty Accounts</string> </value> <value> <string>Balanced Accounts</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
...@@ -165,4 +259,17 @@ ...@@ -165,4 +259,17 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </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>python: request.get(\'omit_balanced_accounts\') and here.Base_translateString("Without") or here.Base_translateString("With")</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="CheckBoxField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_omit_empty_accounts</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>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Omit Balanced Accounts</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -50,34 +50,24 @@ ...@@ -50,34 +50,24 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""Returns the item list of possible projects to use on accounting lines.\n <value> <string>"""Returns all validated projects.\n
\n \n
This script is indented to be used on custom listfields for accounting lines, and on reports.\n This script is indented to be used on custom listfields for accounting lines, and on reports.\n
If this script returns an empty list, it means that reports by project are disabled.\n If this script returns an empty list, it means that reports by project are disabled.\n
"""\n """\n
from Products.ERP5Type.Message import translateString\n from Products.ERP5Type.Message import translateString\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
request = portal.REQUEST\n
\n \n
# case 1: script is used for reports, we display all project that have been used in accounting.\n # case 1: script is used for reports, we display all validated projects.\n
if context.getPortalType() == \'Accounting Transaction Module\':\n if context.getPortalType() == \'Accounting Transaction Module\':\n
getObject = portal.portal_catalog.getObject\n
search_kw=dict(portal_type=portal.getPortalAccountingMovementTypeList(),\n
group_by=(\'stock.project_uid\',))\n
section_category = request.get(\'your_section_category\',\n
portal.portal_preferences.getPreferredAccountingTransactionSectionCategory())\n
if section_category:\n
section_uid = portal.Base_getSectionUidListForSectionCategory(\n
section_category=section_category,\n
strict_membership=request.get(\'your_section_category_strict\', False))\n
search_kw[\'section_uid\'] = section_uid\n
\n
project_list = []\n project_list = []\n
for brain in portal.portal_simulation.getInventoryList(**search_kw):\n for project in portal.portal_catalog(\n
if brain.project_uid:\n portal_type=\'Project\',\n
project = getObject(brain.project_uid)\n select_list=[\'relative_url\', \'title\'],\n
project_list.append((project.getTitle(), project.getRelativeUrl(),))\n validation_state=(\'validated\',),\n
project_list.sort(key=lambda x:x[0])\n sort_on=((\'title\', \'ASC\'),)):\n
project_list.append((project.title, project.relative_url,))\n
\n
if not project_list:\n if not project_list:\n
return [] # returning an empty list, not to add project column on reports\n return [] # returning an empty list, not to add project column on reports\n
return [(\'\', \'\'), (translateString(\'No Project\'), \'None\')] + project_list\n return [(\'\', \'\'), (translateString(\'No Project\'), \'None\')] + project_list\n
......
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
<string>my_source_section_title</string> <string>my_source_section_title</string>
<string>my_source_payment</string> <string>my_source_payment</string>
<string>my_payment_mode</string> <string>my_payment_mode</string>
<string>my_aggregate_title</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>columns</string>
<string>enabled</string>
<string>portal_type</string>
<string>proxy_listbox_ids</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_aggregate_title</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>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</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>portal_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>State</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_relation_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<list>
<tuple>
<string>Payment Transaction Group</string>
<string>Payment Transaction Group</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value>
<list>
<tuple>
<string>PaymentTransactionGroupModule_viewPaymentTransactionGroupList/listbox</string>
<string>Payment Transaction Groups</string>
</tuple>
</list>
</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>Payment Transaction Group</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>python:here.getSourceValue(portal_type = \'Account\') is not None and here.getSourceValue(portal_type = \'Account\').isMemberOf(\'account_type/asset/cash\') and context.Base_checkPermission(\'payment_transaction_group_module\', \'View\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
<string>my_destination_section_title</string> <string>my_destination_section_title</string>
<string>my_destination_payment</string> <string>my_destination_payment</string>
<string>my_payment_mode</string> <string>my_payment_mode</string>
<string>my_aggregate_title</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>columns</string>
<string>enabled</string>
<string>portal_type</string>
<string>proxy_listbox_ids</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_aggregate_title</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>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</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>portal_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>State</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_relation_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<list>
<tuple>
<string>Payment Transaction Group</string>
<string>Payment Transaction Group</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value>
<list>
<tuple>
<string>PaymentTransactionGroupModule_viewPaymentTransactionGroupList/listbox</string>
<string>Payment Transaction Groups</string>
</tuple>
</list>
</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>Payment Transaction Group</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>python:here.getDestinationValue(portal_type = \'Account\') is not None and here.getSourceValue(portal_type = \'Account\').isMemberOf(\'account_type/asset/cash\') and context.Base_checkPermission(\'payment_transaction_group_module\', \'View\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -50,7 +50,11 @@ ...@@ -50,7 +50,11 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>request = container.REQUEST\n <value> <string encoding="cdata"><![CDATA[
from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery, ComplexQuery\n
\n
request = container.REQUEST\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
ctool = portal.portal_catalog\n ctool = portal.portal_catalog\n
stool = portal.portal_simulation\n stool = portal.portal_simulation\n
...@@ -89,22 +93,42 @@ if mirror_section:\n ...@@ -89,22 +93,42 @@ if mirror_section:\n
mirror_section).getUid()\n mirror_section).getUid()\n
\n \n
if grouping == \'grouping\':\n if grouping == \'grouping\':\n
where_expression = \'catalog.grouping_reference is NULL\'\n search_kw[\'grouping_reference\'] = None\n
else:\n else:\n
assert grouping == \'ungrouping\', grouping\n assert grouping == \'ungrouping\', grouping\n
where_expression = \'catalog.grouping_reference is not NULL\'\n search_kw[\'grouping_reference\'] = NegatedQuery(Query(grouping_reference=None))\n
\n \n
if title:\n
search_kw[\'title_query\'] = ComplexQuery(Query(title=title),\n
Query(parent_title=title),\n
operator=\'OR\')\n
if delivery_reference:\n
search_kw[\'parent_reference\'] = delivery_reference\n
if debit_price:\n
search_kw[\'stock.total_price\'] = debit_price\n
if credit_price:\n
try:\n
search_kw[\'stock.total_price\'] = - float(credit_price[\'query\'])\n
except ValueError, e:\n
# happens when user entered a complex query (like "> 100 AND < 200")\n
# in that case, there is not much we can do.\n
search_kw[\'stock.total_price\'] = credit_price[\'query\']\n
if date:\n
search_kw[\'stock.date\'] = date\n
\n
\n
return stool.getMovementHistoryList(\n return stool.getMovementHistoryList(\n
section_uid=section_uid,\n section_uid=section_uid,\n
simulation_state=[\'stopped\', \'delivered\'],\n simulation_state=[\'stopped\', \'delivered\'],\n
where_expression=where_expression,\n
sort_on=sort_on,\n sort_on=sort_on,\n
**search_kw)\n **search_kw)\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>selection=None, grouping=\'grouping\', node=\'\', mirror_section=\'\', **kw</string> </value> <value> <string>selection=None, grouping=\'grouping\', node=\'\', mirror_section=\'\', title=None, delivery_reference=None, debit_price=None, credit_price=None, date=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
<string>listbox_delivery_portal_type</string> <string>listbox_delivery_portal_type</string>
<string>listbox_node_title</string> <string>listbox_node_title</string>
<string>listbox_date</string> <string>listbox_date</string>
<string>listbox_title</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
<string>editable_columns</string> <string>editable_columns</string>
<string>lines</string> <string>lines</string>
<string>list_method</string> <string>list_method</string>
<string>search</string>
<string>search_columns</string>
<string>select</string> <string>select</string>
<string>selection_name</string> <string>selection_name</string>
<string>sort</string> <string>sort</string>
...@@ -147,7 +149,7 @@ ...@@ -147,7 +149,7 @@
<string>Date</string> <string>Date</string>
</tuple> </tuple>
<tuple> <tuple>
<string>parent_title</string> <string>title</string>
<string>Title</string> <string>Title</string>
</tuple> </tuple>
<tuple> <tuple>
...@@ -177,6 +179,10 @@ ...@@ -177,6 +179,10 @@
<string>date</string> <string>date</string>
<string>Date</string> <string>Date</string>
</tuple> </tuple>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple> <tuple>
<string>debit_price</string> <string>debit_price</string>
<string>Debit</string> <string>Debit</string>
...@@ -206,6 +212,37 @@ ...@@ -206,6 +212,37 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>search</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>search_columns</string> </key>
<value>
<list>
<tuple>
<string>debit_price</string>
<string>Debit</string>
</tuple>
<tuple>
<string>credit_price</string>
<string>Credit</string>
</tuple>
<tuple>
<string>delivery_reference</string>
<string>Transaction Reference</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>date</string>
<string>Date</string>
</tuple>
</list>
</value>
</item>
<item> <item>
<key> <string>select</string> </key> <key> <string>select</string> </key>
<value> <int>1</int> </value> <value> <int>1</int> </value>
...@@ -246,7 +283,7 @@ ...@@ -246,7 +283,7 @@
<string>Date</string> <string>Date</string>
</tuple> </tuple>
<tuple> <tuple>
<string>parent_title</string> <string>title</string>
<string>Title</string> <string>Title</string>
</tuple> </tuple>
</list> </list>
......
...@@ -62,8 +62,9 @@ section_set = set((None,))\n ...@@ -62,8 +62,9 @@ section_set = set((None,))\n
payment_set = set((None,))\n payment_set = set((None,))\n
payment_request_set = set((None,))\n payment_request_set = set((None,))\n
resource_set = set((context.getResource(),))\n resource_set = set((context.getResource(),))\n
movement_type_list = context.getPortalAccountingMovementTypeList()\n
\n \n
for line in context.getMovementList():\n for line in context.getMovementList(portal_type=movement_type_list):\n
resource_set.add(line.getResource())\n resource_set.add(line.getResource())\n
if source:\n if source:\n
section_set.add(line.getDestinationSection())\n section_set.add(line.getDestinationSection())\n
......
...@@ -59,9 +59,8 @@ of related accounting transactions using causality.\n ...@@ -59,9 +59,8 @@ of related accounting transactions using causality.\n
\n \n
from Products.ERP5Type.Utils import int2letter\n from Products.ERP5Type.Utils import int2letter\n
\n \n
# this dict associates (node, section, mirror_section,\n # this dict associates (node, section, mirror_section, mirror_node, extra_grouping_parameter) to a list of\n
# extra_grouping_parameter) to a list of\n # accounting lines info (total_price, date and path)\n
# accounting lines info (total_price, date and path).\n
lines_per_node = {}\n lines_per_node = {}\n
\n \n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
...@@ -100,6 +99,7 @@ for line in accounting_transaction_line_value_list:\n ...@@ -100,6 +99,7 @@ for line in accounting_transaction_line_value_list:\n
(line.getSource(portal_type=\'Account\'),\n (line.getSource(portal_type=\'Account\'),\n
section_relative_url,\n section_relative_url,\n
line.getDestinationSection(),\n line.getDestinationSection(),\n
line.getDestination(portal_type=\'Account\'),\n
line.AccountingTransactionLine_getGroupingExtraParameterList(source=True),\n line.AccountingTransactionLine_getGroupingExtraParameterList(source=True),\n
), []).append(\n ), []).append(\n
dict(total_price=line.getSourceInventoriatedTotalAssetPrice() or 0,\n dict(total_price=line.getSourceInventoriatedTotalAssetPrice() or 0,\n
...@@ -117,6 +117,7 @@ for line in accounting_transaction_line_value_list:\n ...@@ -117,6 +117,7 @@ for line in accounting_transaction_line_value_list:\n
(line.getDestination(portal_type=\'Account\'),\n (line.getDestination(portal_type=\'Account\'),\n
section_relative_url,\n section_relative_url,\n
line.getSourceSection(),\n line.getSourceSection(),\n
line.getSource(portal_type=\'Account\'),\n
line.AccountingTransactionLine_getGroupingExtraParameterList(source=False),\n line.AccountingTransactionLine_getGroupingExtraParameterList(source=False),\n
), []).append(\n ), []).append(\n
dict(total_price=line.getDestinationInventoriatedTotalAssetPrice() or 0,\n dict(total_price=line.getDestinationInventoriatedTotalAssetPrice() or 0,\n
...@@ -124,7 +125,7 @@ for line in accounting_transaction_line_value_list:\n ...@@ -124,7 +125,7 @@ for line in accounting_transaction_line_value_list:\n
path=line.getRelativeUrl()))\n path=line.getRelativeUrl()))\n
\n \n
changed_line_list = []\n changed_line_list = []\n
for (node, section, mirror_section, extra_parameter), line_info_list in lines_per_node.items():\n for (node, section, mirror_section, mirror_node, extra_parameter), line_info_list in lines_per_node.items():\n
if node is None:\n if node is None:\n
continue\n continue\n
total_price = sum([l[\'total_price\'] for l in line_info_list])\n total_price = sum([l[\'total_price\'] for l in line_info_list])\n
...@@ -136,12 +137,14 @@ for (node, section, mirror_section, extra_parameter), line_info_list in lines_pe ...@@ -136,12 +137,14 @@ for (node, section, mirror_section, extra_parameter), line_info_list in lines_pe
if default_currency is not None:\n if default_currency is not None:\n
total_price = round(total_price, default_currency.getQuantityPrecision())\n total_price = round(total_price, default_currency.getQuantityPrecision())\n
if total_price == 0 or allow_grouping_with_different_quantity:\n if total_price == 0 or allow_grouping_with_different_quantity:\n
# we should include mirror node in the id_group, but this would reset\n
# id generators and generate grouping references that were already used.\n
id_group = (\'grouping_reference\', node, section, mirror_section)\n id_group = (\'grouping_reference\', node, section, mirror_section)\n
previous_default = context.portal_ids.getLastGeneratedId(id_group=id_group, default=0)\n previous_default = context.portal_ids.getLastGeneratedId(id_group=id_group, default=0)\n
grouping_reference = portal.portal_ids.generateNewId(id_generator=\'uid\',\n grouping_reference = portal.portal_ids.generateNewId(id_generator=\'uid\',\n
id_group=id_group,\n id_group=id_group,\n
default=previous_default + 1)\n default=previous_default + 1)\n
\n \n
# convert from int to letters\n # convert from int to letters\n
string_reference = int2letter(grouping_reference)\n string_reference = int2letter(grouping_reference)\n
\n \n
......
<?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># Get sections.\n
source_section = None\n
source_section_value = context.getSourceSectionValue()\n
if source_section_value is not None \\\n
and source_section_value.getPortalType() == \'Organisation\':\n
source_section_value = \\\n
source_section_value.Organisation_getMappingRelatedOrganisation()\n
source_section = source_section_value.getRelativeUrl()\n
\n
destination_section = None\n
destination_section_value = context.getDestinationSectionValue()\n
if destination_section_value is not None \\\n
and destination_section_value.getPortalType() == \'Organisation\':\n
destination_section_value = \\\n
destination_section_value.Organisation_getMappingRelatedOrganisation()\n
destination_section = destination_section_value.getRelativeUrl()\n
\n
portal = context.getPortalObject()\n
id_generator = portal.portal_ids.generateNewId\n
previous_id_getter = portal.portal_ids.getLastGeneratedId\n
\n
# Invoice Reference is automatically filled only for Sale Invoice context.\n
if context.getPortalType() == \'Sale Invoice Transaction\':\n
if not context.getReference():\n
invoice_id_group = (\'accounting\', \'invoice\', source_section)\n
invoice_reference = id_generator(id_generator=\'uid\',\n
id_group=invoice_id_group,\n
default=previous_id_getter(invoice_id_group,\n
default=0) + 1)\n
context.setReference(invoice_reference)\n
\n
\n
# Generate new values for Source Reference and Destination Reference.\n
if not context.getSourceReference():\n
period = context.AccountingTransaction_getAccountingPeriodForSourceSection()\n
period_code = \'\'\n
if period is not None:\n
period_code = period.getShortTitle() or period.getTitle() or \'\'\n
if not period_code:\n
period_code = str(context.getStartDate().year())\n
source_id_group = (\'accounting\', \'section\', source_section, period_code)\n
source_reference = id_generator(id_generator=\'uid\',\n
id_group=source_id_group,\n
default=previous_id_getter(source_id_group,\n
default=0) + 1)\n
context.setSourceReference(\'%s-%s\' % (period_code, source_reference))\n
\n
if not context.getDestinationReference():\n
period = context.AccountingTransaction_getAccountingPeriodForDestinationSection()\n
period_code = \'\'\n
if period is not None:\n
period_code = period.getShortTitle() or period.getTitle() or \'\'\n
if not period_code:\n
period_code = str(context.getStopDate().year())\n
destination_id_group = (\'accounting\', \'section\', destination_section, period_code)\n
destination_reference = id_generator(id_generator=\'uid\',\n
id_group=destination_id_group,\n
default=previous_id_getter(destination_id_group,\n
default=0) + 1)\n
context.setDestinationReference(\'%s-%s\' % (period_code, destination_reference))\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransaction_setReference</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -278,7 +278,7 @@ ...@@ -278,7 +278,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:[(\'\', \'\')] + context.Base_getTranslatedAccountingWorkflowStateItemList()</string> </value> <value> <string>python: context.ERP5Site_getWorkflowStateItemList(portal_type=\'Accounting Transaction\', state_var=\'simulation_state\')</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -50,10 +50,7 @@ ...@@ -50,10 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>\'\'\'Returns all validated accounts + all accounts used by this group on existing\n <value> <string>\'\'\'Returns all validated accounts \'\'\'\n
movements.\n
\n
\'\'\'\n
from Products.ERP5Type.Cache import CachingMethod\n from Products.ERP5Type.Cache import CachingMethod\n
\n \n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
...@@ -63,42 +60,18 @@ def getAccountItemList(section_category,\n ...@@ -63,42 +60,18 @@ def getAccountItemList(section_category,\n
from_date,\n from_date,\n
lang):\n lang):\n
\n \n
def sorted(seq, key):\n account_list = [(\'\', \'\')]\n
seq = seq[::]\n
seq.sort(key=key)\n
return seq\n
\n
account_dict = dict()\n
for account in portal.account_module.searchFolder(\n for account in portal.account_module.searchFolder(\n
portal_type=\'Account\',\n portal_type=\'Account\',\n
validation_state=(\'validated\',), ):\n select_list=["relative_url"],\n
account = account.getObject()\n validation_state=(\'validated\',)):\n
\n account_list.append((\n
account_dict[account.getUid()] = [\n
account.Account_getFormattedTitle(),\n account.Account_getFormattedTitle(),\n
account.getRelativeUrl(), ]\n account.relative_url,))\n
\n \n
search_kw = dict(\n account_list.sort(key=lambda x: x[0])\n
portal_type=portal.getPortalAccountingMovementTypeList(),\n
ignore_group_by=True,\n
group_by_node=True,)\n
if from_date:\n
search_kw[\'from_date\'] = from_date\n
if section_category_strict:\n
search_kw[\'section_category_strict_membership\'] = section_category\n
else:\n
search_kw[\'section_category\'] = section_category\n
\n
# add to this the accounts that have been used in accounting transactions.\n
for brain in portal.portal_simulation.getCurrentInventoryList( **search_kw ):\n
if brain.node_uid and brain.node_uid not in account_dict:\n
account = portal.portal_catalog.getObject(brain.node_uid)\n
account_dict[brain.node_uid] = [\n
account.Account_getFormattedTitle(),\n
account.getRelativeUrl(), ]\n
\n \n
return [(\'\', \'\')] + sorted(account_dict.values(),\n return account_list\n
key=lambda item: item[0])\n
\n \n
getAccountItemList = CachingMethod(getAccountItemList,\n getAccountItemList = CachingMethod(getAccountItemList,\n
id=script.getId(),\n id=script.getId(),\n
......
...@@ -53,81 +53,13 @@ ...@@ -53,81 +53,13 @@
<value> <string>"""Set automatic references on the document.\n <value> <string>"""Set automatic references on the document.\n
"""\n """\n
\n \n
transaction = state_change[\'object\']\n state_change[\'object\'].AccountingTransaction_setReference()\n
\n
# Get sections.\n
source_section = None\n
source_section_value = transaction.getSourceSectionValue()\n
if source_section_value is not None \\\n
and source_section_value.getPortalType() == \'Organisation\':\n
source_section_value = \\\n
source_section_value.Organisation_getMappingRelatedOrganisation()\n
source_section = source_section_value.getRelativeUrl()\n
\n
destination_section = None\n
destination_section_value = transaction.getDestinationSectionValue()\n
if destination_section_value is not None \\\n
and destination_section_value.getPortalType() == \'Organisation\':\n
destination_section_value = \\\n
destination_section_value.Organisation_getMappingRelatedOrganisation()\n
destination_section = destination_section_value.getRelativeUrl()\n
\n
id_generator = state_change.getPortal().portal_ids.generateNewId\n
previous_id_getter = state_change.getPortal().portal_ids.getLastGeneratedId\n
\n
# Invoice Reference is automatically filled only for Sale Invoice Transaction.\n
if transaction.getPortalType() == \'Sale Invoice Transaction\':\n
if not transaction.getReference():\n
invoice_id_group = (\'accounting\', \'invoice\', source_section)\n
invoice_reference = id_generator(id_generator=\'uid\',\n
id_group=invoice_id_group,\n
default=previous_id_getter(invoice_id_group,\n
default=0) + 1)\n
transaction.setReference(invoice_reference)\n
\n
\n
# Generate new values for Source Reference and Destination Reference.\n
if not transaction.getSourceReference():\n
period = transaction.AccountingTransaction_getAccountingPeriodForSourceSection()\n
period_code = \'\'\n
if period is not None:\n
period_code = period.getShortTitle() or period.getTitle() or \'\'\n
if not period_code:\n
period_code = str(transaction.getStartDate().year())\n
source_id_group = (\'accounting\', \'section\', source_section, period_code)\n
source_reference = id_generator(id_generator=\'uid\',\n
id_group=source_id_group,\n
default=previous_id_getter(source_id_group,\n
default=0) + 1)\n
transaction.setSourceReference(\'%s-%s\' % (period_code, source_reference))\n
\n
if not transaction.getDestinationReference():\n
period = transaction.AccountingTransaction_getAccountingPeriodForDestinationSection()\n
period_code = \'\'\n
if period is not None:\n
period_code = period.getShortTitle() or period.getTitle() or \'\'\n
if not period_code:\n
period_code = str(transaction.getStopDate().year())\n
destination_id_group = (\'accounting\', \'section\', destination_section, period_code)\n
destination_reference = id_generator(id_generator=\'uid\',\n
id_group=destination_id_group,\n
default=previous_id_getter(destination_id_group,\n
default=0) + 1)\n
transaction.setDestinationReference(\'%s-%s\' % (period_code, destination_reference))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>state_change</string> </value> <value> <string>state_change</string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>setReferences</string> </value> <value> <string>setReferences</string> </value>
......
...@@ -96,18 +96,18 @@ transaction_line_list = transaction.getMovementList(\n ...@@ -96,18 +96,18 @@ transaction_line_list = transaction.getMovementList(\n
portal_type=transaction.getPortalAccountingMovementTypeList())\n portal_type=transaction.getPortalAccountingMovementTypeList())\n
\n \n
\n \n
def checkAccountingPeriodRecusivly(accounting_period, transaction_date):\n def checkAccountingPeriodRecursivly(accounting_period, transaction_date):\n
valid = accounting_period.getSimulationState() in (\'planned\', \'started\')\n valid = accounting_period.getSimulationState() in (\'planned\', \'started\')\n
if not valid:\n if not valid:\n
return False\n return False\n
for sub_accounting_period in accounting_period.contentValues():\n for sub_accounting_period in accounting_period.contentValues():\n
if sub_accounting_period.getSimulationState() in (\n if sub_accounting_period.getSimulationState() in (\n
\'deleted\', \'cancelled\'):\n \'deleted\', \'cancelled\', \'draft\'):\n
continue\n continue\n
if sub_accounting_period.getStartDate().earliestTime() <= \\\n if sub_accounting_period.getStartDate().earliestTime() <= \\\n
transaction_date <= \\\n transaction_date <= \\\n
sub_accounting_period.getStopDate().latestTime():\n sub_accounting_period.getStopDate().latestTime():\n
if not checkAccountingPeriodRecusivly(sub_accounting_period,\n if not checkAccountingPeriodRecursivly(sub_accounting_period,\n
transaction_date):\n transaction_date):\n
return False\n return False\n
return True\n return True\n
...@@ -136,7 +136,7 @@ if not skip_period_validation :\n ...@@ -136,7 +136,7 @@ if not skip_period_validation :\n
transaction_date = transaction.getStartDate().earliestTime()\n transaction_date = transaction.getStartDate().earliestTime()\n
valid_date = False\n valid_date = False\n
if accounting_period is not None:\n if accounting_period is not None:\n
valid_date = checkAccountingPeriodRecusivly(accounting_period,\n valid_date = checkAccountingPeriodRecursivly(accounting_period,\n
transaction_date)\n transaction_date)\n
\n \n
if not valid_date:\n if not valid_date:\n
...@@ -166,7 +166,7 @@ if not skip_period_validation :\n ...@@ -166,7 +166,7 @@ if not skip_period_validation :\n
transaction_date = transaction.getStopDate().earliestTime()\n transaction_date = transaction.getStopDate().earliestTime()\n
valid_date = False\n valid_date = False\n
if accounting_period is not None:\n if accounting_period is not None:\n
valid_date = checkAccountingPeriodRecusivly(accounting_period,\n valid_date = checkAccountingPeriodRecursivly(accounting_period,\n
transaction_date)\n transaction_date)\n
\n \n
if not valid_date:\n if not valid_date:\n
......
2013-09-09 Gabriel Monnerat
* Refactor ERP5Site_getAccountItemList and AccountingTransactionLine_getProjectItemList to not search for Movements becauses it generate slow queries
2013-04-17 arnaud.fontaine 2013-04-17 arnaud.fontaine
* erp5_simulation should not be required as some system do not use simulation. * erp5_simulation should not be required as some system do not use simulation.
......
1535 1550
\ No newline at end of file \ No newline at end of file
...@@ -86,11 +86,6 @@ Test display of Account Module, with at_date parameter\n ...@@ -86,11 +86,6 @@ Test display of Account Module, with at_date parameter\n
<!-- }}} -->\n <!-- }}} -->\n
\n \n
<!-- 10 accounts -> 10 records in the list {{{ -->\n <!-- 10 accounts -> 10 records in the list {{{ -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Show All\']</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
...@@ -260,8 +255,7 @@ Test display of Account Module, with at_date parameter\n ...@@ -260,8 +255,7 @@ Test display of Account Module, with at_date parameter\n
</tbody></table>\n </tbody></table>\n
</body>\n </body>\n
</html> <!-- vim: syntax=html foldmethod=marker\n </html> <!-- vim: syntax=html foldmethod=marker\n
-->\n -->
]]></unicode> </value> ]]></unicode> </value>
</item> </item>
......
...@@ -55,11 +55,6 @@ Test default display of Account Module\n ...@@ -55,11 +55,6 @@ Test default display of Account Module\n
<!-- }}} -->\n <!-- }}} -->\n
\n \n
<!-- 10 accounts -> 10 records in the list {{{ -->\n <!-- 10 accounts -> 10 records in the list {{{ -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Show All\']</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
...@@ -535,8 +530,7 @@ for line_idx, line in enumerate(list(csv.reader(f))[1:]):\n ...@@ -535,8 +530,7 @@ for line_idx, line in enumerate(list(csv.reader(f))[1:]):\n
</tbody></table>\n </tbody></table>\n
</body>\n </body>\n
</html> <!-- vim: syntax=html foldmethod=marker\n </html> <!-- vim: syntax=html foldmethod=marker\n
-->\n -->
]]></unicode> </value> ]]></unicode> </value>
</item> </item>
......
...@@ -56,11 +56,6 @@ Test default display of Account Module With Employees.\n ...@@ -56,11 +56,6 @@ Test default display of Account Module With Employees.\n
<!-- }}} -->\n <!-- }}} -->\n
\n \n
<!-- 10 accounts -> 10 records in the list {{{ -->\n <!-- 10 accounts -> 10 records in the list {{{ -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Show All\']</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
...@@ -518,8 +513,7 @@ Test default display of Account Module With Employees.\n ...@@ -518,8 +513,7 @@ Test default display of Account Module With Employees.\n
</tbody></table>\n </tbody></table>\n
</body>\n </body>\n
</html> <!-- vim: syntax=html foldmethod=marker\n </html> <!-- vim: syntax=html foldmethod=marker\n
-->\n -->
]]></unicode> </value> ]]></unicode> </value>
</item> </item>
......
...@@ -47,20 +47,13 @@ Test filter in Account Module\n ...@@ -47,20 +47,13 @@ Test filter in Account Module\n
</thead><tbody tal:define="init_method string:AccountingZuite_createAccountingTransactionList">\n </thead><tbody tal:define="init_method string:AccountingZuite_createAccountingTransactionList">\n
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>\n <tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>\n
\n \n
<!-- Setup {{{ -->\n
<tr>\n <tr>\n
<td>selectAndWait</td>\n <td>selectAndWait</td>\n
<td>select_module</td>\n <td>select_module</td>\n
<td>Accounts</td>\n <td>Accounts</td>\n
</tr>\n </tr>\n
<!-- }}} -->\n
\n \n
<!-- 10 accounts -> 10 records in the list {{{ -->\n <!-- 10 accounts -> 10 records in the list {{{ -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>Folder_show:method</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
...@@ -177,6 +170,11 @@ Test filter in Account Module\n ...@@ -177,6 +170,11 @@ Test filter in Account Module\n
<td>Folder_show:method</td>\n <td>Folder_show:method</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@value=\'listbox.preferred_gap_id:asc\']</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
...@@ -339,6 +337,11 @@ Test filter in Account Module\n ...@@ -339,6 +337,11 @@ Test filter in Account Module\n
<td>Folder_show:method</td>\n <td>Folder_show:method</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@value=\'listbox.preferred_gap_id:asc\']</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
...@@ -349,8 +352,7 @@ Test filter in Account Module\n ...@@ -349,8 +352,7 @@ Test filter in Account Module\n
</tbody></table>\n </tbody></table>\n
</body>\n </body>\n
</html> <!-- vim: syntax=html foldmethod=marker\n </html> <!-- vim: syntax=html foldmethod=marker\n
-->\n -->
]]></unicode> </value> ]]></unicode> </value>
</item> </item>
......
...@@ -86,11 +86,6 @@ Test display of Account Module, with from_date parameter (which has no impact)\n ...@@ -86,11 +86,6 @@ Test display of Account Module, with from_date parameter (which has no impact)\n
<!-- }}} -->\n <!-- }}} -->\n
\n \n
<!-- 10 accounts -> 10 records in the list {{{ -->\n <!-- 10 accounts -> 10 records in the list {{{ -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Show All\']</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
...@@ -548,8 +543,7 @@ Test display of Account Module, with from_date parameter (which has no impact)\n ...@@ -548,8 +543,7 @@ Test display of Account Module, with from_date parameter (which has no impact)\n
</tbody></table>\n </tbody></table>\n
</body>\n </body>\n
</html> <!-- vim: syntax=html foldmethod=marker\n </html> <!-- vim: syntax=html foldmethod=marker\n
-->\n -->
]]></unicode> </value> ]]></unicode> </value>
</item> </item>
......
...@@ -118,18 +118,9 @@ Test `preferred_gap_id` column of Account Module\n ...@@ -118,18 +118,9 @@ Test `preferred_gap_id` column of Account Module\n
</tr>\n </tr>\n
\n \n
\n \n
\n
<!-- make sure we are sorted by preferred_gap_id ASC -->\n
<tr>\n
<td>storeLocation</td>\n
<td>current_account_url</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<!-- reset any sort on preferred_gap_id. previously here was sorting by title, \n <td>clickAndWait</td>\n
but now we can sort by multiple columns, so sort by title does not reset sorting. -->\n <td>Folder_show:method</td>\n
<td>openAndWait</td>\n
<td>${current_account_url}&reset=int:1</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
......
...@@ -69,6 +69,17 @@ Test `preferred_gap_id` column of Account Module\n ...@@ -69,6 +69,17 @@ Test `preferred_gap_id` column of Account Module\n
<!-- }}} -->\n <!-- }}} -->\n
\n \n
<!-- Filter on preferred_gap_id {{{ -->\n <!-- Filter on preferred_gap_id {{{ -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>Folder_show:method</td>\n
<td></td>\n
</tr>\n
<tr>\n
<!-- sort by preferred_gap_id -->\n
<td>clickAndWait</td>\n
<td>//button[@value=\'listbox.preferred_gap_id:asc\']</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>type</td>\n <td>type</td>\n
<td>//tr[@class=\'listbox-search-line\']/th[2]/input</td>\n <td>//tr[@class=\'listbox-search-line\']/th[2]/input</td>\n
...@@ -84,26 +95,6 @@ Test `preferred_gap_id` column of Account Module\n ...@@ -84,26 +95,6 @@ Test `preferred_gap_id` column of Account Module\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>4 records</td>\n <td>4 records</td>\n
</tr>\n </tr>\n
\n
<!-- make sure we are sorted by preferred_gap_id ASC -->\n
<tr>\n
<td>storeLocation</td>\n
<td>current_account_url</td>\n
<td></td>\n
</tr>\n
<tr>\n
<!-- reset any sort on preferred_gap_id. previously here was sorting by title, \n
but now we can sort by multiple columns, so sort by title does not reset sorting. -->\n
<td>openAndWait</td>\n
<td>${current_account_url}&reset=int:1</td>\n
<td></td>\n
</tr>\n
<tr>\n
<!-- sort by preferred_gap_id -->\n
<td>clickAndWait</td>\n
<td>//button[@value=\'listbox.preferred_gap_id:asc\']</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-0 DataA\']/td[2]/a</td>\n <td>//tr[@class=\'listbox-data-line-0 DataA\']/td[2]/a</td>\n
......
...@@ -71,11 +71,6 @@ Test Accounting module listbox supports deleting\n ...@@ -71,11 +71,6 @@ Test Accounting module listbox supports deleting\n
<!-- }}} -->\n <!-- }}} -->\n
\n \n
<!-- 4 records in the list {{{ -->\n <!-- 4 records in the list {{{ -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>Folder_show:method</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
......
...@@ -56,11 +56,6 @@ Test Accounting module listbox supports filtering\n ...@@ -56,11 +56,6 @@ Test Accounting module listbox supports filtering\n
<!-- }}} -->\n <!-- }}} -->\n
\n \n
<!-- 4 records in the list {{{ -->\n <!-- 4 records in the list {{{ -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>Folder_show:method</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
......
...@@ -56,11 +56,6 @@ Test Accounting module listbox multi pages\n ...@@ -56,11 +56,6 @@ Test Accounting module listbox multi pages\n
<!-- }}} -->\n <!-- }}} -->\n
\n \n
<!-- 4*12 records in the list {{{ -->\n <!-- 4*12 records in the list {{{ -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>Folder_show:method</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
...@@ -186,6 +181,11 @@ Test Accounting module listbox multi pages\n ...@@ -186,6 +181,11 @@ Test Accounting module listbox multi pages\n
<td>Folder_show:method</td>\n <td>Folder_show:method</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[ @value=\'listbox.operation_date:asc\']</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n <td>//span[@class="listbox-current-page-total-number"]</td>\n
......
...@@ -57,11 +57,6 @@ Accounting Transaction Module Search Columns\n ...@@ -57,11 +57,6 @@ Accounting Transaction Module Search Columns\n
<!-- }}} -->\n <!-- }}} -->\n
\n \n
<!-- filter on title {{{ -->\n <!-- filter on title {{{ -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>Folder_show:method</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>type</td>\n <td>type</td>\n
<td>//tr[@class=\'listbox-search-line\']/th[2]/input</td>\n <td>//tr[@class=\'listbox-search-line\']/th[2]/input</td>\n
...@@ -124,6 +119,11 @@ as title is a search key -->\n ...@@ -124,6 +119,11 @@ as title is a search key -->\n
<td>Folder_show:method</td>\n <td>Folder_show:method</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@value=\'listbox.operation_date:asc\']</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>type</td>\n <td>type</td>\n
<td>//tr[@class=\'listbox-search-line\']/th[2]/input</td>\n <td>//tr[@class=\'listbox-search-line\']/th[2]/input</td>\n
...@@ -192,6 +192,11 @@ as title is a search key -->\n ...@@ -192,6 +192,11 @@ as title is a search key -->\n
<td>Folder_show:method</td>\n <td>Folder_show:method</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@value=\'listbox.operation_date:asc\']</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>type</td>\n <td>type</td>\n
<td>//tr[@class=\'listbox-search-line\']/th[3]/input</td>\n <td>//tr[@class=\'listbox-search-line\']/th[3]/input</td>\n
...@@ -499,8 +504,7 @@ XXX shall we really test i18n issues here?\n ...@@ -499,8 +504,7 @@ XXX shall we really test i18n issues here?\n
</tbody></table>\n </tbody></table>\n
</body>\n </body>\n
</html> <!-- vim: syntax=html foldmethod=marker\n </html> <!-- vim: syntax=html foldmethod=marker\n
-->\n -->
]]></unicode> </value> ]]></unicode> </value>
</item> </item>
......
...@@ -54,10 +54,6 @@ Test sort for Accounting module main listbox\n ...@@ -54,10 +54,6 @@ Test sort for Accounting module main listbox\n
<td>Accounting</td>\n <td>Accounting</td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
<td>clickAndWait</td>\n
<td>Folder_show:method</td>\n
<td></td>\n
</tr>\n
<!-- }}} -->\n <!-- }}} -->\n
\n \n
<!-- check content of known lines {{{ -->\n <!-- check content of known lines {{{ -->\n
......
...@@ -53,11 +53,6 @@ Test sort for Accounting module main listbox, without section\n ...@@ -53,11 +53,6 @@ Test sort for Accounting module main listbox, without section\n
<td>select_module</td>\n <td>select_module</td>\n
<td>Accounting</td>\n <td>Accounting</td>\n
</tr>\n </tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>Folder_show:method</td>\n
<td></td>\n
</tr>\n
<!-- we unselect section -->\n <!-- we unselect section -->\n
<tr>\n <tr>\n
<td>clickAndWait</td>\n <td>clickAndWait</td>\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[
<html>\n
<head><title>Sorting in Grouping Dialog</title></head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="4">\n
Sorting in Grouping Dialog\n
</td></tr>\n
</thead><tbody tal:define="init_method string:AccountingZuite_createAccountingTransactionList?add_draft_transactions:int=0&add_related_payments:int=1">\n
\n
<!-- Setup {{{ -->\n
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_module</td>\n
<td>Accounts</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>Folder_show:method</td>\n
<td></td>\n
</tr>\n
<!-- }}} -->\n
\n
<!-- {{{ Select Receivable account and use grouping fast input -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Receivable</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//img[@alt=\'Grouping Reference Fast Input\']</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>4 records</td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<!-- debit -->\n
<td>//tr[@class=\'listbox-search-line\']/th[3]/input</td> \n
<td>2200</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@class="listbox-select-action"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>1 records</td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<!-- reset debit -->\n
<td>//tr[@class=\'listbox-search-line\']/th[3]/input</td> \n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<!-- credit -->\n
<td>//tr[@class=\'listbox-search-line\']/th[4]/input</td> \n
<td>2200</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@class="listbox-select-action"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>1 records</td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<!-- reset credit -->\n
<td>//tr[@class=\'listbox-search-line\']/th[4]/input</td> \n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<!-- explanation reference. As this is generated, we just use % -->\n
<td>//tr[@class=\'listbox-search-line\']/th[5]/input</td> \n
<td>%</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@class="listbox-select-action"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>2 records</td> <!-- in our test data set, only invoices have reference, not payments -->\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<!-- reset explanation reference -->\n
<td>//tr[@class=\'listbox-search-line\']/th[5]/input</td> \n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<!-- date -->\n
<td>//tr[@class=\'listbox-search-line\']/th[6]/input</td> \n
<td>2005/01/02</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@class="listbox-select-action"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>2 records</td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<!-- reset date -->\n
<td>//tr[@class=\'listbox-search-line\']/th[6]/input</td> \n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<!-- title -->\n
<td>//tr[@class=\'listbox-search-line\']/th[7]/input</td> \n
<td>Client 1 Payment</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@class="listbox-select-action"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>1 records</td>\n
</tr>\n
\n
\n
</tbody></table>\n
</body>\n
</html> <!-- vim: syntax=html foldmethod=marker\n
-->
]]></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>test_group_dialog_searching.html</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>
...@@ -134,86 +134,7 @@ Sorting in Grouping Dialog\n ...@@ -134,86 +134,7 @@ Sorting in Grouping Dialog\n
</tr>\n </tr>\n
<!-- }}} -->\n <!-- }}} -->\n
\n \n
<!-- Sort by title asc {{{ -->\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//tr[@class=\'listbox-label-line\']/th[6]/button[@value="listbox.date:none"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<!-- reset date sorting -->\n
<td>clickAndWait</td>\n
<td>//tr[@class=\'listbox-label-line\']/th[6]/button[@value="listbox.date:none"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//tr[@class=\'listbox-label-line\']/th[7]/button[@value="listbox.parent_title:asc"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-0 DataA\']/td[7]/a</td>\n
<td>Client 1 Payment</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-1 DataB\']/td[7]/a</td>\n
<td>Client 1 Sale Invoice</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-2 DataA\']/td[7]/a</td>\n
<td>Client 2 Payment</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-3 DataB\']/td[7]/a</td>\n
<td>Client 2 Sale Invoice</td>\n
</tr>\n
<!-- }}} -->\n
\n
<!-- Sort by title desc {{{ -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//tr[@class=\'listbox-label-line\']/th[7]/button[@value="listbox.parent_title:desc"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-3 DataB\']/td[7]/a</td>\n
<td>Client 1 Payment</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-2 DataA\']/td[7]/a</td>\n
<td>Client 1 Sale Invoice</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-1 DataB\']/td[7]/a</td>\n
<td>Client 2 Payment</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-0 DataA\']/td[7]/a</td>\n
<td>Client 2 Sale Invoice</td>\n
</tr>\n
<!-- }}} -->\n
\n
<!-- Sort by grouping reference asc {{{ -->\n <!-- Sort by grouping reference asc {{{ -->\n
<tr>\n
<!-- reset title sorting -->\n
<td>assertElementPresent</td>\n
<td>//tr[@class=\'listbox-label-line\']/th[7]/button[@value="listbox.parent_title:none"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<!-- reset title sorting -->\n
<td>clickAndWait</td>\n
<td>//tr[@class=\'listbox-label-line\']/th[7]/button[@value="listbox.parent_title:none"]</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<!-- XXX-Tatuya: For what purpose of this sort? -->\n <!-- XXX-Tatuya: For what purpose of this sort? -->\n
<td>clickAndWait</td>\n <td>clickAndWait</td>\n
......
198 202
\ No newline at end of file \ No newline at end of file
<?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>ts77155552.86</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-keybinding_menu.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[
/* ***** BEGIN LICENSE BLOCK *****\n
* Distributed under the BSD license:\n
*\n
* Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl\n
* All rights reserved.\n
*\n
* Contributed to Ajax.org under the BSD license.\n
*\n
* Redistribution and use in source and binary forms, with or without\n
* modification, are permitted provided that the following conditions are met:\n
* * Redistributions of source code must retain the above copyright\n
* notice, this list of conditions and the following disclaimer.\n
* * Redistributions in binary form must reproduce the above copyright\n
* notice, this list of conditions and the following disclaimer in the\n
* documentation and/or other materials provided with the distribution.\n
* * Neither the name of Ajax.org B.V. nor the\n
* names of its contributors may be used to endorse or promote products\n
* derived from this software without specific prior written permission.\n
*\n
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\n
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n
*\n
* ***** END LICENSE BLOCK ***** */\n
\n
define(\'ace/ext/keybinding_menu\', [\'require\', \'exports\', \'module\' , \'ace/editor\', \'ace/ext/menu_tools/overlay_page\', \'ace/ext/menu_tools/get_editor_keyboard_shortcuts\'], function(require, exports, module) {\n
\n
var Editor = require("ace/editor").Editor;\n
function showKeyboardShortcuts (editor) {\n
if(!document.getElementById(\'kbshortcutmenu\')) {\n
var overlayPage = require(\'./menu_tools/overlay_page\').overlayPage;\n
var getEditorKeybordShortcuts = require(\'./menu_tools/get_editor_keyboard_shortcuts\').getEditorKeybordShortcuts;\n
var kb = getEditorKeybordShortcuts(editor);\n
var el = document.createElement(\'div\');\n
var commands = kb.reduce(function(previous, current) {\n
return previous + \'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">\' \n
+ current.command + \'</span> : \'\n
+ \'<span class="ace_optionsMenuKey">\' + current.key + \'</span></div>\';\n
}, \'\');\n
\n
el.id = \'kbshortcutmenu\';\n
el.innerHTML = \'<h1>Keyboard Shortcuts</h1>\' + commands + \'</div>\';\n
overlayPage(editor, el, \'0\', \'0\', \'0\', null);\n
}\n
};\n
module.exports.init = function(editor) {\n
Editor.prototype.showKeyboardShortcuts = function() {\n
showKeyboardShortcuts(this);\n
};\n
editor.commands.addCommands([{\n
name: "showKeyboardShortcuts",\n
bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},\n
exec: function(editor, line) {\n
editor.showKeyboardShortcuts();\n
}\n
}]);\n
};\n
\n
});\n
\n
define(\'ace/ext/menu_tools/overlay_page\', [\'require\', \'exports\', \'module\' , \'ace/lib/dom\'], function(require, exports, module) {\n
\n
var dom = require("../../lib/dom");\n
var cssText = "#ace_settingsmenu, #kbshortcutmenu {\\\n
background-color: #F7F7F7;\\\n
color: black;\\\n
box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\\\n
padding: 1em 0.5em 2em 1em;\\\n
overflow: auto;\\\n
position: absolute;\\\n
margin: 0;\\\n
bottom: 0;\\\n
right: 0;\\\n
top: 0;\\\n
z-index: 9991;\\\n
cursor: default;\\\n
}\\\n
.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\\\n
box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\\\n
background-color: rgba(255, 255, 255, 0.6);\\\n
color: black;\\\n
}\\\n
.ace_optionsMenuEntry:hover {\\\n
background-color: rgba(100, 100, 100, 0.1);\\\n
-webkit-transition: all 0.5s;\\\n
transition: all 0.3s\\\n
}\\\n
.ace_closeButton {\\\n
background: rgba(245, 146, 146, 0.5);\\\n
border: 1px solid #F48A8A;\\\n
border-radius: 50%;\\\n
padding: 7px;\\\n
position: absolute;\\\n
right: -8px;\\\n
top: -8px;\\\n
z-index: 1000;\\\n
}\\\n
.ace_closeButton{\\\n
background: rgba(245, 146, 146, 0.9);\\\n
}\\\n
.ace_optionsMenuKey {\\\n
color: darkslateblue;\\\n
font-weight: bold;\\\n
}\\\n
.ace_optionsMenuCommand {\\\n
color: darkcyan;\\\n
font-weight: normal;\\\n
}";\n
dom.importCssString(cssText);\n
module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) {\n
top = top ? \'top: \' + top + \';\' : \'\';\n
bottom = bottom ? \'bottom: \' + bottom + \';\' : \'\';\n
right = right ? \'right: \' + right + \';\' : \'\';\n
left = left ? \'left: \' + left + \';\' : \'\';\n
\n
var closer = document.createElement(\'div\');\n
var contentContainer = document.createElement(\'div\');\n
\n
function documentEscListener(e) {\n
if (e.keyCode === 27) {\n
closer.click();\n
}\n
}\n
\n
closer.style.cssText = \'margin: 0; padding: 0; \' +\n
\'position: fixed; top:0; bottom:0; left:0; right:0;\' +\n
\'z-index: 9990; \' +\n
\'background-color: rgba(0, 0, 0, 0.3);\';\n
closer.addEventListener(\'click\', function() {\n
document.removeEventListener(\'keydown\', documentEscListener);\n
closer.parentNode.removeChild(closer);\n
editor.focus();\n
closer = null;\n
});\n
document.addEventListener(\'keydown\', documentEscListener);\n
\n
contentContainer.style.cssText = top + right + bottom + left;\n
contentContainer.addEventListener(\'click\', function(e) {\n
e.stopPropagation();\n
});\n
\n
var wrapper = dom.createElement("div");\n
wrapper.style.position = "relative";\n
\n
var closeButton = dom.createElement("div");\n
closeButton.className = "ace_closeButton";\n
closeButton.addEventListener(\'click\', function() {\n
closer.click();\n
});\n
\n
wrapper.appendChild(closeButton);\n
contentContainer.appendChild(wrapper);\n
\n
contentContainer.appendChild(contentElement);\n
closer.appendChild(contentContainer);\n
document.body.appendChild(closer);\n
editor.blur();\n
};\n
\n
});\n
\n
define(\'ace/ext/menu_tools/get_editor_keyboard_shortcuts\', [\'require\', \'exports\', \'module\' , \'ace/lib/keys\'], function(require, exports, module) {\n
\n
var keys = require("../../lib/keys");\n
module.exports.getEditorKeybordShortcuts = function(editor) {\n
var KEY_MODS = keys.KEY_MODS;\n
var keybindings = [];\n
var commandMap = {};\n
editor.keyBinding.$handlers.forEach(function(handler) {\n
var ckb = handler.commmandKeyBinding;\n
for (var i in ckb) {\n
var modifier = parseInt(i);\n
if (modifier == -1) {\n
modifier = "";\n
} else if(isNaN(modifier)) {\n
modifier = i;\n
} else {\n
modifier = "" +\n
(modifier & KEY_MODS.command ? "Cmd-" : "") +\n
(modifier & KEY_MODS.ctrl ? "Ctrl-" : "") +\n
(modifier & KEY_MODS.alt ? "Alt-" : "") +\n
(modifier & KEY_MODS.shift ? "Shift-" : "");\n
}\n
for (var key in ckb[i]) {\n
var command = ckb[i][key]\n
if (typeof command != "string")\n
command = command.name\n
if (commandMap[command]) {\n
commandMap[command].key += "|" + modifier + key;\n
} else {\n
commandMap[command] = {key: modifier+key, command: command};\n
keybindings.push(commandMap[command]);\n
}\n
}\n
}\n
});\n
return keybindings;\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>7803</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>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.0</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-modelist.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[
define(\'ace/ext/modelist\', [\'require\', \'exports\', \'module\' ], function(require, exports, module) {\n
\n
\n
var modes = [];\n
function getModeForPath(path) {\n
var mode = modesByName.text;\n
var fileName = path.split(/[\\/\\\\]/).pop();\n
for (var i = 0; i < modes.length; i++) {\n
if (modes[i].supportsFile(fileName)) {\n
mode = modes[i];\n
break;\n
}\n
}\n
return mode;\n
}\n
\n
var Mode = function(name, caption, extensions) {\n
this.name = name;\n
this.caption = caption;\n
this.mode = "ace/mode/" + name;\n
this.extensions = extensions;\n
if (/\\^/.test(extensions)) {\n
var re = extensions.replace(/\\|(\\^)?/g, function(a, b){\n
return "$|" + (b ? "^" : "^.*\\\\.");\n
}) + "$";\n
} else {\n
var re = "^.*\\\\.(" + extensions + ")$";\n
}\n
\n
this.extRe = new RegExp(re, "gi");\n
};\n
\n
Mode.prototype.supportsFile = function(filename) {\n
return filename.match(this.extRe);\n
};\n
var supportedModes = {\n
ABAP: ["abap"],\n
ADA: ["ada|adb"],\n
ActionScript:["as"],\n
AsciiDoc: ["asciidoc"],\n
Assembly_x86:["asm"],\n
AutoHotKey: ["ahk"],\n
BatchFile: ["bat|cmd"],\n
C9Search: ["c9search_results"],\n
C_Cpp: ["c|cc|cpp|cxx|h|hh|hpp"],\n
Clojure: ["clj"],\n
Cobol: ["^CBL|COB"],\n
coffee: ["^Cakefile|coffee|cf|cson"],\n
ColdFusion: ["cfm"],\n
CSharp: ["cs"],\n
CSS: ["css"],\n
Curly: ["curly"],\n
D: ["d|di"],\n
Dart: ["dart"],\n
Diff: ["diff|patch"],\n
Dot: ["dot"],\n
Erlang: ["erl|hrl"],\n
EJS: ["ejs"],\n
Forth: ["frt|fs|ldr"],\n
FreeMarker: ["ftl"],\n
Glsl: ["glsl|frag|vert"],\n
golang: ["go"],\n
Groovy: ["groovy"],\n
HAML: ["haml"],\n
Haskell: ["hs"],\n
haXe: ["hx"],\n
HTML: ["htm|html|xhtml"],\n
HTML_Ruby: ["erb|rhtml|html.erb"],\n
Ini: ["Ini|conf"],\n
Jade: ["jade"],\n
Java: ["java"],\n
JavaScript: ["js"],\n
JSON: ["json"],\n
JSONiq: ["jq"],\n
JSP: ["jsp"],\n
JSX: ["jsx"],\n
Julia: ["jl"],\n
LaTeX: ["latex|tex|ltx|bib"],\n
LESS: ["less"],\n
Liquid: ["liquid"],\n
Lisp: ["lisp"],\n
LiveScript: ["ls"],\n
LogiQL: ["logic|lql"],\n
LSL: ["lsl"],\n
Lua: ["lua"],\n
LuaPage: ["lp"],\n
Lucene: ["lucene"],\n
Makefile: ["^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],\n
MATLAB: ["matlab"],\n
Markdown: ["md|markdown"],\n
MySQL: ["mysql"],\n
MUSHCode: ["mc|mush"],\n
ObjectiveC: ["m|mm"],\n
OCaml: ["ml|mli"],\n
Pascal: ["pas|p"],\n
Perl: ["pl|pm"],\n
pgSQL: ["pgsql"],\n
PHP: ["php|phtml"],\n
Powershell: ["ps1"],\n
Prolog: ["plg|prolog"],\n
Properties: ["properties"],\n
Python: ["py"],\n
R: ["r"],\n
RDoc: ["Rd"],\n
RHTML: ["Rhtml"],\n
Ruby: ["ru|gemspec|rake|rb"],\n
Rust: ["rs"],\n
SASS: ["sass"],\n
SCAD: ["scad"],\n
Scala: ["scala"],\n
Scheme: ["scm|rkt"],\n
SCSS: ["scss"],\n
SH: ["sh|bash"],\n
snippets: ["snippets"],\n
SQL: ["sql"],\n
Stylus: ["styl|stylus"],\n
SVG: ["svg"],\n
Tcl: ["tcl"],\n
Tex: ["tex"],\n
Text: ["txt"],\n
Textile: ["textile"],\n
Toml: ["toml"],\n
Twig: ["twig"],\n
Typescript: ["typescript|ts|str"],\n
VBScript: ["vbs"],\n
Velocity: ["vm"],\n
XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],\n
XQuery: ["xq"],\n
YAML: ["yaml"]\n
};\n
\n
var nameOverrides = {\n
ObjectiveC: "Objective-C",\n
CSharp: "C#",\n
golang: "Go",\n
C_Cpp: "C/C++",\n
coffee: "CoffeeScript",\n
HTML_Ruby: "HTML (Ruby)"\n
};\n
var modesByName = {};\n
for (var name in supportedModes) {\n
var data = supportedModes[name];\n
var displayName = nameOverrides[name] || name;\n
var filename = name.toLowerCase();\n
var mode = new Mode(filename, displayName, data[0]);\n
modesByName[filename] = mode;\n
modes.push(mode);\n
}\n
\n
module.exports = {\n
getModeForPath: getModeForPath,\n
modes: modes,\n
modesByName: modesByName\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>4320</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>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.14</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-options.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[
define(\'ace/ext/options\', [\'require\', \'exports\', \'module\' ], function(require, exports, module) {\n
\n
\n
var modesByName = modelist.modesByName;\n
\n
var options = [\n
["Document", function(name) {\n
doclist.loadDoc(name, function(session) {\n
if (!session)\n
return;\n
session = env.split.setSession(session);\n
updateUIEditorOptions();\n
env.editor.focus();\n
});\n
}, doclist.all],\n
\t["Mode", function(value) {\n
env.editor.session.setMode(modesByName[value].mode || modesByName.text.mode);\n
env.editor.session.modeName = value;\n
\t}, function(value) {\n
\t\treturn env.editor.session.modeName || "text"\n
\t}, modelist.modes],\n
\t["Split", function(value) {\n
\t\tvar sp = env.split;\n
\t\tif (value == "none") {\n
\t\t\tif (sp.getSplits() == 2) {\n
\t\t\t\tenv.secondSession = sp.getEditor(1).session;\n
}\n
sp.setSplits(1);\n
} else {\n
var newEditor = (sp.getSplits() == 1);\n
if (value == "below") {\n
sp.setOrientation(sp.BELOW);\n
} else {\n
sp.setOrientation(sp.BESIDE);\n
}\n
sp.setSplits(2);\n
\n
if (newEditor) {\n
\t\t\t\tvar session = env.secondSession || sp.getEditor(0).session;\n
var newSession = sp.setSession(session, 1);\n
newSession.name = session.name;\n
}\n
}\n
\t}, ["None", "Beside", "Below"]],\n
\t["Theme", function(value) {\n
\t\tif (!value)\n
\t\t\treturn;\n
\t\tenv.editor.setTheme("ace/theme/" + value);\n
\t\tthemeEl.selectedValue = value;\n
\t}, function() {\n
\t\treturn env.editor.getTheme();\n
\t}, {\n
\t\t"Bright": {\n
chrome: "Chrome",\n
clouds: "Clouds",\n
crimson_editor: "Crimson Editor",\n
dawn: "Dawn",\n
dreamweaver: "Dreamweaver",\n
eclipse: "Eclipse",\n
github: "GitHub",\n
solarized_light: "Solarized Light",\n
textmate: "TextMate",\n
tomorrow: "Tomorrow",\n
xcode: "XCode"\n
},\n
"Dark": {\n
ambiance: "Ambiance",\n
chaos: "Chaos",\n
clouds_midnight: "Clouds Midnight",\n
cobalt: "Cobalt",\n
idle_fingers: "idleFingers",\n
kr_theme: "krTheme",\n
merbivore: "Merbivore",\n
merbivore_soft: "Merbivore Soft",\n
mono_industrial: "Mono Industrial",\n
monokai: "Monokai",\n
pastel_on_dark: "Pastel on dark",\n
solarized_dark: "Solarized Dark",\n
twilight: "Twilight",\n
tomorrow_night: "Tomorrow Night",\n
tomorrow_night_blue: "Tomorrow Night Blue",\n
tomorrow_night_bright: "Tomorrow Night Bright",\n
tomorrow_night_eighties: "Tomorrow Night 80s",\n
vibrant_ink: "Vibrant Ink",\n
}\n
\t}],\n
\t["Code Folding", function(value) {\n
\t\tenv.editor.getSession().setFoldStyle(value);\n
\t\tenv.editor.setShowFoldWidgets(value !== "manual");\n
\t}, ["manual", "mark begin", "mark begin and end"]],\n
\t["Soft Wrap", function(value) {\n
\t\tvalue = value.toLowerCase()\n
\t\tvar session = env.editor.getSession();\n
\t\tvar renderer = env.editor.renderer;\n
\t\tsession.setUseWrapMode(value == "off");\n
\t\tvar col = parseInt(value) || null;\n
\t\trenderer.setPrintMarginColumn(col || 80);\n
\t\tsession.setWrapLimitRange(col, col);\n
\t}, ["Off", "40 Chars", "80 Chars", "Free"]],\n
\t["Key Binding", function(value) {\n
\t\tenv.editor.setKeyboardHandler(keybindings[value]);\n
\t}, ["Ace", "Vim", "Emacs", "Custom"]],\n
\t["Font Size", function(value) {\n
\t\tenv.split.setFontSize(value + "px");\n
\t}, [10, 11, 12, 14, 16, 20, 24]],\n
["Full Line Selection", function(checked) {\n
\t\tenv.editor.setSelectionStyle(checked ? "line" : "text");\n
\t}],\n
\t["Highlight Active Line", function(checked) {\n
\t\tenv.editor.setHighlightActiveLine(checked);\n
\t}],\n
\t["Show Invisibles", function(checked) {\n
\t\tenv.editor.setShowInvisibles(checked);\n
\t}],\n
\t["Show Gutter", function(checked) {\n
\t\tenv.editor.renderer.setShowGutter(checked);\n
\t}],\n
["Show Indent Guides", function(checked) {\n
\t\tenv.editor.renderer.setDisplayIndentGuides(checked);\n
\t}],\n
\t["Show Print Margin", function(checked) {\n
\t\tenv.editor.renderer.setShowPrintMargin(checked);\n
\t}],\n
\t["Persistent HScroll", function(checked) {\n
\t\tenv.editor.renderer.setHScrollBarAlwaysVisible(checked);\n
\t}],\n
\t["Animate Scrolling", function(checked) {\n
\t\tenv.editor.setAnimatedScroll(checked);\n
\t}],\n
\t["Use Soft Tab", function(checked) {\n
\t\tenv.editor.getSession().setUseSoftTabs(checked);\n
\t}],\n
\t["Highlight Selected Word", function(checked) {\n
\t\tenv.editor.setHighlightSelectedWord(checked);\n
\t}],\n
\t["Enable Behaviours", function(checked) {\n
\t\tenv.editor.setBehavioursEnabled(checked);\n
\t}],\n
\t["Fade Fold Widgets", function(checked) {\n
\t\tenv.editor.setFadeFoldWidgets(checked);\n
\t}],\n
\t["Show Token info", function(checked) {\n
\t\tenv.editor.setFadeFoldWidgets(checked);\n
\t}]\n
]\n
\n
var createOptionsPanel = function(options) {\n
\tvar html = []\n
\tvar container = document.createElement("div");\n
\tcontainer.style.cssText = "position: absolute; overflow: hidden";\n
\tvar inner = document.createElement("div");\n
\tinner.style.cssText = "width: 120%;height:100%;overflow: scroll";\n
\tcontainer.appendChild(inner);\n
\thtml.push("<table><tbody>");\n
\t\n
\toptions.forEach(function(o) {\n
\t\t\n
});\n
\n
\thtml.push(\n
\t\t\'<tr>\',\n
\t\t \'<td>\',\n
\t\t\t\'<label for="\', s,\'"></label>\',\n
\t\t \'</td><td>\',\n
\t\t\t\'<input type="\', s,\'" name="\', s,\'" id="\',s ,\'">\',\n
\t\t \'</td>\',\n
\t\t\'</tr>\'\n
\t)\n
\thtml.push("</tbody></table>");\t\n
\treturn container;\n
}\n
\n
function bindCheckbox(id, callback) {\n
var el = document.getElementById(id);\n
if (localStorage && localStorage.getItem(id))\n
el.checked = localStorage.getItem(id) == "1";\n
\n
var onCheck = function() {\n
callback(!!el.checked);\n
saveOption(el);\n
};\n
el.onclick = onCheck;\n
onCheck();\n
}\n
\n
function bindDropdown(id, callback) {\n
var el = document.getElementById(id);\n
if (localStorage && localStorage.getItem(id))\n
el.value = localStorage.getItem(id);\n
\n
var onChange = function() {\n
callback(el.value);\n
saveOption(el);\n
};\n
\n
el.onchange = onChange;\n
onChange();\n
}\n
\n
function fillOptgroup(list, el) {\n
list.forEach(function(item) {\n
var option = document.createElement("option");\n
option.setAttribute("value", item.name);\n
option.innerHTML = item.desc;\n
el.appendChild(option);\n
});\n
}\n
\n
function fillDropdown(list, el) {\n
\tif (Array.isArray(list)) {\n
\t\tfillOptgroup(list, el);\n
\t\treturn;\n
\t}\n
\tfor(var i in list) {\n
\t\tvar group = document.createElement("optgroup");\n
\t\tgroup.setAttribute("label", i);\n
\t\tfillOptgroup(list[i], group);\n
\t\tel.appendChild(group);\n
\t}\n
}\n
\n
function createOptionControl(opt) {\n
if (opt.values) {\n
var el = dom.createElement("select");\n
el.setAttribute("size", opt.visibleSize || 1);\n
fillDropdown(opt.values, el) \n
} else {\n
var el = dom.createElement("checkbox");\n
}\n
el.setAttribute("name", "opt_" + opt.name)\n
return el;\n
}\n
\n
function createOptionCell(opt) {\n
if (opt.values) {\n
var el = dom.createElement("select");\n
el.setAttribute("size", opt.visibleSize || 1);\n
fillDropdown(opt.values, el) \n
} else {\n
var el = dom.createElement("checkbox");\n
}\n
el.setAttribute("name", "opt_" + opt.name)\n
return el;\n
}\n
\n
\n
createOptionsPanel(options)\n
\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>7247</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>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.56</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-spellcheck.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>define(\'ace/ext/spellcheck\', [\'require\', \'exports\', \'module\' , \'ace/lib/event\', \'ace/editor\', \'ace/config\'], function(require, exports, module) {\n
\n
var event = require("../lib/event");\n
\n
exports.contextMenuHandler = function(e){\n
var host = e.target;\n
var text = host.textInput.getElement();\n
if (!host.selection.isEmpty())\n
return;\n
var c = host.getCursorPosition();\n
var r = host.session.getWordRange(c.row, c.column);\n
var w = host.session.getTextRange(r);\n
\n
host.session.tokenRe.lastIndex = 0;\n
if (!host.session.tokenRe.test(w))\n
return;\n
var PLACEHOLDER = "\\x01\\x01";\n
var value = w + " " + PLACEHOLDER;\n
text.value = value;\n
text.setSelectionRange(w.length + 1, w.length + 1);\n
text.setSelectionRange(0, 0);\n
\n
var afterKeydown = false;\n
event.addListener(text, "keydown", function onKeydown() {\n
event.removeListener(text, "keydown", onKeydown);\n
afterKeydown = true;\n
});\n
\n
host.textInput.setInputHandler(function(newVal) {\n
console.log(newVal , value, text.selectionStart, text.selectionEnd)\n
if (newVal == value)\n
return \'\';\n
if (newVal.lastIndexOf(value, 0) === 0)\n
return newVal.slice(value.length);\n
if (newVal.substr(text.selectionEnd) == value)\n
return newVal.slice(0, -value.length);\n
if (newVal.slice(-2) == PLACEHOLDER) {\n
var val = newVal.slice(0, -2);\n
if (val.slice(-1) == " ") {\n
if (afterKeydown)\n
return val.substring(0, text.selectionEnd);\n
val = val.slice(0, -1);\n
host.session.replace(r, val);\n
return "";\n
}\n
}\n
\n
return newVal;\n
});\n
};\n
var Editor = require("../editor").Editor;\n
require("../config").defineOptions(Editor.prototype, "editor", {\n
spellcheck: {\n
set: function(val) {\n
var text = this.textInput.getElement();\n
text.spellcheck = !!val;\n
if (!val)\n
this.removeListener("nativecontextmenu", exports.contextMenuHandler);\n
else\n
this.on("nativecontextmenu", exports.contextMenuHandler);\n
},\n
value: true\n
}\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>2227</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>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.77</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ext-statusbar.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[
define(\'ace/ext/statusbar\', [\'require\', \'exports\', \'module\' , \'ace/lib/dom\', \'ace/lib/lang\'], function(require, exports, module) {\n
var dom = require("ace/lib/dom");\n
var lang = require("ace/lib/lang");\n
\n
var StatusBar = function(editor, parentNode) {\n
this.element = dom.createElement("div");\n
this.element.className = "ace_status-indicator";\n
this.element.style.cssText = "display: inline-block;";\n
parentNode.appendChild(this.element);\n
\n
var statusUpdate = lang.delayedCall(function(){\n
this.updateStatus(editor)\n
}.bind(this));\n
editor.on("changeStatus", function() {\n
statusUpdate.schedule(100);\n
});\n
editor.on("changeSelection", function() {\n
statusUpdate.schedule(100);\n
});\n
};\n
\n
(function(){\n
this.updateStatus = function(editor) {\n
var status = [];\n
function add(str, separator) {\n
str && status.push(str, separator || "|");\n
}\n
\n
if (editor.$vimModeHandler)\n
add(editor.$vimModeHandler.getStatusText());\n
else if (editor.commands.recording)\n
add("REC");\n
\n
var c = editor.selection.lead;\n
add(c.row + ":" + c.column, " ");\n
if (!editor.selection.isEmpty()) {\n
var r = editor.getSelectionRange();\n
add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")");\n
}\n
status.pop();\n
this.element.textContent = status.join("");\n
};\n
}).call(StatusBar.prototype);\n
\n
exports.StatusBar = StatusBar;\n
\n
});
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1508</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ext-statusbar.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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