On Tuesday, April 16, 2013 6:31:35 AM UTC-3, advantage+ wrote:
What I am trying to do is create a standard pagination set, but the user has the ability to delete a record using AJAX.
So if on page/2 for example standard pagination gets this data:
array(
'page' => (int) 2,
'current' => (int) 20,
'count' => (int) 221,
'prevPage' => true,
'nextPage' => true,
'pageCount' => (int) 12,
'order' => null,
'limit' => (int) 20,
'options' => array(
'page' => (int) 2,
'conditions' => array()
),
'paramType' => 'named'
)
What I need to do is if user using ajax deletes say record 25, that row slides / removed from DOM,
I need to now grab the next record which in this case id 41 (Page 2 of 12, showing 20 records out of 221 total, starting on record 21, ending on 40) and add it to the current pagination set.
Basically calling the pagination function after the user deletes the record but grab the next record inline and update the paging count / records, and append the new record to the bottom so there are still the 'limit' => (int) 20, in play.
Any ideas how to accomplish this?
Thanks,
Dave
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment