X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=js%2Fkivi.Order.js;h=5d891d56eaa767aede739681bea79c89e99bf2bc;hb=67dcea83ce7512a5719b34584fbbdc56ed0825e6;hp=c3673b474288a368a714e47db43ba547735082d0;hpb=5737ce39a18326f1c3ae70a5afcc2d494fb901c7;p=kivitendo-erp.git diff --git a/js/kivi.Order.js b/js/kivi.Order.js index c3673b474..5d891d56e 100644 --- a/js/kivi.Order.js +++ b/js/kivi.Order.js @@ -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; }); + });