Parse POST data.
authorMaxime Bourget <bmx007@gmail.com>
Sat, 1 Jun 2013 16:28:49 +0000 (17:28 +0100)
committerMaxime Bourget <bmx007@gmail.com>
Sat, 1 Jun 2013 16:28:49 +0000 (17:28 +0100)
haxe/ItemScheduler.hx

index 06b0b9c0fe13810bdc3f37b35c686dccfad322cb..c767bda6fd592e2b43a65c19251f81cddbcbb40a 100644 (file)
@@ -20,14 +20,26 @@ class ScheduleParameters {
                        rowDetails = new Hash<Detail>();
                        var position = 1;
                        for(id in row_ids) {
+                               var d : Dynamic = data.get(id);
+                               //var o = php.Lib.objectOfAssociativeArray(d);
+                               php.Lib.dump(d);
+                               php.Lib.print('<br>');
+
+                               var quantity : Int = null;
+                               if(d != null) {
+                                               var o = php.Lib.objectOfAssociativeArray(d);
+                                               quantity = Std.parseInt(o.quantity);
+                               }
+                               
+
                                rowDetails.set(id, {
                                        id: id
-                                       ,quantity: null
+                                       ,quantity: quantity
                                        ,position: position++
                                        });
                        }
                }
-               php.Lib.dump(rowDetails);
+               //php.Lib.dump(rowDetails);
        }
 
 public function position(id: String) : Int {