-
+
diff --git a/public/scripts/BulkEditOverlay.js b/public/scripts/BulkEditOverlay.js
index 8da4dc86b..48d95e68b 100644
--- a/public/scripts/BulkEditOverlay.js
+++ b/public/scripts/BulkEditOverlay.js
@@ -40,7 +40,7 @@ class CharacterContextMenu {
* Tag one or more characters,
* opens a popup.
*
- * @param selectedCharacters
+ * @param {Array} selectedCharacters
*/
static tag = (selectedCharacters) => {
BulkTagPopupHandler.show(selectedCharacters);
@@ -49,7 +49,7 @@ class CharacterContextMenu {
/**
* Duplicate one or more characters
*
- * @param characterId
+ * @param {number} characterId
* @returns {Promise}
*/
static duplicate = async (characterId) => {
@@ -74,7 +74,7 @@ class CharacterContextMenu {
* Favorite a character
* and highlight it.
*
- * @param characterId
+ * @param {number} characterId
* @returns {Promise}
*/
static favorite = async (characterId) => {
@@ -110,7 +110,7 @@ class CharacterContextMenu {
* Convert one or more characters to persona,
* may open a popup for one or more characters.
*
- * @param characterId
+ * @param {number} characterId
* @returns {Promise}
*/
static persona = async (characterId) => await convertCharacterToPersona(characterId);
@@ -119,8 +119,8 @@ class CharacterContextMenu {
* Delete one or more characters,
* opens a popup.
*
- * @param characterId
- * @param deleteChats
+ * @param {number} characterId
+ * @param {boolean} [deleteChats]
* @returns {Promise}
*/
static delete = async (characterId, deleteChats = false) => {
@@ -234,7 +234,7 @@ class BulkTagPopupHandler {
/**
* Append and show the tag control
*
- * @param characterIds - The characters assigned to this control
+ * @param {Array} characterIds - The characters assigned to this control
*/
static show(characterIds) {
if (characterIds.length == 0) {
@@ -250,7 +250,7 @@ class BulkTagPopupHandler {
// Print the tag list with all mutuable tags, marking them as removable. That is the initial fill
printTagList($('#bulkTagList'), { tags: () => this.getMutualTags(characterIds), tagOptions: { removable: true } });
- // Tag input with empty tags so new tag gets added and it doesn't get emptied on redraw
+ // Tag input with resolvable list for the mutual tags to get redrawn, so that newly added tags get sorted correctly
createTagInput('#bulkTagInput', '#bulkTagList', { tags: () => this.getMutualTags(characterIds), tagOptions: { removable: true }});
document.querySelector('#bulk_tag_popup_reset').addEventListener('click', this.resetTags.bind(this, characterIds));
@@ -258,6 +258,12 @@ class BulkTagPopupHandler {
document.querySelector('#bulk_tag_popup_cancel').addEventListener('click', this.hide.bind(this));
}
+ /**
+ * Builds a list of all tags that the provided characters have in common.
+ *
+ * @param {Array} characterIds - The characters to find mutual tags for
+ * @returns {Array