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!