dist/hashedit.js
function() {

      var x, y, els, div, span, el, item, obj, menu, sortable, a;

      sortable = hashedit.config.sortable;

      // walk through sortable clases
      for (x = 0; x < sortable.length; x += 1) {

        // setup sortable classes
        els = document.querySelectorAll('[hashedit] ' + sortable[x]);

        // set [data-hashedit-sortable=true]
        for (y = 0; y < els.length; y += 1) {

          // add attribute
          els[y].setAttribute('hashedit-sortable', '');

        }

      }

      // wrap elements in the sortable class
      els = document.querySelectorAll('[hashedit-sortable] > *');

      // wrap editable items
      for (y = 0; y < els.length; y += 1) {

        hashedit.setupElementMenu(els[y]);

      }

      // get all sortable elements
      els = document.querySelectorAll('[hashedit] [hashedit-sortable]');

      // walk through elements
      for (x = 0; x < els.length; x += 1) {

        el = els[x];

        obj = new Sortable(el, {
          group: "hashedit-sortable", // or { name: "...", pull: [true, false, clone], put: [true, false, array] }
          sort: true, // sorting inside list
          delay: 0, // time in milliseconds to define when the sorting should start
          disabled: false, // Disables the sortable if set to true.
          store: null, // @see Store
          animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
          handle: ".hashedit-move", // Drag handle selector within list items
          ghostClass: "hashedit-highlight", // Class name for the drop placeholder

          scroll: true, // or HTMLElement
          scrollSensitivity: 30, // px, how near the mouse must be to an edge to start scrolling.
          scrollSpeed: 10, // px

          // dragging ended
          onEnd: function(evt) {

            // get item
            item = evt.item;

            // handle empty
            hashedit.setupEmpty();

          }

        });

      }

      // set the display of empty columns
      hashedit.setupEmpty();

    }
function() {

      var x, y, els, div, span, el, item, obj, menu, sortable, a;

      sortable = hashedit.config.sortable;

      // walk through sortable clases
      for (x = 0; x < sortable.length; x += 1) {

        // setup sortable classes
        els = document.querySelectorAll('[hashedit] ' + sortable[x]);

        // set [data-hashedit-sortable=true]
        for (y = 0; y < els.length; y += 1) {

          // add attribute
          els[y].setAttribute('hashedit-sortable', '');

        }

      }

      // wrap elements in the sortable class
      els = document.querySelectorAll('[hashedit-sortable] > *');

      // wrap editable items
      for (y = 0; y < els.length; y += 1) {

        hashedit.setupElementMenu(els[y]);

      }

      // get all sortable elements
      els = document.querySelectorAll('[hashedit] [hashedit-sortable]');

      // walk through elements
      for (x = 0; x < els.length; x += 1) {

        el = els[x];

        obj = new Sortable(el, {
          group: "hashedit-sortable", // or { name: "...", pull: [true, false, clone], put: [true, false, array] }
          sort: true, // sorting inside list
          delay: 0, // time in milliseconds to define when the sorting should start
          disabled: false, // Disables the sortable if set to true.
          store: null, // @see Store
          animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
          handle: ".hashedit-move", // Drag handle selector within list items
          ghostClass: "hashedit-highlight", // Class name for the drop placeholder

          scroll: true, // or HTMLElement
          scrollSensitivity: 30, // px, how near the mouse must be to an edge to start scrolling.
          scrollSpeed: 10, // px

          // dragging ended
          onEnd: function(evt) {

            // get item
            item = evt.item;

            // handle empty
            hashedit.setupEmpty();

          }

        });

      }

      // set the display of empty columns
      hashedit.setupEmpty();

    }
function ( ) { var x , y , els , div , span , el , item , obj , menu , sortable , a ; sortable = hashedit . config . sortable ; // walk through sortable clases for ( x = 0 ; x < sortable . length ; x += 1 ) { // setup sortable classes els = document . querySelectorAll ( '[hashedit] ' + sortable [ x ] ) ; // set [data-hashedit-sortable=true] for ( y = 0 ; y < els . length ; y += 1 ) { // add attribute els [ y ] . setAttribute ( 'hashedit-sortable' , '' ) ; } } // wrap elements in the sortable class els = document . querySelectorAll ( '[hashedit-sortable] > *' ) ; // wrap editable items for ( y = 0 ; y < els . length ; y += 1 ) { hashedit . setupElementMenu ( els [ y ] ) ; } // get all sortable elements els = document . querySelectorAll ( '[hashedit] [hashedit-sortable]' ) ; // walk through elements for ( x = 0 ; x < els . length ; x += 1 ) { el = els [ x ] ; obj = new Sortable ( el , { group : "hashedit-sortable" , // or { name: "...", pull: [true, false, clone], put: [true, false, array] } sort : true , // sorting inside list delay : 0 , // time in milliseconds to define when the sorting should start disabled : false , // Disables the sortable if set to true. store : null , // @see Store animation : 150 , // ms, animation speed moving items when sorting, `0` — without animation handle : ".hashedit-move" , // Drag handle selector within list items ghostClass : "hashedit-highlight" , // Class name for the drop placeholder scroll : true , // or HTMLElement scrollSensitivity : 30 , // px, how near the mouse must be to an edge to start scrolling. scrollSpeed : 10 , // px // dragging ended onEnd : function ( evt ) { // get item item = evt . item ; // handle empty hashedit . setupEmpty ( ) ; } } ) ; } // set the display of empty columns hashedit . setupEmpty ( ) ; }
Adds a hashedit-sortable class to any selector in the sortable array, enables sorting
@param {Array} sortable
Adds a hashedit - sortable class to any selector in the sortable array enables sorting