Både small-action-btn-group
och färgkodning med Bootstraps färger (exempelvis .nestable-primary
eller .nestable-success-outline
) går att använda.
var updateOutput = function() { console.log('UPDATED'); }
$('#nestable').nestable({
listNodeName : 'ol',
itemNodeName : 'li',
rootClass : 'nestable',
listClass : 'nestable-list',
itemClass : 'nestable-item',
dragClass : 'nestable-dragel',
handleClass : 'nestable-handle',
collapsedClass : 'nestable-collapsed',
placeClass : 'nestable-placeholder',
noDragClass : 'nestable-nodrag',
emptyClass : 'nestable-empty',
})
.on('change', updateOutput);
Bootstrap HTML5 Sortable verkar lite cleanare än Nestable, men saknade funktionaliteten
att kunna nesta objekt. Fast det kanske är möjligt här också med lite hack (jag vet inte jag kan inte Javascript å sånt coolt). Vill man inte nesta så känns det som att Bootstrap
HTML5 Sortable är mer najs i alla fall.
http://psfpro.github.io/bootstrap-html5sortable
Mvh,
/Antonsson
$('.card-sortable').sortable({
placeholderClass: 'col-sm-6 col-lg-4'
}).bind('sortupdate', function(e, ui) {
console.log('updated');
});
Att sortera i grid fungerar dåligt i dagsläget när man ska flytta runt objekt, på grund av positionering och höjden på objekten. Borde gå att lösa, får kolla på det.
Some quick example text to build on the card title and make up the bulk of the card's content.
Card link Another linkSome quick example text to build on the card title and make up the bulk of the card's content.
Card link Another linkSome quick example text to build on the card title and make up the bulk of the card's content.
Card link Another linkSome quick example text to build on the card title and make up the bulk of the card's content.
Card link Another linkSome quick example text to build on the card title and make up the bulk of the card's content.
Card link Another linkSome quick example text to build on the card title and make up the bulk of the card's content.
Card link Another link