Re: Manual sorting of data records (datasets)

2009-03-14 Thread hasentopf
Thanks for your suggestions. I added an extra field "rank" to save the new order. Now it works fine. Just one more thing: $ranks = $this->params['form']['sortable-table']; array_shift($ranks); I needed to add a array_shift(), because the jQuery-Plugin delivers an empty set at the beginning.

Re: Manual sorting of data records (datasets)

2009-03-14 Thread hasentopf
Thanks for your suggestions. I added an extra field "order" to save the new order. Now it works fine. Have a nice weekend! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send

Re: Manual sorting of data records (datasets)

2009-03-14 Thread Adam Royle
Something like this should work (as long as you include the RequestHandler component). Personally, I use an extra field "rank" in my table which is just an integer. if ($this->RequestHandler->isAjax() && !empty($this->params['form']['tableId'])) { foreach ($this->params['form']['tableId']

Re: Manual sorting of data records (datasets)

2009-03-13 Thread brian
On Fri, Mar 13, 2009 at 3:50 PM, hasentopf wrote: > > Hi all. > > One more question: > > I tried it with the "Table Drag and Drop JQuery plugin" from > http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/ > > The Plugin returns a string of the form "tableId[]=rowId1&tableId[] > =rowId

Re: Manual sorting of data records (datasets)

2009-03-13 Thread hasentopf
Hi all. One more question: I tried it with the "Table Drag and Drop JQuery plugin" from http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/ The Plugin returns a string of the form "tableId[]=rowId1&tableId[] =rowId2&tableId[]=rowId3…" via Ajax. I wrote an Action which receives thi

Re: Manual sorting of data records (datasets)

2009-02-24 Thread Adam Royle
Both protaculous and jquery (and prob most other js libraries) have a sortable function so you can drag and drop records (re-ordering) with your mouse, and a serialize function so you can send the re-ordered ids back to the server to update the database. I'm sure you could also do the move up/

Re: Manual sorting of data records (datasets)

2009-02-24 Thread hasentopf
Clicking on the table header is only temporary. I need a permanent solution which changes the order of the table. Something like: "Move up", "Move down", "Move to the top" and "Move to the bottom" Best Mathias On 24 Feb., 11:51, "Liebermann, Anja Carolin" wrote: > Hi Hasentopf, > > Do you thin

AW: Manual sorting of data records (datasets)

2009-02-24 Thread Liebermann, Anja Carolin
sorting of data records (datasets) Hi. Does anyone know a way for sorting records in a table manually by the user? It should be possible, to arrange the order of the data records by hand. Any suggestions? Best Mathias --~--~-~--~~~---~--~~ You received this

Manual sorting of data records (datasets)

2009-02-24 Thread hasentopf
Hi. Does anyone know a way for sorting records in a table manually by the user? It should be possible, to arrange the order of the data records by hand. Any suggestions? Best Mathias --~--~-~--~~~---~--~~ You received this message because you are subscribed to t