mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-22 03:05:28 +01:00
16 lines
789 B
JavaScript
16 lines
789 B
JavaScript
|
(function($) {
|
||
|
'use strict';
|
||
|
var iconTochange;
|
||
|
dragula([document.getElementById("dragula-left"), document.getElementById("dragula-right")]);
|
||
|
dragula([document.getElementById("profile-list-left"), document.getElementById("profile-list-right")]);
|
||
|
dragula([document.getElementById("dragula-event-left"), document.getElementById("dragula-event-right")])
|
||
|
.on('drop', function(el) {
|
||
|
console.log($(el));
|
||
|
iconTochange = $(el).find('.mdi');
|
||
|
if (iconTochange.hasClass('mdi-check')) {
|
||
|
iconTochange.removeClass('mdi-check text-primary').addClass('mdi-check-all text-success');
|
||
|
} else if (iconTochange.hasClass('mdi-check-all')) {
|
||
|
iconTochange.removeClass('mdi-check-all text-success').addClass('mdi-check text-primary');
|
||
|
}
|
||
|
})
|
||
|
})(jQuery);
|