Thank you! That works great! I added it to my onComplete statement
for those who need it for future reference:
$$('.categoryHandle').addEvent('mousedown', function(){
var sortCategories = new Sortables($('categoryList'), {
opacity: 1,
initialize: function(){
clone: true
},
onDragStart: function(element, ghost){
ghost.setStyle('opacity', .95);
ghost.setStyle('background-color', '#C74635');
ghost.setStyle('width', '750px')
},
onComplete: function(){
var catOrder = this.serialize(function(cat){
return cat.id
});
var catOrder_url="process.php?
process=categoryListOrder&order="+catOrder;
new Ajax(catOrder_url).request();
sortCategories.detach();
}
});
});
On Sep 18, 10:42 am, "Nathan White" <[EMAIL PROTECTED]> wrote:
> http://docs.mootools.net/Plugins/Sortables#Sortables:detach
>
> On Thu, Sep 18, 2008 at 10:00 AM, WhoButSB <[EMAIL PROTECTED]> wrote:
>
> > So I just added a click event instead to initialize the sortable
> > function. it works great but now I just need to know how to de-
> > initialize / stop the sortables in the onComplete function. Any
> > thoughts?
>
> > On Sep 18, 8:48 am, WhoButSB <[EMAIL PROTECTED]> wrote:
> > > Hello All,
> > > I'm working on a sortable script which organizes a menus categories
> > > (ie. Appetizers, Entrees, Bar, Dessert, etc.). Users are able to drab
> > > and drop these categories into any way they want. The one issue i'm
> > > having is stopping the sortables event when the user wants to update a
> > > textbox fields and submit it with a button. Here is the script I'm
> > > using and I added a stop event script but mootools isn't applying this
> > > stop event to my text boxs and buttons. Am I missing something?
>
> > > new Sortables($('categoryList'), {
> > > opacity: 1,
> > > initialize: function(){
> > > clone: true,
> > > this.elements.each(function(element, i){
> > > $$('checkbox', '.delete', 'span', 'input',
> > > 'textarea').each(function(catinput){
> > > catinput.addEvents({
> > > 'click' : function(a){ new
> > Event(a).stop(); },
> > > 'mouseup' : function(a){ new
> > Event(a).stop(); },
> > > 'mousedown' : function(a){ new
> > Event(a).stop(); }
> > > });
> > > });
> > > });
> > > },
> > > onComplete: function(){
> > > var catOrder = this.serialize(function(cat){
> > > return cat.id
> > > });
> > > var catOrder_url="process.php?
> > > process=categoryListOrder&order="+catOrder;
> > > new Ajax(catOrder_url).request();
> > > }
>
> > > });
>
> > > Thanks for the help!