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<String> = [];
if(maxQuantity > 12) {
- return '<input type="text" name="'+row_id+'[to_pick]" value="'+user_pick+'">';
+ inputs.push('<span class="picked">'+quantity+' </span>');
+ inputs.push('<input type="text" name="'+row_id+'[to_pick]" value="'+user_pick+'" onchange=\'onPick(this);\'>');
}
else {
- var inputs : Array<String> = ['<span class="pickable">'];
+ inputs.push('<span class="pickable">');
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');
inputs.push('<input type="radio" name="'+row_id+'[to_pick]" value="'+q+'" '+checked+' class="'+klass+'"
onclick=\'onPick(this);\'
>');
- inputs.push(picked && differs ? '<span class="picked">'+q+'</span>' : ''+q);
+ inputs.push(picked ? '<span class="picked">'+q+'</span>' : ''+q);
inputs.push('</input>');
if(last_available) {
inputs.push('</span>');
}
inputs.push('</span>');
- return inputs.join('');
}
+ return inputs.join('');
}
function formatLocation(location : Location, type: String, left : Int) {
if($user_pick === null) {
$user_pick = 0;
}
+ $inputs = new _hx_array(array());
if($maxQuantity > 12) {
- return "<input type=\"text\" name=\"" . $row_id . "[to_pick]\" value=\"" . _hx_string_rec($user_pick, "") . "\">";
+ $inputs->push("<span class=\"picked\">" . _hx_string_rec($quantity, "") . " </span>");
+ $inputs->push("<input type=\"text\" name=\"" . $row_id . "[to_pick]\" value=\"" . _hx_string_rec($user_pick, "") . "\" onchange='onPick(this);'>");
} else {
- $inputs = new _hx_array(array("<span class=\"pickable\">"));
+ $inputs->push("<span class=\"pickable\">");
{
$_g1 = 0; $_g = $maxQuantity + 1;
while($_g1 < $_g) {
}
}
$inputs->push("</span>");
- return $inputs->join("");
}
+ return $inputs->join("");
}
public function formatOrder($order, $left, $date, $now) {
$row_id = ItemScheduler::orderId($order);
}
}
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 "<span class=\"picked\">" . _hx_string_rec($q, "") . "</span>";
} else {
return "" . _hx_string_rec($q, "");