tweaks on number inputs
This commit is contained in:
@@ -26,10 +26,20 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
/**
|
/**
|
||||||
* Handle dropped data on the Actor sheet
|
* Handle dropped data on the Actor sheet
|
||||||
*/
|
*/
|
||||||
// _onDrop(event) {
|
_onDrop(event) {
|
||||||
// console.log('*** event', event);
|
// Check item type and subtype
|
||||||
// return false;
|
const item = game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
// }
|
if (
|
||||||
|
!item ||
|
||||||
|
item.entity !== "Item" ||
|
||||||
|
!["item", "armor", "weapon", "technique", "peculiarity", "advancement"].includes(item.data.type)
|
||||||
|
) {
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ok add item
|
||||||
|
return super._onDrop(event);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to events from the sheet.
|
* Subscribe to events from the sheet.
|
||||||
@@ -38,9 +48,9 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
|
||||||
// *** Skills ***
|
// *** Dice event on Skills clic ***
|
||||||
html.find(".skill-name").on("click", (ev) => {
|
html.find(".skill-name").on("click", (event) => {
|
||||||
const li = $(ev.currentTarget).parents(".skill");
|
const li = $(event.currentTarget).parents(".skill");
|
||||||
new game.l5r5e.DicePickerDialog({
|
new game.l5r5e.DicePickerDialog({
|
||||||
skillId: li.data("skill"),
|
skillId: li.data("skill"),
|
||||||
skillCatId: li.data("skillcat"),
|
skillCatId: li.data("skillcat"),
|
||||||
@@ -53,30 +63,35 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// On focus on one numeric element, select all text for better experience
|
||||||
|
html.find(".select-on-focus").on("focus", (event) => {
|
||||||
|
event.target.select();
|
||||||
|
});
|
||||||
|
|
||||||
// *** Items : edit, delete ***
|
// *** Items : edit, delete ***
|
||||||
["item", "peculiarity", "technique", "advancement"].forEach((type) => {
|
["item", "peculiarity", "technique", "advancement"].forEach((type) => {
|
||||||
html.find(`.${type}-edit`).on("click", (ev) => {
|
html.find(`.${type}-edit`).on("click", (event) => {
|
||||||
this._editSubItem(ev, type);
|
this._editSubItem(event, type);
|
||||||
});
|
});
|
||||||
html.find(`.${type}-delete`).on("click", (ev) => {
|
html.find(`.${type}-delete`).on("click", (event) => {
|
||||||
this._deleteSubItem(ev, type);
|
this._deleteSubItem(event, type);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (type !== "item") {
|
if (type !== "item") {
|
||||||
html.find(`.${type}-curriculum`).on("click", (ev) => {
|
html.find(`.${type}-curriculum`).on("click", (event) => {
|
||||||
this._switchSubItemCurriculum(ev, type);
|
this._switchSubItemCurriculum(event, type);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// *** Items : add ***
|
// *** Items : add ***
|
||||||
html.find(".technique-add").on("click", (ev) => {
|
html.find(".technique-add").on("click", (event) => {
|
||||||
this._addSubItem({
|
this._addSubItem({
|
||||||
name: game.i18n.localize("l5r5e.techniques.title_new"),
|
name: game.i18n.localize("l5r5e.techniques.title_new"),
|
||||||
type: "technique",
|
type: "technique",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
html.find(".advancement-add").on("click", (ev) => {
|
html.find(".advancement-add").on("click", (event) => {
|
||||||
this._addSubItem({
|
this._addSubItem({
|
||||||
name: game.i18n.localize("l5r5e.advancements.title_new"),
|
name: game.i18n.localize("l5r5e.advancements.title_new"),
|
||||||
type: "advancement",
|
type: "advancement",
|
||||||
@@ -99,8 +114,8 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
* Edit a generic item with sub type
|
* Edit a generic item with sub type
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _editSubItem(ev, type) {
|
async _editSubItem(event, type) {
|
||||||
const li = $(ev.currentTarget).parents("." + type);
|
const li = $(event.currentTarget).parents("." + type);
|
||||||
const itemId = li.data(type + "Id");
|
const itemId = li.data(type + "Id");
|
||||||
const item = this.actor.getOwnedItem(itemId);
|
const item = this.actor.getOwnedItem(itemId);
|
||||||
item.sheet.render(true);
|
item.sheet.render(true);
|
||||||
@@ -110,8 +125,8 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
* Delete a generic item with sub type
|
* Delete a generic item with sub type
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _deleteSubItem(ev, type) {
|
async _deleteSubItem(event, type) {
|
||||||
const li = $(ev.currentTarget).parents("." + type);
|
const li = $(event.currentTarget).parents("." + type);
|
||||||
return this.actor.deleteOwnedItem(li.data(type + "Id"));
|
return this.actor.deleteOwnedItem(li.data(type + "Id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,8 +134,8 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
* Switch "in_curriculum"
|
* Switch "in_curriculum"
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_switchSubItemCurriculum(ev, type) {
|
_switchSubItemCurriculum(event, type) {
|
||||||
const li = $(ev.currentTarget).parents("." + type);
|
const li = $(event.currentTarget).parents("." + type);
|
||||||
const itemId = li.data(type + "Id");
|
const itemId = li.data(type + "Id");
|
||||||
const item = this.actor.getOwnedItem(itemId);
|
const item = this.actor.getOwnedItem(itemId);
|
||||||
return item.update({
|
return item.update({
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ export class CharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
getXpSpentInThisRank() {
|
getXpSpentInThisRank() {
|
||||||
const currentRank = this.actor.data.data.identity.school_rank || 0;
|
const currentRank = this.actor.data.data.identity.school_rank || 0;
|
||||||
return this.actor.items.reduce((tot, item) => {
|
return this.actor.items.reduce((tot, item) => {
|
||||||
// TODO c'est bien par rang actuel +1 ?
|
|
||||||
if (currentRank + 1 === item.data.data.rank) {
|
if (currentRank + 1 === item.data.data.rank) {
|
||||||
let xp = item.data.data.xp_used || 0;
|
let xp = item.data.data.xp_used || 0;
|
||||||
|
|
||||||
|
|||||||
@@ -56,4 +56,38 @@ export class HelpersL5r5e {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the target object on a drag n drop event, or null if not found
|
||||||
|
*/
|
||||||
|
static getDragnDropTargetObject(event) {
|
||||||
|
let data = null;
|
||||||
|
let targetItem = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
data = JSON.parse(event.dataTransfer.getData("text/plain"));
|
||||||
|
} catch (err) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (data.type) {
|
||||||
|
case "Actor":
|
||||||
|
targetItem = game.actors.get(data.id);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "Item":
|
||||||
|
targetItem = game.items.get(data.id);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "JournalEntry":
|
||||||
|
targetItem = game.journal.get(data.id);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "Macro":
|
||||||
|
targetItem = game.macros.get(data.id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return targetItem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,9 +32,14 @@ export class ItemSheetL5r5e extends ItemSheet {
|
|||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
|
||||||
// Everything below here is only needed if the sheet is editable
|
// Everything below here is only needed if the sheet is editable
|
||||||
// if (!this.options.editable) {
|
if (!this.options.editable) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
// On focus on one numeric element, select all text for better experience
|
||||||
|
html.find(".select-on-focus").on("focus", (event) => {
|
||||||
|
event.target.select();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,4 +50,37 @@ export class ItemSheetL5r5e extends ItemSheet {
|
|||||||
_updateObject(event, formData) {
|
_updateObject(event, formData) {
|
||||||
return this.object.update(formData);
|
return this.object.update(formData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create drag-and-drop workflow handlers for this Application
|
||||||
|
* @return An array of DragDrop handlers
|
||||||
|
*/
|
||||||
|
_createDragDropHandlers() {
|
||||||
|
return [
|
||||||
|
new DragDrop({
|
||||||
|
dragSelector: ".property",
|
||||||
|
dropSelector: null,
|
||||||
|
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
|
||||||
|
callbacks: { dragstart: this._onDragStart.bind(this), drop: this._onDrop.bind(this) },
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle dropped data on the Item sheet, only "property" allowed.
|
||||||
|
* Also a property canot be on another property
|
||||||
|
*/
|
||||||
|
_onDrop(event) {
|
||||||
|
// Check item type and subtype
|
||||||
|
const item = game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
|
if (!item || item.entity !== "Item" || item.data.type !== "property" || this.item.type === "property") {
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
console.log("Item - _onDrop - ", item, this);
|
||||||
|
|
||||||
|
// Ok add item
|
||||||
|
// return super._onDrop(event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -107,7 +107,7 @@
|
|||||||
background: $l5r5e-water;
|
background: $l5r5e-water;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
input[type="text"] {
|
input[type="number"] {
|
||||||
float: right;
|
float: right;
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{ localize 'l5r5e.attributes.fatigue' }}</strong>
|
<strong>{{ localize 'l5r5e.attributes.fatigue' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.fatigue" value="{{data.fatigue}}" data-dtype="Number"/>
|
<input class="centered-input select-on-focus" type="number" name="data.fatigue" value="{{data.fatigue}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<p class="quick-rules"> {{ localize 'l5r5e.attributes.endurancetip' }}</p>
|
<p class="quick-rules"> {{ localize 'l5r5e.attributes.endurancetip' }}</p>
|
||||||
</li>
|
</li>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{ localize 'l5r5e.attributes.strife' }}</strong>
|
<strong>{{ localize 'l5r5e.attributes.strife' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.strife" value="{{data.strife}}" data-dtype="Number"/>
|
<input class="centered-input select-on-focus" type="number" name="data.strife" value="{{data.strife}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<p class="quick-rules"> {{ localize 'l5r5e.attributes.composuretip' }}</p>
|
<p class="quick-rules"> {{ localize 'l5r5e.attributes.composuretip' }}</p>
|
||||||
</li>
|
</li>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<li class="void-content">
|
<li class="void-content">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{ localize 'l5r5e.attributes.voidpoints' }}</strong>
|
<strong>{{ localize 'l5r5e.attributes.voidpoints' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.void_points.current" value="{{data.void_points.current}}" data-dtype="Number"/>
|
<input class="centered-input select-on-focus" type="number" name="data.void_points.current" value="{{data.void_points.current}}" data-dtype="Number" placeholder="0" min="0" max="{{data.void_points.max}}"/>
|
||||||
<input class="centered-input" type="text" name="data.void_points.max" value="{{data.void_points.max}}" data-dtype="Number" disabled/>
|
<input class="centered-input" type="text" name="data.void_points.max" value="{{data.void_points.max}}" data-dtype="Number" disabled/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
<legend>{{ localize 'l5r5e.experience'}}</legend>
|
<legend>{{ localize 'l5r5e.experience'}}</legend>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{ localize 'l5r5e.advancements.total' }}
|
{{ localize 'l5r5e.advancements.total' }}
|
||||||
<input type="text" name="data.advancement.xp_total" value="{{ data.advancement.xp_total }}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.advancement.xp_total" value="{{ data.advancement.xp_total }}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{ localize 'l5r5e.advancements.spent' }}
|
{{ localize 'l5r5e.advancements.spent' }}
|
||||||
<input type="text" name="data.xp_spent" value="{{ data.xp_spent }}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.xp_spent" value="{{ data.xp_spent }}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{ localize 'l5r5e.advancements.saved' }}
|
{{ localize 'l5r5e.advancements.saved' }}
|
||||||
<input type="text" name="data.advancement.xp_saved" value="{{ data.advancement.xp_saved }}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.advancement.xp_saved" value="{{ data.advancement.xp_saved }}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{ localize 'l5r5e.schoolrank' }}
|
{{ localize 'l5r5e.schoolrank' }}
|
||||||
<input type="text" name="data.identity.school_rank" value="{{data.identity.school_rank}}" data-dtype="Number" placeholder="0"/>
|
<input type="number" name="data.identity.school_rank" value="{{data.identity.school_rank}}" class="select-on-focus" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@@ -3,35 +3,35 @@
|
|||||||
<label class="attribute-label earth centered-input">
|
<label class="attribute-label earth centered-input">
|
||||||
<i class="i_earth"></i>
|
<i class="i_earth"></i>
|
||||||
<strong>{{ localizeRing 'earth' }}</strong>
|
<strong>{{ localizeRing 'earth' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.rings.earth" value="{{data.rings.earth}}" data-dtype="Number" min="0" max="9" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings.earth" value="{{data.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="air">
|
<li id="air">
|
||||||
<label class="attribute-label air centered-input">
|
<label class="attribute-label air centered-input">
|
||||||
<i class="i_air"></i>
|
<i class="i_air"></i>
|
||||||
<strong>{{ localizeRing 'air' }}</strong>
|
<strong>{{ localizeRing 'air' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.rings.air" value="{{data.rings.air}}" data-dtype="Number" min="0" max="9" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings.air" value="{{data.rings.air}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="water">
|
<li id="water">
|
||||||
<label class="attribute-label water centered-input">
|
<label class="attribute-label water centered-input">
|
||||||
<i class="i_water"></i>
|
<i class="i_water"></i>
|
||||||
<strong>{{ localizeRing 'water' }}</strong>
|
<strong>{{ localizeRing 'water' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.rings.water" value="{{data.rings.water}}" data-dtype="Number" min="0" max="9" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings.water" value="{{data.rings.water}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="fire">
|
<li id="fire">
|
||||||
<label class="attribute-label fire centered-input">
|
<label class="attribute-label fire centered-input">
|
||||||
<i class="i_fire"></i>
|
<i class="i_fire"></i>
|
||||||
<strong>{{ localizeRing 'fire' }}</strong>
|
<strong>{{ localizeRing 'fire' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.rings.fire" value="{{data.rings.fire}}" data-dtype="Number" min="0" max="9" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings.fire" value="{{data.rings.fire}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="void">
|
<li id="void">
|
||||||
<label class="attribute-label void centered-input">
|
<label class="attribute-label void centered-input">
|
||||||
<i class="i_void"></i>
|
<i class="i_void"></i>
|
||||||
<strong>{{ localizeRing 'void' }}</strong>
|
<strong>{{ localizeRing 'void' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.rings.void" value="{{data.rings.void}}" data-dtype="Number" min="0" max="9" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings.void" value="{{data.rings.void}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1,6 +1,15 @@
|
|||||||
<li class="skill skill-wrapper" data-skill="{{skillId}}">
|
<li class="skill skill-wrapper" data-skill="{{skillId}}">
|
||||||
<label class="skill-content">
|
<label class="skill-content">
|
||||||
<span class="skill-name attribute-label rollable">{{ localizeSkill categoryId skillId }}</span>
|
<span class="skill-name attribute-label rollable">{{ localizeSkill categoryId skillId }}</span>
|
||||||
<input type="text" name="data.skills.{{categoryId}}.{{skillId}}" value="{{skill}}" data-dtype="Number" placeholder="0"/>
|
<input
|
||||||
|
class="centered-input select-on-focus"
|
||||||
|
type="number"
|
||||||
|
name="data.skills.{{categoryId}}.{{skillId}}"
|
||||||
|
value="{{skill}}"
|
||||||
|
data-dtype="Number"
|
||||||
|
min="0"
|
||||||
|
max="9"
|
||||||
|
placeholder="0"
|
||||||
|
/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{ localize 'l5r5e.social.honor' }}</strong>
|
<strong>{{ localize 'l5r5e.social.honor' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.social.honor" value="{{data.social.honor}}" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.social.honor" value="{{data.social.honor}}" data-dtype="Number" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{ localize 'l5r5e.social.glory' }}</strong>
|
<strong>{{ localize 'l5r5e.social.glory' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.social.glory" value="{{data.social.glory}}" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.social.glory" value="{{data.social.glory}}" data-dtype="Number" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{ localize 'l5r5e.social.status' }}</strong>
|
<strong>{{ localize 'l5r5e.social.status' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.social.status" value="{{data.social.status}}" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.social.status" value="{{data.social.status}}" data-dtype="Number" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{ localize 'l5r5e.attributes.fatigue' }}</strong>
|
<strong>{{ localize 'l5r5e.attributes.fatigue' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.fatigue" value="{{data.fatigue}}" data-dtype="Number"/>
|
<input class="centered-input select-on-focus" type="number" name="data.fatigue" value="{{data.fatigue}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<p class="quick-rules"> {{ localize 'l5r5e.attributes.endurancetip' }}</p>
|
<p class="quick-rules"> {{ localize 'l5r5e.attributes.endurancetip' }}</p>
|
||||||
</li>
|
</li>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{ localize 'l5r5e.attributes.strife' }}</strong>
|
<strong>{{ localize 'l5r5e.attributes.strife' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.strife" value="{{data.strife}}" data-dtype="Number"/>
|
<input class="centered-input select-on-focus" type="number" name="data.strife" value="{{data.strife}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<p class="quick-rules"> {{ localize 'l5r5e.attributes.composuretip' }}</p>
|
<p class="quick-rules"> {{ localize 'l5r5e.attributes.composuretip' }}</p>
|
||||||
</li>
|
</li>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<li class="void-content">
|
<li class="void-content">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{ localize 'l5r5e.attributes.voidpoints' }}</strong>
|
<strong>{{ localize 'l5r5e.attributes.voidpoints' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.void_points.current" value="{{data.void_points.current}}" data-dtype="Number"/>
|
<input class="centered-input select-on-focus" type="number" name="data.void_points.current" value="{{data.void_points.current}}" data-dtype="Number" placeholder="0" min="0" max="{{data.void_points.max}}"/>
|
||||||
<input class="centered-input" type="text" name="data.void_points.max" value="{{data.void_points.max}}" data-dtype="Number" disabled/>
|
<input class="centered-input" type="text" name="data.void_points.max" value="{{data.void_points.max}}" data-dtype="Number" disabled/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
{{!-- Martial --}}
|
{{!-- Martial --}}
|
||||||
<li>
|
<li>
|
||||||
<i class="i_bushi"></i>
|
<i class="i_bushi"></i>
|
||||||
<input type="text" name="data.conflict_rank.martial" value="{{data.conflict_rank.martial}}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.conflict_rank.martial" value="{{data.conflict_rank.martial}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</li>
|
</li>
|
||||||
{{!-- Social --}}
|
{{!-- Social --}}
|
||||||
<li>
|
<li>
|
||||||
<i class="i_courtier"></i>
|
<i class="i_courtier"></i>
|
||||||
<input type="text" name="data.conflict_rank.social" value="{{data.conflict_rank.social}}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.conflict_rank.social" value="{{data.conflict_rank.social}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<fieldset class="narrative-content">
|
<fieldset class="narrative-content">
|
||||||
<legend class="text-block-header">{{ localize 'l5r5e.social.advantages' }}</legend>
|
<legend class="text-block-header">{{ localize 'l5r5e.social.advantages' }}</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.item as |item id|}}
|
{{#each actor.items as |item id|}}
|
||||||
{{#ifCond item.type '==' 'advantage'}}
|
{{#ifCond '["distinction","passion"]' 'includes' item.data.peculiarity_type}}
|
||||||
{{> 'systems/l5r5e/templates/items/item/item-entry.html' item=item id=id }}
|
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id }}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -11,9 +11,9 @@
|
|||||||
<fieldset class="narrative-content">
|
<fieldset class="narrative-content">
|
||||||
<legend class="text-block-header">{{ localize 'l5r5e.social.disadvantages' }}</legend>
|
<legend class="text-block-header">{{ localize 'l5r5e.social.disadvantages' }}</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.item as |item id|}}
|
{{#each actor.items as |item id|}}
|
||||||
{{#ifCond item.type '==' 'disadvantage'}}
|
{{#ifCond '["adversity","anxiety"]' 'includes' item.data.peculiarity_type}}
|
||||||
{{> 'systems/l5r5e/templates/items/item/item-entry.html' item=item id=id }}
|
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id }}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -3,35 +3,35 @@
|
|||||||
<label class="attribute-label earth centered-input">
|
<label class="attribute-label earth centered-input">
|
||||||
<i class="i_earth"></i>
|
<i class="i_earth"></i>
|
||||||
<strong>{{ localizeRing 'earth' }}</strong>
|
<strong>{{ localizeRing 'earth' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.rings.earth" value="{{data.rings.earth}}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings.earth" value="{{data.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="air">
|
<li id="air">
|
||||||
<label class="attribute-label air centered-input">
|
<label class="attribute-label air centered-input">
|
||||||
<i class="i_air"></i>
|
<i class="i_air"></i>
|
||||||
<strong>{{ localizeRing 'air' }}</strong>
|
<strong>{{ localizeRing 'air' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.rings.air" value="{{data.rings.air}}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings.air" value="{{data.rings.air}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="water">
|
<li id="water">
|
||||||
<label class="attribute-label water centered-input">
|
<label class="attribute-label water centered-input">
|
||||||
<i class="i_water"></i>
|
<i class="i_water"></i>
|
||||||
<strong>{{ localizeRing 'water' }}</strong>
|
<strong>{{ localizeRing 'water' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.rings.water" value="{{data.rings.water}}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings.water" value="{{data.rings.water}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="fire">
|
<li id="fire">
|
||||||
<label class="attribute-label fire centered-input">
|
<label class="attribute-label fire centered-input">
|
||||||
<i class="i_fire"></i>
|
<i class="i_fire"></i>
|
||||||
<strong>{{ localizeRing 'fire' }}</strong>
|
<strong>{{ localizeRing 'fire' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.rings.fire" value="{{data.rings.fire}}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings.fire" value="{{data.rings.fire}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="void">
|
<li id="void">
|
||||||
<label class="attribute-label void centered-input">
|
<label class="attribute-label void centered-input">
|
||||||
<i class="i_void"></i>
|
<i class="i_void"></i>
|
||||||
<strong>{{ localizeRing 'void' }}</strong>
|
<strong>{{ localizeRing 'void' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.rings.void" value="{{data.rings.void}}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings.void" value="{{data.rings.void}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
<ul class="npc-skill">{{!-- Skills --}}
|
<ul class="npc-skill">{{!-- Skills --}}
|
||||||
{{#each data.skills as |skillValue skillCatId|}}
|
{{#each data.skills as |skillValue skillCatId|}}
|
||||||
<li class="skill skill-wrapper" data-skillcat="{{skillCatId}}">
|
<li class="skill skill-wrapper" data-skillcat="{{skillCatId}}">
|
||||||
<label for="skill_{{skillCatId}}" class="skill-name">
|
<label class="skill-name">
|
||||||
{{localizeSkill skillCatId "title"}}
|
{{localizeSkill skillCatId "title"}}
|
||||||
</label>
|
</label>
|
||||||
<input id="skill_{{skillCatId}}" type="text" name="data.skills.{{skillCatId}}" value="{{skillValue}}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" id="skill_{{skillCatId}}" type="number" name="data.skills.{{skillCatId}}" value="{{skillValue}}" data-dtype="Number" min="0" max="9" placeholder="0"/>
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -2,19 +2,19 @@
|
|||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{ localize 'l5r5e.social.honor' }}</strong>
|
<strong>{{ localize 'l5r5e.social.honor' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.social.honor" value="{{data.social.honor}}" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.social.honor" value="{{data.social.honor}}" data-dtype="Number" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{ localize 'l5r5e.social.glory' }}</strong>
|
<strong>{{ localize 'l5r5e.social.glory' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.social.glory" value="{{data.social.glory}}" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.social.glory" value="{{data.social.glory}}" data-dtype="Number" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{ localize 'l5r5e.social.status' }}</strong>
|
<strong>{{ localize 'l5r5e.social.status' }}</strong>
|
||||||
<input class="centered-input" type="text" name="data.social.status" value="{{data.social.status}}" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.social.status" value="{{data.social.status}}" data-dtype="Number" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="affinities">
|
<li class="affinities">
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
<input type="text" name="data.rings_affinities.strength.value" value="{{data.rings_affinities.strength.value}}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings_affinities.strength.value" value="{{data.rings_affinities.strength.value}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||||
{{!-- Weakness --}}
|
{{!-- Weakness --}}
|
||||||
<select class="attribute-dtype" name="data.rings_affinities.weakness.ring">
|
<select class="attribute-dtype" name="data.rings_affinities.weakness.ring">
|
||||||
{{#select data.rings_affinities.weakness.ring}}
|
{{#select data.rings_affinities.weakness.ring}}
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
<input type="text" name="data.rings_affinities.weakness.value" value="{{data.rings_affinities.weakness.value}}" data-dtype="Number" placeholder="0"/>
|
<input class="centered-input select-on-focus" type="number" name="data.rings_affinities.weakness.value" value="{{data.rings_affinities.weakness.value}}" data-dtype="Number" min="-9" max="-1" placeholder="0"/>
|
||||||
{{!-- Attitude --}}
|
{{!-- Attitude --}}
|
||||||
<label class="attitude">
|
<label class="attitude">
|
||||||
<input type="text" name="data.attitude" value="{{data.attitude}}" data-dtype="String" placeholder=""/>
|
<input type="text" name="data.attitude" value="{{data.attitude}}" data-dtype="String" placeholder=""/>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<fieldset class="weapons-content">
|
<!--<fieldset class="properties-content">-->
|
||||||
<legend class="section-header">{{ localize 'l5r5e.property' }}</legend>
|
<!-- <legend class="section-header">{{ localize 'l5r5e.properties' }}</legend>-->
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |item id|}}
|
{{#each properties as |item id|}}
|
||||||
{{#ifCond item.type '==' 'property'}}
|
<!-- {{#ifCond item.type '==' 'property'}}-->
|
||||||
{{> 'systems/l5r5e/templates/items/property/property-entry.html' item=item id=id }}
|
{{> 'systems/l5r5e/templates/items/property/property-entry.html' item=item id=id }}
|
||||||
{{/ifCond}}
|
<!-- {{/ifCond}}-->
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
</fieldset>
|
<!--</fieldset>-->
|
||||||
@@ -79,8 +79,10 @@
|
|||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
{{json data.properties}}
|
||||||
<legend class="text-block-header">{{ localize 'l5r5e.properties' }}</legend>
|
<legend class="text-block-header">{{ localize 'l5r5e.properties' }}</legend>
|
||||||
<!-- TODO data.properties a faire en dnd avec les items de type "property" -->
|
<!-- TODO data.properties a faire en dnd avec les items de type "property" -->
|
||||||
|
{{> 'systems/l5r5e/templates/items/property/properties.html' properties=data.properties }}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend class="text-block-header">{{ localize 'l5r5e.description' }}</legend>
|
<legend class="text-block-header">{{ localize 'l5r5e.description' }}</legend>
|
||||||
|
|||||||
Reference in New Issue
Block a user