Commit 8fa51da5 authored by Ivan Tyagov's avatar Ivan Tyagov

Bottom listbox actions should be placed in seperate containers.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37366 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b63c55f5
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
global box_id python: \'visual_%s\' %box_relative_url.split(\'/\')[-1];\n global box_id python: \'visual_%s\' %box_relative_url.split(\'/\')[-1];\n
global dom_id python: request.get(\'dom_id\',None) or box_id;">\n global dom_id python: request.get(\'dom_id\',None) or box_id;">\n
<input tal:condition="python:form_id" \n <input tal:condition="python:form_id" \n
type="hidden" name="gadget_form_id"\n type="hidden" name="gadget_form_id"\n
tal:attributes="value form_id" />\n tal:attributes="value form_id" />\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
\n \n
...@@ -123,11 +123,11 @@ ...@@ -123,11 +123,11 @@
</select>\n </select>\n
\n \n
<!-- Domain node contents -->\n <!-- Domain node contents -->\n
<table id="listbox-domain-tree-table" \n <table id="listbox-table-domain-tree" \n
cellpadding="0"\n cellpadding="0"\n
summary="This table contains the domain tree"\n summary="This table contains the domain tree"\n
class="listbox_domain_tree_table"\n class="listbox-table-domain-tree"\n
tal:attributes="id string:${field_id}-domain-tree-table"\n tal:attributes="id string:${field_id}-table-domain-tree"\n
tal:define="report_tree_list python: here.makeReportTreeList(report_path = selected_domain_path, unfolded_list = selection.getDomainList(), is_report_opened = False, sort_on=((\'int_index\', \'ASC\'),));\n tal:define="report_tree_list python: here.makeReportTreeList(report_path = selected_domain_path, unfolded_list = selection.getDomainList(), is_report_opened = False, sort_on=((\'int_index\', \'ASC\'),));\n
total_depth python: max([report_tree.depth for report_tree in report_tree_list] + [-1])">\n total_depth python: max([report_tree.depth for report_tree in report_tree_list] + [-1])">\n
<tr tal:repeat="report_tree report_tree_list">\n <tr tal:repeat="report_tree report_tree_list">\n
...@@ -135,18 +135,16 @@ ...@@ -135,18 +135,16 @@
<td width="12" nowrap="nowrap">&nbsp;</td>\n <td width="12" nowrap="nowrap">&nbsp;</td>\n
</tal:block>\n </tal:block>\n
<td colspan="1" \n <td colspan="1" \n
class="domain-tree-table-cell"\n class="listbox-table-domain-tree-cell"\n
tal:attributes="colspan python: total_depth - report_tree.depth + 1">\n tal:attributes="colspan python: total_depth - report_tree.depth + 1">\n
<a href="method" class="tree_open"\n <a href="method" class="tree_open selected"\n
tal:condition="report_tree/is_open"\n tal:condition="report_tree/is_open"\n
tal:attributes="href string:foldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}">\n tal:attributes="href string:foldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}"\n
<b tal:content="report_tree/obj/getCompactTranslatedTitle">Domain</b>\n tal:content="report_tree/obj/getCompactTranslatedTitle"/>\n
</a>\n
<a href="method" class="tree_closed"\n <a href="method" class="tree_closed"\n
tal:condition="not: report_tree/is_open"\n tal:condition="not: report_tree/is_open"\n
tal:attributes="href string:unfoldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}">\n tal:attributes="href string:unfoldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}"\n
<tal:block tal:content="report_tree/obj/getCompactTranslatedTitle">Domain</tal:block>\n tal:content="report_tree/obj/getCompactTranslatedTitle"/>\n
</a>\n
</td>\n </td>\n
</tr>\n </tr>\n
</table>\n </table>\n
...@@ -220,7 +218,7 @@ ...@@ -220,7 +218,7 @@
title python: value[1];\n title python: value[1];\n
sort_order python: value[2]">\n sort_order python: value[2]">\n
\n \n
<th tal:condition="sql" class="listbox-table-header-cell"> \n <th tal:condition="sql" class="listbox-table-header-cell"> \n
<!-- Button in normal view -->\n <!-- Button in normal view -->\n
<button tal:define="\n <button tal:define="\n
bt_class python: sort_order==\'ascending\' and \'sort_button sort_button_asc\' \n bt_class python: sort_order==\'ascending\' and \'sort_button sort_button_asc\' \n
...@@ -272,11 +270,13 @@ ...@@ -272,11 +270,13 @@
index python: selection_index is not None and \'&amp;selection_index=%s\' % selection_index or \'\';\n index python: selection_index is not None and \'&amp;selection_index=%s\' % selection_index or \'\';\n
is_report_opened python: int(not here.getSelection().isReportOpened());\n is_report_opened python: int(not here.getSelection().isReportOpened());\n
requested_selection_name here/getRequestedSelectionName;\n requested_selection_name here/getRequestedSelectionName;\n
url here/getUrl">\n url here/getUrl;\n
report_depth python: selection.getParams().get(\'report_depth\', request.get(\'report_depth\', 0))">\n
<tal:block tal:repeat="i python: range(0, 6)">&nbsp;\n <tal:block tal:repeat="i python: range(0, 6)">&nbsp;\n
<a href="?selection_name=default&amp;selection_index=0&amp;report_depth:int=0"\n <a href="?selection_name=default&amp;selection_index=0&amp;report_depth:int=0"\n
tal:attributes="href string:${url}?selection_name=${requested_selection_name}${index}&amp;report_depth:int=${i}"\n tal:attributes="href string:${url}?selection_name=${requested_selection_name}${index}&amp;report_depth:int=${i};\n
tal:content="i">0</a>\n class python: test(i==report_depth, \'selected\', \'\');"\n
tal:content="i"/>\n
</tal:block>&nbsp;-&nbsp;\n </tal:block>&nbsp;-&nbsp;\n
<a \n <a \n
href="?selection_name=default&amp;selection_index=0&amp;is_report_opened:int=0"\n href="?selection_name=default&amp;selection_index=0&amp;is_report_opened:int=0"\n
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
<th class="listbox-table-anchor-cell" tal:condition="show_anchor_column">&nbsp;</th>\n <th class="listbox-table-anchor-cell" tal:condition="show_anchor_column">&nbsp;</th>\n
\n \n
<!--Select cell -->\n <!--Select cell -->\n
<th tal:condition="python: show_select_column"\n <th tal:condition="show_select_column"\n
class="listbox-table-select-cell">\n class="listbox-table-select-cell">\n
<input id="listbox_select" type="image"\n <input id="listbox_select" type="image"\n
title="Action" alt="Action" name="Base_doSelect:method"\n title="Action" alt="Action" name="Base_doSelect:method"\n
...@@ -298,11 +298,13 @@ ...@@ -298,11 +298,13 @@
src string:${portal_url_string}/images/exec16.png"\n src string:${portal_url_string}/images/exec16.png"\n
i18n:domain="ui" i18n:attributes="title" />\n i18n:domain="ui" i18n:attributes="title" />\n
</th>\n </th>\n
<!-- Real search columns -->\n \n
<th tal:repeat="value here/getSearchValueList">\n <!-- Real search columns headers -->\n
<th class="listbox-table-filter-cell"\n
tal:repeat="value here/getSearchValueList">\n
<tal:block tal:define="alias python: value[0];\n <tal:block tal:define="alias python: value[0];\n
param python: value[1];\n param python: value[1];\n
search_field python: value[2]"\n search_field python: value[2]"\n
tal:condition="alias">\n tal:condition="alias">\n
<!-- Render search field -->\n <!-- Render search field -->\n
<tal:block tal:condition="python: search_field is not None"\n <tal:block tal:condition="python: search_field is not None"\n
...@@ -326,18 +328,20 @@ ...@@ -326,18 +328,20 @@
</thead>\n </thead>\n
\n \n
<tbody>\n <tbody>\n
\n
<!-- Render listbox data-->\n <!-- Render listbox data-->\n
<tal:block tal:condition="line_list"\n <tal:block tal:condition="line_list"\n
tal:define="checked_uid_set here/getCheckedUidSet">\n tal:define="checked_uid_set here/getCheckedUidSet">\n
<tr tal:repeat="line line_list" \n <tr tal:repeat="line line_list" \n
tal:attributes="\n tal:attributes="\n
id string:${field_id}_data_line_${repeat/line/index};\n id string:${field_id}-data-line-${repeat/line/index};\n
class python: line.getRowCSSClassName() or test(repeat[\'line\'].index % 2, \'DataB\', \'DataA\');">\n class python: line.getRowCSSClassName() or test(repeat[\'line\'].index % 2, \'DataB\', \'DataA\');">\n
\n \n
<tal:block tal:define="render_result line/render">\n <tal:block tal:define="render_result line/render">\n
\n \n
<!--Report tree column -->\n <!--Report tree column -->\n
<td tal:condition="is_report_tree_mode" align="left" valign="middle" \n <td tal:condition="is_report_tree_mode"\n
class="listbox-table-report-tree-selection-cell" \n
tal:define="section_name python: line.getDomainTitle()">\n tal:define="section_name python: line.getDomainTitle()">\n
<a tal:condition="section_name"\n <a tal:condition="section_name"\n
tal:define="method_id python: line.isOpen() and \'foldReport\' or \'unfoldReport\'"\n tal:define="method_id python: line.isOpen() and \'foldReport\' or \'unfoldReport\'"\n
...@@ -408,8 +412,8 @@ ...@@ -408,8 +412,8 @@
id="listbox_stat_line" class="listbox_stat_line"\n id="listbox_stat_line" class="listbox_stat_line"\n
tal:attributes="id string:${field_id}_stat_line">\n tal:attributes="id string:${field_id}_stat_line">\n
<td tal:condition="is_report_tree_mode" >&nbsp;</td>\n <td tal:condition="is_report_tree_mode" >&nbsp;</td>\n
<td class="AnchorColumn" tal:condition="show_anchor_column">&nbsp;</td>\n <td class="listbox-table-anchor-cell" tal:condition="show_anchor_column">&nbsp;</td>\n
<td tal:condition="show_select_column">&nbsp;</td>\n <td class="listbox-table-select-cell" tal:condition="show_select_column">&nbsp;</td>\n
<tal:block tal:repeat="value here/getStatValueList">\n <tal:block tal:repeat="value here/getStatValueList">\n
<td align="left"\n <td align="left"\n
tal:define="original_value python: value[0]; processed_value python: value[1]"\n tal:define="original_value python: value[0]; processed_value python: value[1]"\n
...@@ -424,81 +428,89 @@ ...@@ -424,81 +428,89 @@
\n \n
<div class="listbox-footer">\n <div class="listbox-footer">\n
\n \n
<div class="listbox-footer-box">\n <!-- List mode choice -->\n
<!-- List mode choice -->\n <div class="listbox-footer-box listbox-tree-mode-selection"\n
<div tal:condition="python: not is_gadget_mode and (is_domain_tree_supported or is_report_tree_supported)"\n tal:condition="python: not is_gadget_mode and (is_domain_tree_supported or is_report_tree_supported)">\n
class="listbox-tree-mode-selection">\n <!-- Flat List -->\n
\n <input tal:condition="python: is_domain_tree_supported or is_report_tree_supported"\n
<input tal:condition="python: is_domain_tree_supported or is_report_tree_supported"\n type="image" \n
type="image" \n class="listbox-tree-flat-list-mode"\n
class="listbox-tree-flat-list-mode"\n title="Flat List" \n
title="Flat List" \n name="setFlatListMode:method"\n
name="setFlatListMode:method"\n value="1" \n
value="1" \n alt="Flat List"\n
alt="Flat List"\n tal:attributes="src string:${portal_url_string}/images/text_block.png;"\n
tal:attributes="src string:${portal_url_string}/images/text_block.png;"\n i18n:domain="ui" i18n:attributes="title alt" />\n
i18n:domain="ui" i18n:attributes="title alt" />\n \n
<input tal:condition="python: not is_gadget_mode and is_report_tree_supported"\n <!-- Report Tree -->\n
type="image" \n <input tal:condition="python: not is_gadget_mode and is_report_tree_supported"\n
class="listbox-tree-report-tree-mode"\n type="image" \n
title="Report Tree" \n class="listbox-tree-report-tree-mode"\n
name="setReportTreeMode:method"\n title="Report Tree" \n
value="1" \n name="setReportTreeMode:method"\n
alt="Report Tree"\n value="1" \n
tal:attributes="src string:${portal_url_string}/images/view_tree.png;"\n alt="Report Tree"\n
i18n:domain="ui" i18n:attributes="title alt" />\n tal:attributes="src string:${portal_url_string}/images/view_tree.png;"\n
<input tal:condition="python: not is_gadget_mode and is_domain_tree_supported"\n i18n:domain="ui" i18n:attributes="title alt" />\n
type="image" \n \n
class="listbox-tree-domain-tree-mode"\n <!-- Domain Tree -->\n
title="Domain Tree" \n <input tal:condition="python: not is_gadget_mode and is_domain_tree_supported"\n
name="setDomainTreeMode:method"\n type="image" \n
value="1" \n class="listbox-tree-domain-tree-mode"\n
alt="Domain Tree"\n title="Domain Tree" \n
tal:attributes="src string:${portal_url_string}/images/view_choose.png;"\n name="setDomainTreeMode:method"\n
i18n:domain="ui" i18n:attributes="title alt" />\n value="1" \n
</div>\n alt="Domain Tree"\n
tal:attributes="src string:${portal_url_string}/images/view_choose.png;"\n
i18n:domain="ui" i18n:attributes="title alt" />\n
</div>\n
\n
<!-- List display mode -->\n
<div class="listbox-footer-box listbox-list-style-selection"\n
tal:condition="python: len(display_style_list) > 0">\n
\n
<span i18n:translate="" i18n:domain="ui">Display:</span>\n
<ul>\n
<li tal:repeat="style display_style_list">\n
<a tal:attributes="href python: \'%s?list_style=%s\' % (listbox_url, style[0]);\n
class python: test(style[0]==list_style, \'selected\',\'\');"\n
tal:content="python: style[1]"\n
i18n:translate="" i18n:domain="ui"/>\n
</li>\n
</ul>\n
\n \n
<!-- List display mode -->\n </div>\n
<div tal:condition="python: len(display_style_list) > 0"\n
class="listbox-list-style-selection">\n
<span i18n:translate="" i18n:domain="ui">Display:</span>\n
<ul>\n
<li tal:repeat="style display_style_list">\n
<a tal:attributes="href python: \'%s?list_style=%s\' % (listbox_url, style[0]);\n
class python: test(style[0]==list_style, \'selected\',\'\');"\n
tal:content="python: style[1]"\n
i18n:translate="" i18n:domain="ui"/>\n
</li>\n
</ul>\n
</div>\n
\n \n
<!-- Full text search -->\n <!-- Full text search -->\n
<div tal:define="search_text real_context/Base_getSearchText"\n <div class="listbox-footer-box listbox-full-text-search"\n
tal:condition="show_full_text" \n tal:condition="show_full_text"\n
class="listbox-full-text-search">\n tal:define="search_text real_context/Base_getSearchText">\n
<tal:block tal:condition="not: is_gadget_mode">\n \n
<!-- Normal mode -->\n <tal:block tal:condition="not: is_gadget_mode">\n
<input type="text"\n <!-- Normal mode -->\n
tal:attributes="value search_text;\n <input type="text"\n
name full_text_search_key;\n tal:attributes="value search_text;\n
onkeypress string: submitFormOnEnter(event, this.form, \'${full_text_search_key_script}\');"/>\n name full_text_search_key;\n
<input class="button" \n onkeypress string: submitFormOnEnter(event, this.form, \'${full_text_search_key_script}\');"/>\n
i18n:domain="ui" i18n:attributes="value"\n <input class="button" \n
value="Search" type="submit" \n i18n:domain="ui" i18n:attributes="value"\n
tal:attributes="name string:${full_text_search_key_script}:method"/>\n value="Search" type="submit" \n
</tal:block>\n tal:attributes="name string:${full_text_search_key_script}:method"/>\n
<tal:block tal:condition="is_gadget_mode">\n </tal:block>\n
<!-- Gadget mode -->\n <tal:block tal:condition="is_gadget_mode">\n
<input tal:define="params python: {\'%s:method\' %full_text_search_key_script:\'\',\'%s\' %full_text_search_key:\'this.value\'};"\n <!-- Gadget mode -->\n
type="text"\n <input tal:define="params python: {\'%s:method\' %full_text_search_key_script:\'\',\'%s\' %full_text_search_key:\'this.value\'};"\n
tal:attributes=\'value search_text;\n type="text"\n
name full_text_search_key;\n tal:attributes=\'value search_text;\n
onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n name full_text_search_key;\n
</tal:block>\n onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
</div> \n </tal:block>\n
\n
</div>\n </div>\n
\n \n
<!--Page pagination -->\n <!--Page pagination \n
XXX: make use of page_navigation_mode to show respective navigation.\n
-->\n
<div class="listbox-footer-box listbox-page-navigation"\n <div class="listbox-footer-box listbox-page-navigation"\n
tal:condition="need_pagination">\n tal:condition="need_pagination">\n
<div class="pageNavigation">\n <div class="pageNavigation">\n
......
...@@ -205,16 +205,12 @@ div.listbox-tree-mode-selection input{\n ...@@ -205,16 +205,12 @@ div.listbox-tree-mode-selection input{\n
width: auto;\n width: auto;\n
}\n }\n
\n \n
.listbox-table-anchor-cell, .listbox-table-select-cell {\n
text-align: center; \n
vertical-align: middle;\n
}\n
\n \n
th.listbox-table-report-tree-selection-cell{\n th.listbox-table-report-tree-selection-cell{\n
width: 50px; \n width: 50px; \n
}\n }\n
\n \n
td.domain-tree-table-cell{\n td.listbox-table-domain-tree-cell{\n
text-align: left; \n text-align: left; \n
vertical-align: top; \n vertical-align: top; \n
white-space: nowrap;\n white-space: nowrap;\n
...@@ -260,7 +256,9 @@ div.listbox-list-style-selection ul{\n ...@@ -260,7 +256,9 @@ div.listbox-list-style-selection ul{\n
div.listbox-list-style-selection li{\n div.listbox-list-style-selection li{\n
display: inline;\n display: inline;\n
}\n }\n
div.listbox-list-style-selection li a.selected{\n div.listbox-list-style-selection li a.selected,\n
.listbox-table-report-tree-selection-cell a.selected,\n
.listbox-table-domain-tree-cell a.selected{\n
font-weight: bold;\n font-weight: bold;\n
}\n }\n
\n \n
......
1502 1503
\ 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