var differs = untyped __php__('$user_pick != $quantity');
var checked = current_pick ? "checked": "";
var klass : String = q > available ? 'early' : "";
- inputs.push('<input type="radio" name="'+row_id+'[to_pick]" value="'+q+'" '+checked+' class="'+klass+'">');
+ 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('</input>');
if(last_available) {
$differs = $user_pick != $quantity;
$checked = (($current_pick) ? "checked" : "");
$klass = (($q > $available) ? "early" : "");
- $inputs->push("<input type=\"radio\" name=\"" . $row_id . "[to_pick]\" value=\"" . _hx_string_rec($q, "") . "\" " . $checked . " class=\"" . $klass . "\">");
+ $inputs->push("<input type=\"radio\" name=\"" . $row_id . "[to_pick]\" value=\"" . _hx_string_rec($q, "") . "\" " . $checked . " class=\"" . $klass . "\"\x0A\x09\x09\x09\x09onclick='onPick(this);'\x0A\x09\x09\x09\x09>");
$inputs->push(ItemScheduler_4($this, $_g, $_g1, $available, $checked, $current_pick, $differs, $inputs, $klass, $last_available, $left, $maxQuantity, $order, $picked, $q, $quantity, $row_id, $user_pick));
$inputs->push("</input>");
if($last_available) {
}
+ function onPick(element) {
+ /* horible hack but it works */
+ /* in the way it call an Ajax request */
+ var row = $(element).closest('tr')[0];
+ var table = $(element).closest('table')[0];
+ onDrop(table, row);
+
+ }
+
var inserts = {
'#item_schedule table': function (e) {
$(e).tableDnD({onDragStart: onDragStart, onDrop: onDrop})