Closed cjolif closed 12 years ago
More analysis with Ed: On the original application the list is cleared only when switching to another view.
The selected item is being moved to the Completed list immediately, and if an item in the completed list is un-selected it is immediately moved back to it's parent's list. But we could wait until you leave the page to move the items.
In order to do that we would need to be notified when leaving a list, I tried adding beforeDeactivate and afterDeactivate to items/lists.js, but I did not see them being called when transitioning away from the page.
If a view transition out, the beforeDeactivate()/afterDeactivate() method will not call. refresh a view only call it's beforeActivate() and afterActicate() methods, here is an operation of refresh the list view.
Then what is the recommended way to get notified when transitioning out of a view?
So how can a view know that it is being transitioned out?
Ok, so I have more information about beforeDeactivate()/afterDeactivate() being called. If I start out showing a list with #items,list (say Reminders list), and i select "Lists" to go to #configuration,configure. I will not see beforeDeactivate()/afterDeactivate() called in list.js. But it will be called if I select Work Items. That seems odd to me, I would have expected it to be called when going to #configuration,configure, not when going back to #items,list.
With my latest update checked items will be left in the list until an item is selected, it should be moved to the completed list when a different list is selected, but it is not working quite right yet because the deactivate is not getting called until you are going back to the same list. For example, if you bring up the name page with index-phone.html, and go ahead and select Lists and Reminders. Then Check one or more items. Then Select Completed, when you see the Completed list it will be empty, but if you switch back to Reminders, and then back to Completed the items will be there.
here the item is entirely removed. It should probably just be "ticked" until it is entirely deleted? (delete button).