Skip to content

Commit

Permalink
Enable text search for JournalEntryPage sub-type fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dev7355608 committed Jun 26, 2024
1 parent 7de563e commit 684eb71
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions module/data/journal/class.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,33 @@ export default class ClassJournalPageData extends foundry.abstract.DataModel {
item: new foundry.data.fields.StringField({required: true, label: "JOURNALENTRYPAGE.DND5E.Class.Item"}),
description: new foundry.data.fields.SchemaField({
value: new foundry.data.fields.HTMLField({
textSearch: true,
label: "JOURNALENTRYPAGE.DND5E.Class.Description",
hint: "JOURNALENTRYPAGE.DND5E.Class.DescriptionHint"
}),
additionalHitPoints: new foundry.data.fields.HTMLField({
textSearch: true,
label: "JOURNALENTRYPAGE.DND5E.Class.AdditionalHitPoints",
hint: "JOURNALENTRYPAGE.DND5E.Class.AdditionalHitPointsHint"
}),
additionalTraits: new foundry.data.fields.HTMLField({
textSearch: true,
label: "JOURNALENTRYPAGE.DND5E.Class.AdditionalTraits",
hint: "JOURNALENTRYPAGE.DND5E.Class.AdditionalTraitsHint"
}),
additionalEquipment: new foundry.data.fields.HTMLField({
textSearch: true,
label: "JOURNALENTRYPAGE.DND5E.Class.AdditionalEquipment",
hint: "JOURNALENTRYPAGE.DND5E.Class.AdditionalEquipmentHint"
}),
subclass: new foundry.data.fields.HTMLField({
textSearch: true,
label: "JOURNALENTRYPAGE.DND5E.Class.SubclassDescription",
hint: "JOURNALENTRYPAGE.DND5E.Class.SubclassDescriptionHint"
})
}),
subclassHeader: new foundry.data.fields.StringField({
textSearch: true,
label: "JOURNALENTRYPAGE.DND5E.Class.SubclassHeader"
}),
subclassItems: new foundry.data.fields.SetField(new foundry.data.fields.StringField(), {
Expand Down
2 changes: 1 addition & 1 deletion module/data/journal/rule.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class RuleJournalPageData extends foundry.abstract.DataModel {
/** @inheritDoc */
static defineSchema() {
return {
tooltip: new HTMLField({label: "DND5E.Rule.Tooltip"}),
tooltip: new HTMLField({textSearch: true, label: "DND5E.Rule.Tooltip"}),
type: new StringField({blank: false, initial: "rule", label: "DND5E.Rule.Type.Label"})
};
}
Expand Down
2 changes: 1 addition & 1 deletion module/data/journal/spells.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class SpellListJournalPageData extends foundry.abstract.DataModel
hint: "JOURNALENTRYPAGE.DND5E.SpellList.Grouping.Hint"
}),
description: new SchemaField({
value: new HTMLField({label: "DND5E.Description"})
value: new HTMLField({textSearch: true, label: "DND5E.Description"})
}),
spells: new SetField(new StringField(), {label: "DND5E.ItemTypeSpellPl"}),
unlinkedSpells: new ArrayField(new SchemaField({
Expand Down
1 change: 1 addition & 0 deletions module/data/journal/subclass.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default class SubclassJournalPageData extends foundry.abstract.DataModel
item: new foundry.data.fields.StringField({required: true, label: "JOURNALENTRYPAGE.DND5E.Subclass.Item"}),
description: new foundry.data.fields.SchemaField({
value: new foundry.data.fields.HTMLField({
textSearch: true,
label: "JOURNALENTRYPAGE.DND5E.Class.Description",
hint: "JOURNALENTRYPAGE.DND5E.Class.DescriptionHint"
})
Expand Down

0 comments on commit 684eb71

Please sign in to comment.