diff --git a/data/spells/spells-grimoire-en.json b/data/spells/spells-grimoire-en.json index ab6e67e..4d9a885 100644 --- a/data/spells/spells-grimoire-en.json +++ b/data/spells/spells-grimoire-en.json @@ -76,6 +76,44 @@ "savingThrow": [""], "miscTags": ["", ""], "areaTags": ["", ""] + }, + { + "recid": 2, + "name": "Acid Splash", + "source": "GRI", + "page": 126, + "srd": true, + "level": 1, + "school": "I", + "time": [ + { + "number": 1, + "unit": "action" + } + ], + "range": { + "type": "point", + "distance": { + "type": "feet", + "amount": 60 + } + }, + "components": { + "v": true, + "s": true + }, + "duration": [ + { + "type": "instant" + } + ], + "desc": [ + "You hurl a bubble of acid. " + ], + "damageInflict": ["acid"], + "savingThrow": ["Dexterity"], + "miscTags": ["", ""], + "areaTags": ["", ""] } ] } diff --git a/data/spells/spells-grimoire-fr.json b/data/spells/spells-grimoire-fr.json index 039de9b..5e0b91a 100644 --- a/data/spells/spells-grimoire-fr.json +++ b/data/spells/spells-grimoire-fr.json @@ -76,6 +76,44 @@ "savingThrow": ["Constitution"], "miscTags": ["", ""], "areaTags": ["", ""] + }, + { + "recid": 2, + "name": "Aspersion acide", + "source": "GRI", + "page": 126, + "srd": true, + "level": 1, + "school": "I", + "time": [ + { + "number": 1, + "unit": "action" + } + ], + "range": { + "type": "point", + "distance": { + "type": "m", + "amount": 18 + } + }, + "components": { + "v": true, + "s": true + }, + "duration": [ + { + "type": "instant" + } + ], + "desc": [ + "Vous lancez une bulle d’acide. " + ], + "damageInflict": ["acid"], + "savingThrow": ["Dexterity"], + "miscTags": ["", ""], + "areaTags": ["", ""] } ] } diff --git a/js/spells.js b/js/spells.js index 6c06782..7ccc485 100644 --- a/js/spells.js +++ b/js/spells.js @@ -30,14 +30,20 @@ fetch(jsonsource) fixedBody: false, records: alldata, columns: [ - { field: "name", text: "Name", sortable: true, resizable: true,searchable: { operator: 'contains' }, }, + { + field: "name", + text: "Name", + sortable: true, + resizable: true, + searchable: { operator: "contains" }, + }, { field: "desc", text: "Description", size: "500%", style: "test", resizable: true, - searchable: { operator: 'contains' }, + searchable: { operator: "contains" }, render(record, extra) { return ( '' + @@ -46,20 +52,32 @@ fetch(jsonsource) ); }, }, - { field: "source", text: "Source", sortable: true, tooltip: 'Which book is this from ?',searchable: { operator: 'contains' } }, + { + field: "source", + text: "Source", + sortable: true, + tooltip: "Which book is this from ?", + searchable: { operator: "contains" }, + }, { field: "page", text: "Page", sortable: true }, { field: "level", text: "Level", sortable: true, size: 65 }, { field: "school", text: "School", sortable: true }, { - field: "components", text: "Components", render(record) { - var v = (record.components.v) ? 'V' : '' - var s = (record.components.s) ? 'S' : '' - var m = (record.components.m) ? record.components.m : '' - return v.concat() - if (record.components.v = true) { - console.log(record.components) + field: "components", + text: 'Components', + render(record) { + var v = record.components.v + ? 'V' + : ""; + var s = record.components.s ? 'S' : ""; + var m = record.components.m ? 'M' : ""; + //var m = record.components.m ? record.components.m : ""; + var vs=v.concat(', ',s); + return vs.concat(', ',m); + if ((record.components.v = true)) { + console.log(record.components); } - } + }, }, { field: "duration", text: "Duration" }, ], @@ -79,17 +97,12 @@ fetch(jsonsource) ])*/ console.log(record); }, - onRender(event) { - // TODO: find the event after grid generate the html end signal and apply loc - event.done(function(){ - console.log('object '+ this.name + ' is rendered'); - $("[data-localize]").localize("main", { pathPrefix: "lang" }); - }) + async onRefresh(event) { + await event.complete; + console.log("Le tableau est généré et le DOM est modifié."); + $("[data-localize]").localize("main", { pathPrefix: "lang" }); // mettre votre script ici + } - } - - }) - - }); - + }) + }); diff --git a/lang/main-en.json b/lang/main-en.json index f2add12..953c024 100644 --- a/lang/main-en.json +++ b/lang/main-en.json @@ -9,5 +9,10 @@ "btn-items": "Magic Items", "CUVD": "Unofficial site for Fateforge RPG. Uses copyrighted content © Agate RPG, courtesy of the publisher under the CUVD license.", "link": "Join the community: https://fateforge.org/en", - "verbal": "Verbal" + "verbal": "Verbal", + "somatic": "Somatic", + "gridColumns":{ + "components": "Components" + } + } diff --git a/lang/main-fr.json b/lang/main-fr.json index 078a737..f2709e0 100644 --- a/lang/main-fr.json +++ b/lang/main-fr.json @@ -9,5 +9,9 @@ "btn-items": "Objets Magiques", "CUVD": "Site non-officiel pour ​Dragons​ créé(e). Utilise des contenus protégés par la propriété intellectuelle © Agate RPG, avec l’aimable permission de l’éditeur dans le cadre de la licence CUVD.", "link": "Rejoignez la communauté : ​www.dragons-rpg.com", - "verbal": "Verbale" -} + "verbal": "Verbale", + "somatic": "Gestuelle", + "gridColumns":{ + "components": "Composants" + } +} \ No newline at end of file