Disable bulk edit for bogus folders

This commit is contained in:
Cohee 2023-11-10 22:18:48 +02:00
parent 066f74ed46
commit 7e2ec3ea43
3 changed files with 10 additions and 5 deletions

View File

@ -5,11 +5,13 @@
background-color: rgba(170, 170, 170, 0.15);
}
#rm_print_characters_block.group_overlay_mode_select .bogus_folder_select,
#rm_print_characters_block.group_overlay_mode_select .group_select {
cursor: auto;
filter: saturate(0.3);
}
#rm_print_characters_block.group_overlay_mode_select .bogus_folder_select:hover,
#rm_print_characters_block.group_overlay_mode_select .group_select:hover {
background: none;
}

View File

@ -996,10 +996,6 @@ function getTagBlock(item) {
template.find('.avatar').css({'background-color': item.color, 'color': item.color2 });
template.find('.ch_name').text(item.name);
template.find('.bogus_folder_counter').text(count);
template.on('click', () => {
console.log('Bogus folder clicked', item.id);
entitiesFilter.setFilterData(FILTER_TYPES.TAG, { excluded: [], selected: [item.id], bogus: true, });
});
return template;
}
@ -7524,6 +7520,12 @@ jQuery(async function () {
await selectCharacterById(id);
});
$(document).on("click", ".bogus_folder_select", function () {
const tagId = $(this).attr('tagid');
console.log('Bogus folder clicked', tagId);
entitiesFilter.setFilterData(FILTER_TYPES.TAG, { excluded: [], selected: [tagId], bogus: true, });
})
$(document).on("input", ".edit_textarea", function () {
scroll_holder = $("#chat").scrollTop();
$(this).height(0).height(this.scrollHeight);

View File

@ -287,6 +287,7 @@ class BulkEditOverlay {
static contextMenuId = 'character_context_menu';
static characterClass = 'character_select';
static groupClass = 'group_select';
static bogusFolderClass = 'bogus_folder_select';
static selectModeClass = 'group_overlay_mode_select';
static selectedClass = 'character_selected';
static legacySelectedClass = 'bulk_select_checkbox';
@ -527,7 +528,7 @@ class BulkEditOverlay {
#getEnabledElements = () => [...this.container.getElementsByClassName(BulkEditOverlay.characterClass)];
#getDisabledElements = () =>[...this.container.getElementsByClassName(BulkEditOverlay.groupClass)];
#getDisabledElements = () =>[...this.container.getElementsByClassName(BulkEditOverlay.groupClass), ...this.container.getElementsByClassName(BulkEditOverlay.bogusFolderClass)];
toggleCharacterSelected = event => {
event.stopPropagation();