[%- PROCESS 'amcvar/render_inputs_block.html' %]
<tr>
<td>
- <input type="button" id="cb_show_details" name="show_details_button" value='[% 'Show details' | $T8 %]'>
+ <input type="button" id="cb_show_details" name="show_details_button" value='[% 'Show details' | $T8 %]'[% IF show_details %] style="display:none"[% END %]>
+ <input type="button" id="cb_hide_details" name="hide_details_button" value='[% 'Hide details' | $T8 %]'[% IF !show_details %] style="display:none"[% END %]>
<script type="text/javascript">
- $('#cb_show_details').click(function(){ $('[id^="row2"]').toggle();
- if ( $('[id^="row2"]').is(":visible") ) {
- $("[name='show_details']").val(1);
- } else {
- $("[name='show_details']").val(0);
- }});
+ $('#cb_show_details,#cb_hide_details').click(function(){
+ $('[id^="row2"],#cb_show_details,#cb_hide_details').toggle();
+ if ( $('[id^="row2"]').is(":visible") ) {
+ $("[name='show_details']").val(1);
+ } else {
+ $("[name='show_details']").val(0);
+ }}
+ );
</script>
<table id='display_row' width="100%">
<tr class="listheading">
</td>
</tr>
- [% PROCESS 'oe/_price_sources_row.html' i = loop.count %]
[%- END %]
</table>
<script type='text/javascript'>
$(function() {
setTimeout(function(){
- [% SWITCH( myconfig_focus_position ) %]
+ [% SWITCH( MYCONFIG.focus_position ) %]
[% CASE 'last_partnumber' %]
$('#display_row tr.row:gt(-3):lt(-1) input[name*="partnumber"]').focus();
[% CASE 'last_description' %]
[% END %]
}, 1);
});
- function toggle_price_source(row) {
- $('#row' + row + '_3').toggle();
- }
- function update_price_source(row, source, price_str){
- $('#active_price_source_' + row).val(source);
- if (price_str) $('#sellprice_' + row).val(price_str);
- $('#update_button').click();
- }
</script>
</td>