Thursday, July 28, 2016

How to get rubaxa Sortable and jeditable to work together

One of the problems I was having was how to get the rubaxa sortable library and jeditable library to work together.  In the end, searching on google only lead to disappointment as the existing answers only referenced a different sortable library (jquery-ui). 

Here's how I got rubaxa sortable and jeditable to work together.



    disableSortable = function(settings, self) {
        sortable.option('disabled', true);
    };

    enableSortable = function(settings, self) {
        sortable.option('disabled', false);
    };

     $(document).ready(function()
     {$('.edit').each(function()
        {$(this).editable('/present/edit',
            {
                event: 'dblclick',
                onblur: 'submit',
                onedit : disableSortable,
                onsubmit: enableSortable,
                onrevert: enableSortable

            });
        });
     });

1 comment:

  1. If you're trying to lose kilograms then you have to get on this totally brand new custom keto meal plan diet.

    To create this keto diet, licensed nutritionists, fitness trainers, and professional chefs joined together to develop keto meal plans that are useful, painless, price-efficient, and delightful.

    From their first launch in early 2019, 1000's of people have already transformed their body and health with the benefits a smart keto meal plan diet can offer.

    Speaking of benefits: in this link, you'll discover 8 scientifically-certified ones offered by the keto meal plan diet.

    ReplyDelete