Commit afa226bc by doszhang

dos

parent 7ac72ab9
...@@ -256,30 +256,30 @@ $(document).ready(function () { ...@@ -256,30 +256,30 @@ $(document).ready(function () {
// $('.flag-list-content').attr('id', 'flag-list-content'); // $('.flag-list-content').attr('id', 'flag-list-content');
// colorbarLeft = $('.colorbar').offset().left; // colorbarLeft = $('.colorbar').offset().left;
new Sortable(document.getElementById('flag-list-content'), { // new Sortable(document.getElementById('flag-list-content'), {
animation: 150, // animation: 150,
ghostClass: 'flag-sortable-ghost', // ghostClass: 'flag-sortable-ghost',
chosenClass: "flag-sortable-active", // chosenClass: "flag-sortable-active",
delay: 100, // delay: 100,
direction: 'horizontal', // direction: 'horizontal',
onChoose: function (event) { // onChoose: function (event) {
const dragEl = $(event.item); // const dragEl = $(event.item);
dragEl.find('.btn-checked-item-delete').css('color', '#fcfcfd'); // dragEl.find('.btn-checked-item-delete').css('color', '#fcfcfd');
}, // },
onChange: function (event) { // onChange: function (event) {
const dragEl = $(event.item); // const dragEl = $(event.item);
swapArray(flagStack, event.oldIndex, event.newIndex); // swapArray(flagStack, event.oldIndex, event.newIndex);
const nodeList = $('.flag-list-content .checked-item:not(.sortable-drag)'); // const nodeList = $('.flag-list-content .checked-item:not(.sortable-drag)');
$('.sortable-drag').find('.checked-flag-no').text(event.newIndex + 1); // $('.sortable-drag').find('.checked-flag-no').text(event.newIndex + 1);
for (let i = 0; i < nodeList.length; i++) { // for (let i = 0; i < nodeList.length; i++) {
$(nodeList[i]).find('.checked-flag-no').text(i + 1); // $(nodeList[i]).find('.checked-flag-no').text(i + 1);
} // }
}, // },
onEnd: function (event) { // onEnd: function (event) {
const dragEl = $(event.item); // const dragEl = $(event.item);
dragEl.find('.btn-checked-item-delete').css('color', '#c30101'); // dragEl.find('.btn-checked-item-delete').css('color', '#c30101');
} // }
}); // });
//跳转到page1 //跳转到page1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment