Re: [Radiant] Drag order extension with Radiant 0.9.1
Sweet! Will give it a whirl tomorrow. Wes On 8/9/10 11:27 PM, banane wrote: OK this seems to work for me. Master branch, http://github.com/banane/radiant-drag-order/ On Mon, Aug 9, 2010 at 7:49 PM, Wes Gamble we...@att.net mailto:we...@att.net wrote: FWIW, I've definitely verified that the position column on the Page model is being respected in the admin. page display. When a parent page's children are requested using Page#children, the position value is also respected (it appears that if two pages have the same position value, then the primary key order prevails). I can move pages around in the list at will by manipulating the position value directly. Sometimes, for whatever reason, the position columns of a set of pages at the same level are not being updated correctly. I haven't been able to figure out if it has to do with the direction in which the items are being moved or not. I see drag/drop failing occasionally with an error of the type: SELECT * FROM pages WHERE (slug LIKE ''internal-political-issue'%%') AND (pages.parent_id = 1) which is again some silly syntax issue where there are too many quotes in the WHERE clause. I suspect maybe two things are going on: 1) Whatever causes the SQL syntax error 2) When an error occurs, a proper rollback of the original order may not be done (which is how you might end up with duplicated position values) Wes On 8/9/10 9:21 PM, Marshal Linfoot wrote: Anna, thank you. I'll be happy to test your changes. On Mon, Aug 9, 2010 at 10:12 PM, banane ban...@gmail.com mailto:ban...@gmail.com wrote: I'll try to rework mine. I got a pull request a few weeks ago from someone who'd merged branches. anna -- marshal
Re: [Radiant] Drag order extension with Radiant 0.9.1
No problem- needed to upgrade anyways! On Tue, Aug 10, 2010 at 8:21 AM, Wes Gamble we...@att.net wrote: This works great!!! Looks like everything works, including copying and placing items at the same level or making them children of other items. Thanks so much. Wes On 8/9/10 11:27 PM, banane wrote: OK this seems to work for me. Master branch, http://github.com/banane/radiant-drag-order/ On Mon, Aug 9, 2010 at 7:49 PM, Wes Gamble we...@att.net wrote: FWIW, I've definitely verified that the position column on the Page model is being respected in the admin. page display. When a parent page's children are requested using Page#children, the position value is also respected (it appears that if two pages have the same position value, then the primary key order prevails). I can move pages around in the list at will by manipulating the position value directly. Sometimes, for whatever reason, the position columns of a set of pages at the same level are not being updated correctly. I haven't been able to figure out if it has to do with the direction in which the items are being moved or not. I see drag/drop failing occasionally with an error of the type: SELECT * FROM pages WHERE (slug LIKE ''internal-political-issue'%%') AND (pages.parent_id = 1) which is again some silly syntax issue where there are too many quotes in the WHERE clause. I suspect maybe two things are going on: 1) Whatever causes the SQL syntax error 2) When an error occurs, a proper rollback of the original order may not be done (which is how you might end up with duplicated position values) Wes On 8/9/10 9:21 PM, Marshal Linfoot wrote: Anna, thank you. I'll be happy to test your changes. On Mon, Aug 9, 2010 at 10:12 PM, banane ban...@gmail.com wrote: I'll try to rework mine. I got a pull request a few weeks ago from someone who'd merged branches. anna -- marshal
Re: [Radiant] Drag order extension with Radiant 0.9.1
Marshal, I am seeing strange behavior in my installation of the drag extension as well. Wes On 8/8/10 1:43 PM, Marshal Linfoot wrote: Hi Wes. I have this one installed: http://github.com/squaretalent/radiant-drag-extension It works, but with some odd behaviour that I can work around. For example, if I have the following pages: Events event1 event3 event2 event4 and I drag event3 down between event2 and event4, I will often end up with something like Events event4 event1 event2 event3 or some other, seemingly random ordering. Usually I can get around it by creating a temporary/dummy page, getting the ordering right with the dummy page out of place, and then deleting the dummy page. I suspect my problem is drag not playing well with some other extension I have installed (don't have the skill set to debug it). The other problem is if I try to make a COPY of a page using drag, and the page to be copied has custom page parts from the PageFactory/PageParts extensions, the custom page parts are not copied correctly. Saw this also when I was testing the CustomFields extension. Hope this helps. -- marshal
Re: [Radiant] Drag order extension with Radiant 0.9.1
Anna, thank you. I'll be happy to test your changes. On Mon, Aug 9, 2010 at 10:12 PM, banane ban...@gmail.com wrote: I'll try to rework mine. I got a pull request a few weeks ago from someone who'd merged branches. anna -- marshal
Re: [Radiant] Drag order extension with Radiant 0.9.1
OK this seems to work for me. Master branch, http://github.com/banane/radiant-drag-order/ On Mon, Aug 9, 2010 at 7:49 PM, Wes Gamble we...@att.net wrote: FWIW, I've definitely verified that the position column on the Page model is being respected in the admin. page display. When a parent page's children are requested using Page#children, the position value is also respected (it appears that if two pages have the same position value, then the primary key order prevails). I can move pages around in the list at will by manipulating the position value directly. Sometimes, for whatever reason, the position columns of a set of pages at the same level are not being updated correctly. I haven't been able to figure out if it has to do with the direction in which the items are being moved or not. I see drag/drop failing occasionally with an error of the type: SELECT * FROM pages WHERE (slug LIKE ''internal-political-issue'%%') AND (pages.parent_id = 1) which is again some silly syntax issue where there are too many quotes in the WHERE clause. I suspect maybe two things are going on: 1) Whatever causes the SQL syntax error 2) When an error occurs, a proper rollback of the original order may not be done (which is how you might end up with duplicated position values) Wes On 8/9/10 9:21 PM, Marshal Linfoot wrote: Anna, thank you. I'll be happy to test your changes. On Mon, Aug 9, 2010 at 10:12 PM, banane ban...@gmail.com wrote: I'll try to rework mine. I got a pull request a few weeks ago from someone who'd merged branches. anna -- marshal
[Radiant] Drag order extension with Radiant 0.9.1
All, Radiant 0.9.1 Have tried both http://github.com/bright4/radiant-drag-order and http://github.com/banane/radiant-drag-order/commit/532a45149c3a1654f4d5508946630549587583e0 to get drag and drop content ordering working. Both installations show the 3-bar ordering icon but nothing happens when I click and drag. Any known issues on Radiant 0.9.1? Anyone know of a fork that works on Radiant 0.9.1? Many thanks, Wes
Re: [Radiant] Drag order extension with Radiant 0.9.1
I ended up publishing my own repo. with a version that works. See: http://github.com/weyus/radiant-drag-order What I learned is that the github graph can be dragged, and so I ended up at this most promising repo: http://github.com/gerrit/radiant-drag-order which is the one that I forked from. The copy functionality doesn't work, however. It generates bad SQL like: SQLite3::SQLException: near prospecting: syntax error: SELECT * FROM pages WHERE (slug LIKE ''prospecting-mechanics'%%') AND (pages.parent_id = 1) where clearly the single quotes in the first part of the predicate are incorrect. I don't need the copy functionality, and unfortunately, I don't have time to fix it, but it looks pretty straightforward to fix. See: page_controller_extensions.rb and page_extensions.rb. Wes Hi Wes. I have this one installed: http://github.com/squaretalent/radiant-drag-extension http://github.com/squaretalent/radiant-drag-extensionIt works, but with some odd behaviour that I can work around. For example, if I have the following pages: Events event1 event3 event2 event4 and I drag event3 down between event2 and event4, I will often end up with something like Events event4 event1 event2 event3 or some other, seemingly random ordering. Usually I can get around it by creating a temporary/dummy page, getting the ordering right with the dummy page out of place, and then deleting the dummy page. I suspect my problem is drag not playing well with some other extension I have installed (don't have the skill set to debug it). The other problem is if I try to make a COPY of a page using drag, and the page to be copied has custom page parts from the PageFactory/PageParts extensions, the custom page parts are not copied correctly. Saw this also when I was testing the CustomFields extension. Hope this helps. -- marshal