From 2e79f3e2a79e184dbf56f7b3a0b754f2dee6bad2 Mon Sep 17 00:00:00 2001 From: Maxime Bourget Date: Sat, 1 Jun 2013 11:46:47 +0100 Subject: [PATCH] onDrop send data to backend. --- haxe/ItemScheduler.hx | 7 ++++--- item_schedule.php | 22 ++++++++++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/haxe/ItemScheduler.hx b/haxe/ItemScheduler.hx index b86ab86..be596ac 100644 --- a/haxe/ItemScheduler.hx +++ b/haxe/ItemScheduler.hx @@ -127,7 +127,8 @@ class ItemScheduler { } function formatOrder(order : Dynamic, left : Int, date : Date) { - var attributes = ['id = "order_'+order.id+'"']; + var row_id = 'order_'+order.id; + var attributes = ['id = "'+row_id+'"']; var classes = []; var before : Int = left + order.quantity; /* We have basically 3 different cases; @@ -159,7 +160,7 @@ class ItemScheduler { var cells : Array = [ order.order_id , ''+order.deliver_to+'' - ,order.quantity + ,'' ,before ,left ,order.from_stk_loc @@ -184,7 +185,7 @@ class ItemScheduler { var cells : Array = [ array.get('order_id') ,array.get('deliver_to') - ,quantity + ,''+quantity+'' ,quantity_available-quantity ,quantity_available ,array.get('from_stk_loc') diff --git a/item_schedule.php b/item_schedule.php index 8fb4247..7276bdc 100644 --- a/item_schedule.php +++ b/item_schedule.php @@ -31,11 +31,13 @@ page($_SESSION['page_title'], false, false, "", $js); //--------------------------------------------------------------------------------------------- +div_start('item_schedule'); start_form(); start_table(TABLESTYLE_NOBORDER); start_row(); +echo date('h:i:s
',time()); ?>GETPOSTactivate('item_schedule'); +if (in_ajax()) + $Ajax->activate('item_schedule'); //if (!@$_GET['popup']) start_form(); @@ -65,7 +70,6 @@ end_table(1); $scheduler = new ItemScheduler($stock_id, 'DEF'); -div_start('item_schedule'); start_table(TABLESTYLE); $th = $scheduler->tableHeader(); @@ -74,7 +78,6 @@ table_header($th); $scheduler->generateTable(); end_table(); -div_end(); submit_center_first('Update', _("Update"), '', 'default', false); @@ -83,6 +86,7 @@ submit_center_last('Cancel', _("Cancel"), '', 'cancel', false); end_form(); +div_end(); end_page(); ?>