From 4fb315bed31e6b02367b85f266ff70e9bb46563f Mon Sep 17 00:00:00 2001 From: opus1217 Date: Thu, 11 Feb 2021 20:47:43 -0800 Subject: [PATCH] 0.4.1h 11-Feb-2021 Feats seem to be working (missing fields) Items now showing NPCs operating erratically compendium-browser.js - Add the partials for npc, feat, item and the backing code *-browser-list.html: ADDED (partials for changing data) --- compendium-browser.js | 11 +++++++---- template/feat-browser-list.html | 17 +++++++++++++++++ template/feat-browser.html | 20 ++------------------ template/item-browser-list.html | 16 ++++++++++++++++ template/item-browser.html | 19 ++----------------- template/npc-browser-list.html | 21 +++++++++++++++++++++ template/npc-browser.html | 24 ++---------------------- 7 files changed, 67 insertions(+), 61 deletions(-) create mode 100644 template/feat-browser-list.html create mode 100644 template/item-browser-list.html create mode 100644 template/npc-browser-list.html diff --git a/compendium-browser.js b/compendium-browser.js index 6c596fd..4bcb971 100644 --- a/compendium-browser.js +++ b/compendium-browser.js @@ -20,7 +20,8 @@ 0.4.1c Needed to pass specific spellFilters, itemFilters etc. 0.4.1d: Fixed img observer on replaced spellData 11-Feb-2021 0.4.1e: Don't save the filter data (which is most of the memory) and remove the preload limit; instead just save the minimal amount of data - 0.4.1g: Generalize the spell list reload and confirm spells still working + 0.4.1g: Generalize the spell list reload and confirm spells still working + 0.4.1h: Add the partials for npc, feat, item and the backing code */ const CMPBrowser = { @@ -46,11 +47,13 @@ class CompendiumBrowser extends Application { }); //Plug await loadTemplates([ "modules/compendium-browser/template/spell-browser.html", - "modules/compendium-browser/template/spell-browser-list.html", -//FIXME: Add -list partials for rendering the data separately + "modules/compendium-browser/template/spell-browser-list.html", "modules/compendium-browser/template/npc-browser.html", + "modules/compendium-browser/template/npc-browser-list.html", "modules/compendium-browser/template/feat-browser.html", + "modules/compendium-browser/template/feat-browser-list.html", "modules/compendium-browser/template/item-browser.html", + "modules/compendium-browser/template/item-browser-list.html", "modules/compendium-browser/template/filter-container.html", "modules/compendium-browser/template/settings.html" ]); @@ -775,7 +778,7 @@ class CompendiumBrowser extends Application { } else if (itemType === 'npc') { items = html.find("ul#CBNPCs"); } else if (itemType === 'feat') { - items = html.find("ul#CBSpells"); + items = html.find("ul#CBFeats"); } else if (itemType === 'item') { items = html.find("ul#CBItems"); } diff --git a/template/feat-browser-list.html b/template/feat-browser-list.html new file mode 100644 index 0000000..35fdf09 --- /dev/null +++ b/template/feat-browser-list.html @@ -0,0 +1,17 @@ +{{#each feats as |feat id|}} +
  • +
    + +
    + +
    + {{feat.classRequirementString}} + +
    +
    + +
    +
  • +{{/each}} \ No newline at end of file diff --git a/template/feat-browser.html b/template/feat-browser.html index 34d8b94..2b3b493 100644 --- a/template/feat-browser.html +++ b/template/feat-browser.html @@ -15,24 +15,8 @@ {{> "modules/compendium-browser/template/filter-container.html" filters=featFilters}} -