epic-ts
[kivitendo-erp.git] / templates / webpages / oe / sales_order.html
index 91f0a56..76587d7 100644 (file)
@@ -5,14 +5,17 @@
 [%- 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">
@@ -75,7 +78,6 @@
 
       </td>
      </tr>
- [% PROCESS 'oe/_price_sources_row.html' i = loop.count %]
 [%- END %]
 
   </table>
         [% 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>