Commit ca482ba8 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* specify higher skin property.

* enable short-mode for several listboxes in a page.
* make it possible to click lines with empty titles.
* use http_cache for static objects.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25905 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ed108b37
......@@ -23,6 +23,16 @@
<value> <string>tokens</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
......@@ -40,6 +50,10 @@
</tuple>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>150.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_mobile_ui</string> </value>
......
......@@ -58,8 +58,11 @@
is_report_tree_mode here/isReportTreeMode;\n
is_domain_tree_supported here/isDomainTreeSupported;\n
is_report_tree_supported here/isReportTreeSupported;\n
show_anchor_column here/showAnchorColumn;\n
show_select_column here/showSelectColumn;\n
show_search_line here/showSearchLine;\n
stat_column_name_list python: here.getLabelValueList();\n
selected_search_field request/select_search_field | nothing;\n
">\n
<!-- ListBox starts here. -->\n
<input type="hidden" name="list_selection_name" value="default" tal:attributes="value selection_name" />\n
......@@ -97,7 +100,7 @@
<tal:block tal:repeat="i python: range(report_tree.depth)">\n
<div width="16" nowrap="nowrap">&nbsp;</div>\n
</tal:block>\n
\t\t <div colspan="1" style="text-align: left; vertical-align: top; white-space: nowrap;"\n
<div colspan="1" style="text-align: left; vertical-align: top; white-space: nowrap;"\n
tal:attributes="colspan python: total_depth - report_tree.depth + 1">\n
<a href="method"\n
tal:condition="report_tree/is_open"\n
......@@ -127,12 +130,13 @@
<div style="padding: 0px; margin: 0px;">\n
<div class="top_list">\n
<div id="listbox_title_line" tal:attributes="id string:${field_id}_title_line" class="List_top">\n
<span id="listbox_record_number"\n
<!-- <tal:block tal:define="global field_id string:${field_id}" /> -->\n
\t <span id="listbox_record_number"\n
tal:attributes="id string:${field_id}_record_number"\n
i18n:translate="" i18n:domain="ui"><tal:block tal:replace="here/total_size" i18n:name="number">0</tal:block> record(s)</span>\n
<input type="hidden" id="listMax" tal:attributes="value python: len(here.getSearchValueList())">\n
<input type="hidden" id="itemMax" tal:attributes="value python: len(line_list)">\n
<input type="checkbox" name="check" id="check" onClick="simple_aff()" checked="checked">\n
<input type="hidden" tal:attributes="id string:${field_id}_listMax; name string:${field_id}_listMax; value python: len(here.getSearchValueList())">\n
<input type="hidden" tal:attributes="id string:${field_id}_itemMax; name string:${field_id}_itemMax; value python: len(line_list)">\n
<br /><input type="checkbox" tal:attributes="id string:${field_id}_check; name string:${field_id}_check; onChange string:simple_aff(this.id)" checked="checked">\n
<span tal:content="python: \'Short mode\'"></span>\n
\n
<select id="listbox_page_selection" name="list_start" title="Change Page" size="1"\n
......@@ -168,11 +172,9 @@
</div>\n
<tal:block tal:define="global tab_title python: range(7)"/>\n
<tal:block tal:repeat="value here/getLabelValueList">\n
<tal:block tal:define="sql python: value[0];\n
title python: value[1];\n
sort_order python: value[2];\n
<tal:block tal:define="title python: value[1];\n
foo repeat/value/index;\n
bidule python: tab_title.insert(foo, value[1]);">\n
bidule python: tab_title.insert(foo, title);">\n
</tal:block>\n
</tal:block>\n
</div>\n
......@@ -194,14 +196,14 @@
</tal:block>\n
\t <div name="selection_mui" style="padding-bottom: 5px;">\n
\n
<select id="select" onChange="applyHiddenType()">\n
<select id="select_search_field" onChange="javascript: this.form.submit();" name="select_search_field">\n
<tal:block tal:repeat="valueX here/getSearchValueList">\n
<tal:block tal:define="\n
aliasX python: valueX[0];\n
paramX python: valueX[1];\n
search_fieldX python: valueX[2];\n
foo2 repeat/valueX/index">\n
<option tal:condition="aliasX" tal:content="python: tab_title[foo2]" i18n:domain="ui" i18n:translate="" tal:attributes="value python: foo2;"></option>\n
<option tal:condition="aliasX" tal:content="python: tab_title[foo2]" i18n:domain="ui" i18n:translate="" tal:attributes="value python: aliasX; selected python: aliasX==selected_search_field"></option>\n
</tal:block>\n
</tal:block>\n
</select>\n
......@@ -213,12 +215,14 @@
search_field python: value[2];\n
foo repeat/value/index;"\n
tal:attributes="id repeat/value/index">\n
<tal:block tal:condition="python: alias==selected_search_field or (not selected_search_field and not foo)">\n
<span tal:condition="alias">\n
<tal:block tal:condition="python: search_field is not None"\n
tal:replace="structure python: search_field.render(value = param, key = alias)" />\n
<input style="width: 40%;" tal:condition="python: search_field is None" name="id" size="8" value=""\n
<input style="width: 40%;" name="id" size="8" value=""\n
tal:attributes="name alias; value param; id python: \'%s%s\' % (\'input\', foo)"/>\n
</span>\n
</tal:block>\n
</div>\n
</tal:block>\n
</div>\n
......@@ -254,17 +258,27 @@
type="hidden" value="1" name="listbox_uid:list"\n
tal:attributes="value python: line.getUid() or \'\';\n
name string:${field_id}_uid:list" />\n
<div class="right_title"\n
tal:condition="not: repeat/valueY/index">\n
<span tal:replace="structure html">value</span>\n
<div class="left_data"\n
tal:condition="not: repeat/valueY/index"\n
tal:define="object_url python: \'%s/view\' % line.getObject().getAbsoluteUrl()">\n
<!-- XXX it should be possible to test isSummary() -->\n
<input tal:condition="python: form_id==\'Base_viewRelatedObjectList\' and line.getObject() is not None"\n
type="checkbox" value="checked" id="listbox_cb_1" name="uids:list"\n
tal:attributes="checked python: line.getUid() in checked_uid_set;\n
value line/getUid; id string:${field_id}_cb_${line/getUid}" />\n
<a tal:condition="python:not form_id==\'Base_viewWorkflowHistory\'" href="#" tal:attributes="href string:${object_url}?selection_index=${selection_index}&amp;selection_name=${selection_name}&amp;ignore_layout:int=0&amp;reset:int=1"><img src="document_icon.gif" tal:attributes="src string:${portal_url_string}/images/line_clickable.png; title python: line.getObject().getRelativeUrl()" title="document"/></a>\n
<span tal:condition="original_value" tal:replace="structure html">value</span>\n
</div>\n
<div tal:attributes="id python: \'%s%s%s\' % (foo2, \'data\', foo)">\n
<div tal:attributes="id python: \'%s_%s%s%s\' % (field_id, foo2, \'data\', foo)">\n
<div class="left_data" tal:condition="repeat/valueY/index">\n
<span style="color: green; font-size: 12px;" tal:content="title" i18n:domain="ui" i18n:translate=""> ID\n
</span>\n
<span style="color: green;">&nbsp;:&nbsp;</span>\n
<tal:block tal:condition="show_search_line">\n
<span id="data_short" tal:content="data_short"/>\n
<span tal:condition="python: isinstance(original_value,(float, int, long))"\n
id="data_short" tal:content="python: original_value" />\n
<span tal:condition="python: not isinstance(original_value,(float, int, long))"\n
id="data_short" tal:content="data_short" />\n
</tal:block>\n
<tal:block tal:condition="not:show_search_line">\n
<span tal:replace="structure html">value</span>\n
......@@ -279,11 +293,21 @@
tal:attributes="id string:${field_id}_stat_line">\n
<div tal:condition="is_report_tree_mode" class="Data">&nbsp;</div>\n
<div tal:condition="show_select_column" class="Data">&nbsp;</div>\n
<tal:block tal:repeat="valueZ here/getStatValueList">\n
<div class="Data" align="left"\n
<tal:block tal:condition="python: stat_column_name_list is not None" tal:repeat="valueZ here/getStatValueList">\n
<div class="left_data" tal:define="\n
original_value python: valueZ[0];\n
processed_value python: valueZ[1];\n
foo repeat/valueZ/index">\n
<span tal:condition="python: original_value is not None" style="color: green; font-size: 12px;" tal:content="python: stat_column_name_list[foo][1]" i18n:domain="ui" i18n:translate=""> ID\n
</span>\n
<span tal:condition="python: original_value is not None" style="color: green;">&nbsp;:&nbsp;</span>\n
<tal:block tal:condition="python: original_value is not None">\n
<span align="right"\n
tal:define="original_value python: valueZ[0]; processed_value python: valueZ[1]"\n
tal:attributes="align python: isinstance(original_value, (float, int, long)) and \'right\' or \'left\'"\n
tal:content="processed_value" />\n
tal:content="structure processed_value" />\n
</tal:block>\n
</div>\n
</tal:block>\n
</div>\n
</div>\n
......
......@@ -9,6 +9,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>erp5.css</string> </value>
......@@ -422,6 +426,14 @@ ul li:before{\n
margin: 15px;\n
}\n
\n
.AnchorColumn {\n
!important\n
border-style:none;\n
border-color:<dtml-var document_border_color>;\n
background-color:<dtml-var document_background_color>;\n
border-width:0;\n
}\n
\n
.button {\n
border-Top-Width: thin;\n
border-Top-Color: #3D6464;\n
......
......@@ -9,6 +9,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>erp5.js</string> </value>
......@@ -97,17 +101,23 @@ else\n
}\n
}\n
\n
function simple_aff () {\n
var max_lenght = document.getElementById("listMax").value;\n
var max_item = document.getElementById("itemMax").value;\n
var check = document.getElementById("check");\n
for (b = 0; b < max_item; b++)\n
{\n
for (a = 0; a < max_lenght; a++)\n
function simple_aff(dynamic_check_field) {\n
\n
if(dynamic_check_field) \n
{\n
var foo = b + \'data\' + a;\n
var target = document.getElementById(foo);\n
form_id=dynamic_check_field.split("listbox_")\n
max_lenght_field_id=form_id[0]+"listbox_listMax"\n
max_item_field_id=form_id[0]+"listbox_itemMax";\n
check_field_id=form_id[0]+"listbox_check";\n
var max_lenght = document.getElementById(max_lenght_field_id).value;\n
var max_item = document.getElementById(max_item_field_id).value;\n
var check = document.getElementById(check_field_id);\n
\n
for (b = 0; b < max_item; b++)\n
{\n
for (a = 0; a < max_lenght; a++)\n
{ var foo =form_id[0]+ \'listbox_\' + b + \'data\' + a;\n
var target = document.getElementById(foo);\n
if (check.checked)\n
{\n
target.style.display = "none";\n
......@@ -117,50 +127,60 @@ for (a = 0; a < max_lenght; a++)\n
target.style.display = "inline";\n
}\n
}\n
}\n
}\n
}\n
}\n
\n
function applyHiddenType() {\n
\n
if (document.getElementById("listMax") && document.getElementById("fieldset_bottom"))\n
{\n
var max_lenght = document.getElementById("listMax").value;\n
var select = document.getElementById("select");\n
if (select)\n
{\n
var field = document.getElementById("fieldset_bottom");\n
var input\n
var foo = "input";\n
var foofoo\n
\n
if(document.getElementById("listbox_listMax"))\n
{ var max_item = document.getElementById("listbox_itemMax").value;\n
var max_lenght = document.getElementById("listbox_listMax").value;\n
hideListItems(\'\',max_item, max_lenght)\n
}\n
\n
field.style.border = "solid 0px";\n
for (a = 0; a < max_lenght; a++)\n
{\n
foofoo = foo + a;\n
if (document.getElementById(foofoo))\n
{\n
preinit = document.getElementById(foofoo);\n
preinit.value = "";\n
/* XXX Hard code, get the number of box with show/hide mode */\n
for (i = 0; i < 5; i++) {\n
form_id = "x"+i+"_"\n
var max_lenght_field_id=form_id+"listbox_listMax"\n
var max_item_field_id=form_id+"listbox_itemMax"\n
if(document.getElementById(max_lenght_field_id) && document.getElementById(max_item_field_id) )\n
{ \n
var max_item = document.getElementById(max_item_field_id).value;\n
var max_lenght = document.getElementById(max_lenght_field_id).value;\n
hideListItems(form_id,max_item, max_lenght)\n
}\n
}\n
affShortcuts ();\n
}\n
\n
for (a = 0; a < max_lenght; a++)\n
{\n
if (select.options[select.selectedIndex].value != a)\n
{\n
input = document.getElementById(a);\n
input.style.display = "none";\n
}\n
else\n
function hideListItems(form_id, max_item, max_length)\n
{\n
check=form_id+"listbox_check";\n
for (b = 0; b < max_item; b++)\n
{\n
input = document.getElementById(a);\n
input.style.display = "inline";\n
}\n
for (a = 0; a < max_length; a++)\n
{ var foo =form_id+ \'listbox_\' + b + \'data\' + a;\n
var target = document.getElementById(foo);\n
if(target) \n
target.style.display = "none";\n
}\n
affShortcuts ();\n
}\n
}\n
\n
function validateSearch(field_id)\n
{\n
document.getElementById(field_id).value=\'\';\n
this.form.submit();\n
}\n
\n
function isSeachSelectedProperty(index_id)\n
{ \n
var select = document.getElementById(select);\n
if(select.options[select.selectedIndex].value == index_id)\n
return 1\n
else \n
return 0\n
}\n
\n
function getTop(MyObject)\n
......
......@@ -90,7 +90,7 @@ It is possible to specify a group id and a group title by naming a group followi
<tal:block\n
tal:define="field_errors python: request.get(\'field_errors\', {});\n
dummy python: request.set(\'here\', here);\n
group_list python: form.Form_getGroupTitleAndId();\n
\t\tgroup_list python: form.Form_getGroupTitleAndId();\n
gid_list python: \' \'.join([x[\'gid\'] for x in group_list if x!=\'hidden\']);\n
field_render nocall: here/field_render/macros/field_render">\n
\n
......@@ -109,13 +109,13 @@ It is possible to specify a group id and a group title by naming a group followi
</div>\n
</fieldset>\n
<p tal:condition="python: gid.find(\'right\') >= 0 or (gid.find(\'left\') >= 0 and \'right\' not in gid_list)" class="clear"/>\n
</tal:block>\n
<p class="clear">&nbsp;</p>\n
</tal:block>\n
<div class="div_gtt" align="middle">\n
<a class="link_white" tal:attributes="href python: \'%s%s%s%s\' % (context.REQUEST.URL0,\'?\', context.REQUEST.QUERY_STRING,\'#TOP\')">////////// Top of page \\\\\\\\\\\\\\\\\\\\</a>\n
</div>\n
</tal:block>\n
</tal:block>\n
<p class="clear"></p>\n
</tal:block>\n
</tal:block>
]]></string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Image" module="OFS.Image"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts28410697.33</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>line_clickable.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="base64">iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAAA9UlEQVQoz6WTIVLEQBBFfyiOkjPg
uQACh1uFAxeFRmBQVGEoDGILj4rkCnsVYPr/P2EQE0NVQjbs2K73+vdMT9O2LQ45R3OF7qkvV49v
5V+C7rkvYcEiNnfbslpAGRYRFLIDFzcPZZXAIkgjKzCkT5DE2fVt2VsQFKyEgQmSkBUgidNNV/ZO
MDBBERADCsEKmMTJ+eUvyfGU4Ds+YAo2IQl2gkmIAYvLCTTCJmF+VViB7DrOYgKrdhMTTNcUQVgJ
u/61WRaQkAm5XqYZk/CsgBFwJvI4s8lJeD5BJhxpfIHArt82qxbp/eW+keoq/wUDQHPob/wB9jzc
u4hDo30AAAAASUVORK5CYII=</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>15</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>302</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>16</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -9,6 +9,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>test.js</string> </value>
......
39
\ No newline at end of file
40
\ 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