assets/dashboard/vendor/html5sortable.js
function (sortableElement) {
        var opts = addData(sortableElement, 'opts');
        var items = _filter(sortableElement.children, opts.items);
        var handles = _getHandles(items, opts.handle);
        addAttribute(sortableElement, 'aria-dropeffect', 'move');
        addData(sortableElement, '_disabled', 'false');
        addAttribute(handles, 'draggable', 'true');
        // @todo: remove this fix
        // IE FIX for ghost
        // can be disabled as it has the side effect that other events
        // (e.g. click) will be ignored
        if (opts.disableIEFix === false) {
            var spanEl = (document || window.document).createElement('span');
            if (typeof spanEl.dragDrop === 'function') {
                addEventListener(handles, 'mousedown', function () {
                    if (items.indexOf(this) !== -1) {
                        this.dragDrop();
                    }
                    else {
                        var parent = this.parentElement;
                        while (items.indexOf(parent) === -1) {
                            parent = parent.parentElement;
                        }
                        parent.dragDrop();
                    }
                });
            }
        }
    }
function (sortableElement) {
        var opts = addData(sortableElement, 'opts');
        var items = _filter(sortableElement.children, opts.items);
        var handles = _getHandles(items, opts.handle);
        addAttribute(sortableElement, 'aria-dropeffect', 'move');
        addData(sortableElement, '_disabled', 'false');
        addAttribute(handles, 'draggable', 'true');
        // @todo: remove this fix
        // IE FIX for ghost
        // can be disabled as it has the side effect that other events
        // (e.g. click) will be ignored
        if (opts.disableIEFix === false) {
            var spanEl = (document || window.document).createElement('span');
            if (typeof spanEl.dragDrop === 'function') {
                addEventListener(handles, 'mousedown', function () {
                    if (items.indexOf(this) !== -1) {
                        this.dragDrop();
                    }
                    else {
                        var parent = this.parentElement;
                        while (items.indexOf(parent) === -1) {
                            parent = parent.parentElement;
                        }
                        parent.dragDrop();
                    }
                });
            }
        }
    }
function ( sortableElement ) { var opts = addData ( sortableElement , 'opts' ) ; var items = _filter ( sortableElement . children , opts . items ) ; var handles = _getHandles ( items , opts . handle ) ; addAttribute ( sortableElement , 'aria-dropeffect' , 'move' ) ; addData ( sortableElement , '_disabled' , 'false' ) ; addAttribute ( handles , 'draggable' , 'true' ) ; // @todo: remove this fix // IE FIX for ghost // can be disabled as it has the side effect that other events // (e.g. click) will be ignored if ( opts . disableIEFix === false ) { var spanEl = ( document || window . document ) . createElement ( 'span' ) ; if ( typeof spanEl . dragDrop === 'function' ) { addEventListener ( handles , 'mousedown' , function ( ) { if ( items . indexOf ( this ) !== - 1 ) { this . dragDrop ( ) ; } else { var parent = this . parentElement ; while ( items . indexOf ( parent ) === - 1 ) { parent = parent . parentElement ; } parent . dragDrop ( ) ; } } ) ; } } }
Enable the sortable
@param {HTMLElement} sortableElement a single sortable
Enable the sortable