Commit 0d725b4a authored by Mayoro Diagne's avatar Mayoro Diagne

2010-07-07 mayoro

* display name of requester in attachment list

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36961 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e3fbb821
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</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>"""\n
return first_name plus last name of the owner of document if the document belong\n
to a registry person in person_module otherwise it\'a an anonymous requester\n
"""\n
\n
if \'id\' in context.owner_info().keys():\n
owner = context.owner_info()[\'id\']\n
\n
owner_object = context.portal_catalog.getResultValue(portal_type=\'Person\', reference=owner)\n
\n
owner_name = \'Requester\'\n
\n
if owner_object is not None:\n
if owner_object.getFirstName() + owner_object.getLastName() != \'\':\n
owner_name = "%s %s" % (owner_object.getFirstName(), owner_object.getLastName())\n
else:\n
owner_name = context.getOwner()\n
return owner_name\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Agent</string>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
<string>Reviewer</string>
</tuple>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>_getitem_</string>
<string>owner</string>
<string>owner_object</string>
<string>owner_name</string>
<string>None</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>EGov_getApplicationRequester</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
<value> <value>
<list> <list>
<string>listbox_creation_date</string> <string>listbox_creation_date</string>
<string>listbox_application_requester</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
<string>Type</string> <string>Type</string>
</tuple> </tuple>
<tuple> <tuple>
<string>getOwner</string> <string>application_requester</string>
<string>Actor</string> <string>Actor</string>
</tuple> </tuple>
<tuple> <tuple>
...@@ -371,6 +371,12 @@ ...@@ -371,6 +371,12 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>domain_root_list</string> </key> <key> <string>domain_root_list</string> </key>
<value> <value>
...@@ -393,6 +399,10 @@ ...@@ -393,6 +399,10 @@
<string>creation_date</string> <string>creation_date</string>
<string>Creation Date</string> <string>Creation Date</string>
</tuple> </tuple>
<tuple>
<string>application_requester</string>
<string>Actor</string>
</tuple>
</list> </list>
</value> </value>
</item> </item>
...@@ -414,6 +424,10 @@ ...@@ -414,6 +424,10 @@
<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>hide_rows_on_no_search_criterion</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>lines</string> </key> <key> <string>lines</string> </key>
<value> <int>20</int> </value> <value> <int>20</int> </value>
...@@ -454,6 +468,10 @@ ...@@ -454,6 +468,10 @@
<key> <string>report_tree</string> </key> <key> <string>report_tree</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>row_css_method</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>search</string> </key> <key> <string>search</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
.attachment_list_ListContent li a,\n .attachment_list_ListContent li a,\n
.attachment_list_ListContent li .attachment_list_getSourceReference,\n .attachment_list_ListContent li .attachment_list_getSourceReference,\n
.attachment_list_ListContent li .attachment_list_content_type,\n .attachment_list_ListContent li .attachment_list_content_type,\n
.attachment_list_ListContent li .attachment_list_getOwner,\n .attachment_list_ListContent li .attachment_list_application_requester,\n
.attachment_list_ListContent li .attachment_list_creation_date{\n .attachment_list_ListContent li .attachment_list_creation_date{\n
padding:2px;\n padding:2px;\n
}\n }\n
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
color:#0B850B;\n color:#0B850B;\n
}\n }\n
\n \n
/*.attachment_list_ListContent li .attachment_list_getOwner,\n /*.attachment_list_ListContent li .attachment_list_application_requester,\n
.attachment_list_ListContent li .attachment_list_creation_date{\n .attachment_list_ListContent li .attachment_list_creation_date{\n
position:absolute;\n position:absolute;\n
margin-top:1.2em;\n margin-top:1.2em;\n
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
left:80px;\n left:80px;\n
}\n }\n
\n \n
.attachment_list_ListContent li .attachment_list_getOwner{\n .attachment_list_ListContent li .attachment_list_application_requester{\n
left:30px;\n left:30px;\n
}\n }\n
\n \n
...@@ -94,12 +94,12 @@ ...@@ -94,12 +94,12 @@
margin-bottom: 1em;\n margin-bottom: 1em;\n
}\n }\n
\n \n
.attachment_list_ListContent .attachment_list_getOwner{\n .attachment_list_ListContent .attachment_list_application_requester{\n
font-weight:bold;\n font-weight:bold;\n
}\n }\n
\n \n
.attachment_list_ListContent .added_by,\n .attachment_list_ListContent .added_by,\n
.attachment_list_ListContent .attachment_list_getOwner,\n .attachment_list_ListContent .attachment_list_application_requester,\n
.attachment_list_ListContent .at,\n .attachment_list_ListContent .at,\n
.attachment_list_ListContent .attachment_list_creation_date{\n .attachment_list_ListContent .attachment_list_creation_date{\n
font-style: italic;\n font-style: italic;\n
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<tal:block tal:define="object python: line.getObject()">\n <tal:block tal:define="object python: line.getObject()">\n
<li>\n <li>\n
<tal:block tal:repeat="value line/render">\n <tal:block tal:repeat="value line/render">\n
<tal:block tal:condition="python:line.renderer.getSelectedColumnList()[repeat[\'value\'].index][0] == \'getOwner\'">\n <tal:block tal:condition="python:line.renderer.getSelectedColumnList()[repeat[\'value\'].index][0] == \'application_requester\'">\n
<a href="lien" tal:attributes="href python: object.absolute_url()" i18n:translate="" i18n:domain="ui" target="_blank">See</a>\n <a href="lien" tal:attributes="href python: object.absolute_url()" i18n:translate="" i18n:domain="ui" target="_blank">See</a>\n
<tal:block tal:define="state python: line.getObject().aq_parent.getValidationState()"\n <tal:block tal:define="state python: line.getObject().aq_parent.getValidationState()"\n
tal:condition="python: state in (\'draft\')">\n tal:condition="python: state in (\'draft\')">\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="DTMLMethod" module="OFS.DTMLMethod"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>erp5.js</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>raw</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*\n
Copyright (c) 20xx-2006 Nexedi SARL and Contributors. All Rights Reserved.\n
\n
This program is Free Software; you can redistribute it and/or\n
modify it under the terms of the GNU General Public License\n
as published by the Free Software Foundation; either version 2\n
of the License, or (at your option) any later version.\n
\n
This program is distributed in the hope that it will be useful,\n
but WITHOUT ANY WARRANTY; without even the implied warranty of\n
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n
GNU General Public License for more details.\n
\n
You should have received a copy of the GNU General Public License\n
along with this program; if not, write to the Free Software\n
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
*/\n
\n
function submitAction(form, act) {\n
form.action = act;\n
form.submit();\n
}\n
\n
// This function will be called when the user click the save button. As \n
// submitAction function may have changed the action before, it\'s better to\n
// reset the form action to it\'s original behaviour. This is actually\n
// usefull when the user click the back button.\n
function clickSaveButton(act) {\n
document.forms[0].action = act;\n
}\n
\n
\n
// The first input element with an "autofocus" class will get the focus,\n
// else if no element have autofocus class, the first element which is not the\n
// search field will get the focus. This is generally the title input text of\n
// a view\n
function autoFocus() {\n
var first_autofocus_expr = ".//input[@class=\'autofocus\']"\n
var FIRST_RESULT = XPathResult.FIRST_ORDERED_NODE_TYPE\n
\n
var input = document.evaluate(first_autofocus_expr, document, null, FIRST_RESULT, null).singleNodeValue;\n
if (input) {\n
input.focus();\n
}else{\n
// The following is disabled, because it is too annoying to have an auto focus at everywhere.\n
//var first_text_input_expr = ".//input[@type=\'text\'][@name != \'field_your_search_text\']"\n
//var first_text_input = document.evaluate(first_text_input_expr, document, null, FIRST_RESULT, null).singleNodeValue;\n
//if (first_text_input){\n
// first_text_input.focus();\n
//}\n
}\n
}\n
\n
function buildTables(element_list, rowPredicate, columnPredicate,\n
tableClassName) {\n
/* Generic code to build a table from elements in element_list.\n
* rowPredicate(element) -> bool\n
* When it returns a true value, a new line is started with element.\n
* When is returns a false value, element is skipped.\n
* columnPredicate(element, initial_element) -> bitfield\n
* bit 3: end_table (if true, imlies end_row)\n
* End current table.\n
* bit 2: end_row\n
* End current row.\n
* bit 1: use_element\n
* Element passed to columnPredicate will be put in current row.\n
* Hardcoded:\n
* - items in a table line must be siblings in existing DOM\n
* - table is put in place of first element of the first row\n
*/\n
var element_index = 0;\n
while (element_index < element_list.length) {\n
var row_list = [];\n
var end_table = false;\n
while ((!end_table) && element_index < element_list.length) {\n
var row_begin = element_list[element_index];\n
if (rowPredicate(row_begin)) {\n
var item_list = [row_begin];\n
var row_item = row_begin;\n
var end_line = false;\n
while ((!end_line) && (row_item = row_item.nextSibling) != null) {\n
var predicate_result = columnPredicate(row_item, row_begin)\n
if ((predicate_result & 1) != 0)\n
item_list.push(row_item);\n
end_table = ((predicate_result & 4) != 0);\n
end_line = ((predicate_result & 6) != 0);\n
}\n
row_list.push(item_list);\n
}\n
element_index++;\n
}\n
/* Do not create a table with just one cell. */\n
if ((row_list.length > 1) ||\n
(row_list.length == 1 && row_list[0].length > 1)) {\n
var first_element = row_list[0][0];\n
var container = first_element.parentNode;\n
var fake_table = document.createElement("table");\n
var i;\n
var j;\n
fake_table.className = tableClassName;\n
container.insertBefore(fake_table, first_element);\n
for (i = 0; i < row_list.length; i++) {\n
var fake_row = document.createElement("tr");\n
var row_element_list = row_list[i];\n
for (j = 0; j < row_element_list.length; j++) {\n
var fake_cell = document.createElement("td");\n
fake_cell.appendChild(row_element_list[j]);\n
fake_row.appendChild(fake_cell);\n
}\n
fake_table.appendChild(fake_row);\n
}\n
}\n
}\n
}\n
\n
function matchChunk(string, separator, chunk_value) {\n
if (string != null) {\n
var id_chunks = string.split(separator);\n
var i;\n
for (i = 0; i < id_chunks.length; i++) {\n
if (id_chunks[i] == chunk_value)\n
return true;\n
}\n
}\n
return false;\n
}\n
\n
function matchLeftFieldset(element) {\n
return (element.tagName == "FIELDSET") &&\n
matchChunk(element.id, \'_\', "left");\n
}\n
\n
function matchRightFieldset(element, ignored) {\n
if ((element.tagName == "FIELDSET") &&\n
matchChunk(element.id, \'_\', "right"))\n
return 7; /* End row, table and use element */\n
return 0;\n
}\n
\n
function fixLeftRightHeightAndFocus(fix_height) {\n
if (fix_height == 1) {\n
buildTables(document.getElementsByTagName(\'fieldset\'),\n
matchLeftFieldset, matchRightFieldset,\n
"fake");\n
}\n
autoFocus();\n
}\n
\n
// This function can be used to catch ENTER pressed in an input \n
// and modify respective main form action\n
function submitFormOnEnter(event, main_form_id, method_name){\n
var key_code = event.keyCode;\n
if(key_code == 13){\n
var main_form = getElement(main_form_id)\n
main_form.action=method_name;};\n
}\n
\n
var old_index=0;\n
function shiftCheck(evt) {\n
evt=(evt)?evt:event;\n
var target=(evt.target)?evt.target:evt.srcElement;\n
// remove "checkbox" part from ID\n
// This part can be reused easilly by usual left column\n
var target_index= target.id.substr(8);\n
if(!evt.shiftKey) {\n
old_index= target_index\n
check_option = target.checked;\n
return false;\n
}\n
target.checked=1;\n
var low=Math.min(target_index , old_index);\n
var high=Math.max(target_index , old_index);\n
for(var i=low;i<=high;i++) {\n
document.getElementById("checkbox" + i ).checked = check_option;\n
}\n
return true;\n
}\n
\n
var indexAllCheckBoxesAtBTInstallationOnLoad = function() {\n
// This Part is used basically for Business Template Installation.\n
var inputs = window.getElementsByTagAndClassName("input", "shift_check_support");\n
for(i=0;i<=inputs.length-1;i++) { inputs[i].id = "checkbox" + i; }\n
}\n
\n
addLoadEvent(indexAllCheckBoxesAtBTInstallationOnLoad)
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2010-07-07 mayoro
* display name of requester in attachment list
2010-07-07 mayoro 2010-07-07 mayoro
* change automatic transitions * change automatic transitions
......
698 701
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment