From: Maxime Bourget Date: Sat, 1 Jun 2013 09:37:03 +0000 (+0100) Subject: Sending form tho Ajax X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=725ee2cbbf14949ba2bdebdb6c2bda560580cb9f;p=order_line_extra.git Sending form tho Ajax --- diff --git a/item_schedule.php b/item_schedule.php index e5115b1..8fb4247 100644 --- a/item_schedule.php +++ b/item_schedule.php @@ -128,15 +128,16 @@ tr.tDnD_whileDrag :nth-child(4), tr.tDnD_whileDrag :nth-child(5) { console.log(row) } function onDrop(table, row) { - console.log(table) - console.log(row) + var row_ids = $.map(table.tBodies[0].rows, function(r) { return r.id} ) + var row_id = row.id + var form = $(table).closest('form')[0] + JsHttpRequest.request(this, form); + } var inserts = { '#item_schedule table': function (e) { - // We can't use e directly because we need a JQUery Object to call tableDnD - - $('#item_schedule table').tableDnD({onDragStart: onDragStart, onDrop: onDrop}) + $(e).tableDnD({onDragStart: onDragStart, onDrop: onDrop}) } } Behaviour.register(inserts);