From 48b8e202f8773fc9fa680ddce4afc27ea782959f Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Wed, 2 Feb 2011 11:00:11 +0000 Subject: [PATCH] =?UTF-8?q?timeout=20f=C3=BCr=20onblur,=20details=20versch?= =?UTF-8?q?ieben?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wawi/bestellung.php | 97 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 75 insertions(+), 22 deletions(-) diff --git a/wawi/bestellung.php b/wawi/bestellung.php index f69174d3b..64dc23a57 100644 --- a/wawi/bestellung.php +++ b/wawi/bestellung.php @@ -1401,7 +1401,7 @@ if($aktion == 'suche') echo "\n"; echo "\n"; echo "Pos\n"; - echo "Sort\n"; + // echo "Sort\n"; echo "Menge\n"; echo "VE\n"; echo "Bezeichnung\n"; @@ -1409,7 +1409,7 @@ if($aktion == 'suche') echo "Preis/VE\n"; echo "USt \n"; echo "Brutto\n"; - echo " "; + echo " "; echo "\n"; echo ""; $i= 1; @@ -1427,8 +1427,8 @@ if($aktion == 'suche') echo ""; echo ""; echo ""; - echo ""; - echo ""; + //echo ""; + //echo ""; echo ""; echo ""; echo ""; @@ -1450,7 +1450,8 @@ if($aktion == 'suche') var uid = "'.$user.'"; var focusRow ="1"; - $("#tags_link").click(function() { + + function hideTags() { i=1; while(i<=anzahlRows) { @@ -1460,8 +1461,48 @@ if($aktion == 'suche') $("#tags_headline").toggle(); $("#tags_link").toggle(); return false; - }); - + } + + function hideTags2() + { + var i=1; + var show=false; + while(i<=anzahlRows) + { + if($("#detail_tag_"+i).val()!="") + { + show=true; + } + i=i+1; + } + + if(show) + { + var i=1; + while(i<=anzahlRows) + { + + $("#detail_tag_"+i).show(); + i=i+1; + } + $("#tags_headline").hide(); + $("#tags_link").hide(); + } + else + { + var i=1; + while(i<=anzahlRows) + { + $("#detail_tag_"+i).hide(); + i=i+1; + } + $("#tags_headline").show(); + $("#tags_link").show(); + } + } + + + // Status bestellt wird gesetzt function deleteBtnBestellt(bestellung_id) { @@ -1626,8 +1667,10 @@ if($aktion == 'suche') var test = 0; test = document.getElementById("detail_anz").value; document.getElementById("detail_anz").value = parseFloat(test) +1; + hideTags2(); }); - } + } + return false; } // speichert eine Bestelldetailzeile @@ -1685,7 +1728,7 @@ if($aktion == 'suche') restBudget = parseFloat(restBudget); differenz = parseFloat(differenz); aktBrutto = parseFloat(aktBrutto); - differenz = restBudget - bestellungPreis + aktBrutto; + differenz = restBudget - bestellungPreis + aktBrutto; if(differenz < 0) { return confirm("Die Bestellung würde das Budget überziehen. Trotzdem fortfahren?"); @@ -1714,11 +1757,16 @@ if($aktion == 'suche') } } - $(document).ready(function(){ - $(".up,.down").click(function(){ - var row = $(this).parents("tr:first"); + $(document).ready(function() + { + hideTags2(); + }); + + function verschieben(obj) + { + var row = $(obj).parents("tr:first"); - if ($(this).is(".up")) + if ($(obj).is(".up")) { row.insertBefore(row.prev()); } @@ -1738,8 +1786,8 @@ if($aktion == 'suche') sort.value=i; i++; } - }); - }); + } + '; $disabled =''; @@ -1749,7 +1797,7 @@ if($aktion == 'suche') $aktBrutto = $bestellung->getBrutto($bestellung->bestellung_id); if($aktBrutto =='') $aktBrutto ="0"; - echo "\n"; + echo "\n"; echo "\n"; echo "
Bestellschein generieren
"; echo "

"; @@ -1858,7 +1906,7 @@ if($aktion == 'suche') { $removeDetail = "removeDetail(".$i.");"; $checkSave = "checkSave(".$i.");"; - $checkRow = "checkNewRow(".$i.");"; + $checkRow = "setTimeout(\"checkNewRow(".$i.")\",100);"; $detailDown = "nunter(".$i.");"; $detailUp = "nauf(".$i.");"; } @@ -1871,21 +1919,25 @@ if($aktion == 'suche') // echo "\n"; echo " \n"; - echo "\n"; - echo " \n"; + echo "\n"; + echo " \n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; $detail_tag = new tags(); $detail_tag->GetTagsByBestelldetail($bestelldetail_id); $help = $detail_tag->GetStringTags(); - echo ""; + /*$style=''; + if($help== '') + $style = "style='display:none'"; + */ + echo ""; echo " "; echo ""; + echo "\n"; echo "\n"; } \ No newline at end of file