ActionBar: Verwendung in Kreditorenbuchungen
[kivitendo-erp.git] / js / kivi.Order.js
index c3673b4..5d891d5 100644 (file)
@@ -219,24 +219,24 @@ namespace('kivi.Order', function(ns) {
 
   ns.hide_second_row = function(row) {
     $(row).children().not(':first').hide();
-    $(row).data('expanded', false);
+    $(row).data('expanded', 0);
     var elt = $(row).find('.expand');
-    elt.attr('src', "image/expand3.gif");
+    elt.attr('src', "image/expand.svg");
     elt.attr('alt', kivi.t8('Show details'));
     elt.attr('title', kivi.t8('Show details'));
   };
 
   ns.show_second_row = function(row) {
     $(row).children().not(':first').show();
-    $(row).data('expanded', true);
+    $(row).data('expanded', 1);
     var elt = $(row).find('.expand');
-    elt.attr('src', "image/collapse3.gif");
+    elt.attr('src', "image/collapse.svg");
     elt.attr('alt', kivi.t8('Hide details'));
     elt.attr('title', kivi.t8('Hide details'));
   };
 
   ns.toggle_second_row = function(row) {
-    if ($(row).data('expanded') === true) {
+    if ($(row).data('expanded') == 1) {
       ns.hide_second_row(row);
     } else {
       ns.show_second_row(row);
@@ -275,13 +275,6 @@ namespace('kivi.Order', function(ns) {
           return false;
         }
       });
-      $(elt).dblclick(function(event) {
-        event.preventDefault();
-        var row = $(event.target).parents(".row_entry").first();
-        ns.load_second_row(row);
-        ns.toggle_second_row(row);
-        return false;
-      });
     });
 
     kivi.run_once_for('.expand', 'expand_second_row', function(elt) {
@@ -555,17 +548,17 @@ $(function(){
 
   $('#expand_all').on('click', function(event) {
     event.preventDefault();
-    if ($('#expand_all').data('expanded') === true) {
-      $('#expand_all').data('expanded', false);
-      $('#expand_all').attr('src', 'image/expand3.gif');
+    if ($('#expand_all').data('expanded') == 1) {
+      $('#expand_all').data('expanded', 0);
+      $('#expand_all').attr('src', 'image/expand.svg');
       $('#expand_all').attr('alt', kivi.t8('Show all details'));
       $('#expand_all').attr('title', kivi.t8('Show all details'));
       $('.row_entry').each(function(idx, elt) {
         kivi.Order.hide_second_row(elt);
       });
     } else {
-      $('#expand_all').data('expanded', true);
-      $('#expand_all').attr('src', "image/collapse3.gif");
+      $('#expand_all').data('expanded', 1);
+      $('#expand_all').attr('src', "image/collapse.svg");
       $('#expand_all').attr('alt', kivi.t8('Hide all details'));
       $('#expand_all').attr('title', kivi.t8('Hide all details'));
       kivi.Order.load_all_second_rows();
@@ -575,4 +568,5 @@ $(function(){
     }
     return false;
   });
+
 });