From 2483304de2780be5f2c940d944efadc51749f0db Mon Sep 17 00:00:00 2001 From: Maxime Bourget Date: Sat, 15 Jun 2013 10:27:50 +0100 Subject: [PATCH] Change current pick display (black on bold, no conditions) --- haxe/ItemScheduler.hx | 10 ++++++---- hincludes/lib/ItemScheduler.class.php | 10 ++++++---- item_schedule.php | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/haxe/ItemScheduler.hx b/haxe/ItemScheduler.hx index 1ff94e0..8a92d77 100644 --- a/haxe/ItemScheduler.hx +++ b/haxe/ItemScheduler.hx @@ -264,11 +264,13 @@ class ItemScheduler { var available = order.quantity > left ? left : order.quantity; var user_pick = parameters == null ? quantity : parameters.toPick(order); if (user_pick == null) user_pick = 0; + var inputs : Array = []; if(maxQuantity > 12) { - return ''; + inputs.push(''+quantity+' '); + inputs.push(''); } else { - var inputs : Array = ['']; + inputs.push(''); for(q in 0...(maxQuantity+1)) { var last_available = untyped __php__(' $q == $available ? true: false'); var current_pick = untyped __php__(' $q == $user_pick ? true:false'); @@ -279,7 +281,7 @@ class ItemScheduler { inputs.push(''); - inputs.push(picked && differs ? ''+q+'' : ''+q); + inputs.push(picked ? ''+q+'' : ''+q); inputs.push(''); if(last_available) { inputs.push(''); @@ -288,8 +290,8 @@ class ItemScheduler { } inputs.push(''); - return inputs.join(''); } + return inputs.join(''); } function formatLocation(location : Location, type: String, left : Int) { diff --git a/hincludes/lib/ItemScheduler.class.php b/hincludes/lib/ItemScheduler.class.php index 89fb784..cc083f9 100644 --- a/hincludes/lib/ItemScheduler.class.php +++ b/hincludes/lib/ItemScheduler.class.php @@ -118,10 +118,12 @@ class ItemScheduler { if($user_pick === null) { $user_pick = 0; } + $inputs = new _hx_array(array()); if($maxQuantity > 12) { - return ""; + $inputs->push("" . _hx_string_rec($quantity, "") . " "); + $inputs->push(""); } else { - $inputs = new _hx_array(array("")); + $inputs->push(""); { $_g1 = 0; $_g = $maxQuantity + 1; while($_g1 < $_g) { @@ -143,8 +145,8 @@ class ItemScheduler { } } $inputs->push(""); - return $inputs->join(""); } + return $inputs->join(""); } public function formatOrder($order, $left, $date, $now) { $row_id = ItemScheduler::orderId($order); @@ -324,7 +326,7 @@ function ItemScheduler_3(&$ } } function ItemScheduler_4(&$»this, &$_g, &$_g1, &$available, &$checked, &$current_pick, &$differs, &$inputs, &$klass, &$last_available, &$left, &$maxQuantity, &$order, &$picked, &$q, &$quantity, &$row_id, &$user_pick) { - if($picked && $differs) { + if($picked) { return "" . _hx_string_rec($q, "") . ""; } else { return "" . _hx_string_rec($q, ""); diff --git a/item_schedule.php b/item_schedule.php index 7321c96..9379528 100644 --- a/item_schedule.php +++ b/item_schedule.php @@ -146,7 +146,7 @@ tr.tDnD_whileDrag :nth-child(4), tr.tDnD_whileDrag :nth-child(5) { } span.picked { - color: darkred; + color: black; font-weight: bold; } -- 2.30.2