I wish I could show the page but I can't (it is a cms that is protected). Here is the code:
This one reverts. // drag and drop content items in content_right $("#contentSortContainerLeft").Sortable({ accept: 'entry-block', activeclass: 'sortableactive', hoverclass: 'sortablehover', helperclass: 'sorthelper', containment: 'sortableContainer', opacity: 0.4, fx: 200, axis: 'vertically', floats: true, ghosting: false, onStop: function(){ var hash = $.SortSerialize('contentSortContainerLeft').hash; $.ajax({ type: "POST", url: "/cms/ajax/saveSort/", data: hash + "&itemType=content", success: function(result){ if(String(result.responseText).length > 0) alert( result.responseText); }}); } }); This one works fine. See any differences? Me either (other than css classes). // drag and drop nav items $("#left > div.sortables").Sortable({ accept: 'file-block', activeClass: 'file-block-hover', opacity: 0.4, fx: 200, axis: 'vertically', floats: true, ghosting: false, onStop: function(){ var hash = $.SortSerialize('sortableContainer').hash; $.ajax({ type: "POST", url: "/cms/ajax/saveSort/", data: hash + "&itemType="+__itemType, success: function(result){ if(String(result.responseText).length > 0) alert( result.responseText); }}); } }); And I even tried this one (with different css names that is). $('ul').Sortable( { accept : 'sortableitem', helperclass : 'sorthelper', activeclass : 'sortableactive', hoverclass : 'sortablehover', opacity: 0.8, fx: 200, axis: 'vertically', opacity: 0.4, revert: true } ) That is from the demos (http://interface.eyecon.ro/demos/sort_lists.html). The html is basically the same. These are draggable divs. The dragging works, it just automatically puts it right back into the same position as it started until I do a hard refresh. On 4/22/07, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote:
John, >Hello? Anyone? Your description w/out code to reference is pretty vague. I would guess you'd get more help if you provide a link to the page that's causing the problem--or an example of the problem. -Dan >On 4/21/07, John C. Bland II <[EMAIL PROTECTED]> wrote: > > Ok...this one is dumb but it is happening and I can't see where/why. > > Same exact code is copied/pasted then tweaked slightly. The tweak is >merely a change of which container ID to target and the css classes for >respective elements (entry-block vs file-block, etc). > > Now...in one place the sort works just fine. I have an Ajax call that >hits the server and saves the sort. > > In the other two places the sort immediately reverts to the original >order BUT the Ajax call is completed and refreshing the page shows the new >sort. > > I've tried every parameter shown on the docs screen. I copied the >code (including some of the css) exactly from the examples on the Interface >site...same result. > > Can someone help with this and add a glimmer of hope for interface in >our mind? (right now it has a pretty bad rating) > > -- > John C. Bland II > Chief Geek > Katapult Media, Inc. - www.katapultmedia.com ><http://www.katapultmedia.com/> > --- > Biz Blog - http://blogs.katapultmedia.com/jb2 > Personal Blog - http://blog.blandfamilyonline.com ><http://blog.blandfamilyonline.com/> > http://www.lifthimhigh.com <http://www.lifthimhigh.com/> - >"Christian Products for Those Bold Enough to Wear Them" > Home of FMUG.az - http://www.gotoandstop.org ><http://www.gotoandstop.org/> > Home of AZCFUG - http://www.azcfug.org <http://www.azcfug.org/> > > > > >-- >John C. Bland II >Chief Geek >Katapult Media, Inc. - www.katapultmedia.com >--- >Biz Blog - http://blogs.katapultmedia.com/jb2 ><http://blogs.katapultmedia.com/jb2> >Personal Blog - http://blog.blandfamilyonline.com >http://www.lifthimhigh.com - "Christian Products for Those Bold Enough to >Wear Them" >Home of FMUG.az - http://www.gotoandstop.org >Home of AZCFUG - http://www.azcfug.org
-- John C. Bland II Chief Geek Katapult Media, Inc. - www.katapultmedia.com --- Biz Blog - http://blogs.katapultmedia.com/jb2 Personal Blog - http://blog.blandfamilyonline.com http://www.lifthimhigh.com - "Christian Products for Those Bold Enough to Wear Them" Home of FMUG.az - http://www.gotoandstop.org Home of AZCFUG - http://www.azcfug.org