catsbap/www — pull request #47 by littleberry (2013-11-23 04:34:16+00:00)
Title: timesheets delete items

Code is there, but not working yet. Not sure why. I think it is in the Timesheet_Item deleteTimesheetItem method. Make sure to sync code before checking. Basically, when an x button on a timesheet row is clicked, it triggers the saveTimesheet function (JS) and sends along the row to be deleted. The row is also removed from the ui. If there are deletedItems, then they are included in the POST var with the rest of the items to save (if not, a 0 is sent in place). In timesheets.php, there is an if statement that looks if there are items to delete and deletes them. (This is after the data sent was decoded from JSON.) It loops through the items and calls the deleteTimesheetItem method. As far as I can tell, the method is getting the correct data. But I can't tell that it's working. It also doesn't seem to work with hard coded data, either.