v0.0.3
Finishing v0.0.3 Layout fixes Added support for rolling skill on spells Fixed migration Cleaned up the code Fixed Hjältarnas Tid skill error, updated layout, fixed buttons not working Fixed right click menu for weapons Added roll dialog and exceptional rolls Updated skills styling Co-Authored-By: erebus <erebus@rikspolisen.se> Co-Committed-By: erebus <erebus@rikspolisen.se>
This commit was merged in pull request #2.
This commit is contained in:
@@ -74,8 +74,7 @@
|
||||
<strong>{{localize data.cost.label}}:</strong> {{data.cost.value}}
|
||||
<strong>{{localize data.difficulty.label}}:</strong> {{rollDifficulty data.difficulty.value}}
|
||||
<div style="grid-column-start: 1; grid-column-end: 5;">
|
||||
<strong>{{localize data.roll.label}}</strong>
|
||||
{{data.roll.value}}
|
||||
<strong>{{localize data.roll.label}}:</strong> {{spellRoll data.roll.value}}
|
||||
</div>
|
||||
</div>
|
||||
{{#if data.description}}
|
||||
|
||||
@@ -4,6 +4,16 @@
|
||||
|
||||
<div class="roll">
|
||||
<div class="dice-roll">
|
||||
{{#if closed}}
|
||||
<div style="text-align: center; margin-bottom: 0.5rem;">
|
||||
{{localize "ROLL.CLOSED"}}: {{closed}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if opened}}
|
||||
<div style="text-align: center; margin-bottom: 0.5rem;">
|
||||
{{localize "ROLL.OPENED"}}: {{opened}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="dice-result">
|
||||
{{#if showFormula}}
|
||||
<div class="dice-formula-kh">{{res.formula}}</div>
|
||||
@@ -13,14 +23,14 @@
|
||||
</div>
|
||||
</div>
|
||||
{{#if success}}
|
||||
<div style="text-align: center; width: 100%; font-weight: bold; color: limegreen;">
|
||||
{{localize "ROLL.SUCCESS"}}
|
||||
</div>
|
||||
<h2 style="border: none; text-align: center; width: 100%; font-weight: bold; color: limegreen;">
|
||||
{{#if excetional}}{{localize "ROLL.EXCEPTIONAL"}}{{/if}} {{localize "ROLL.SUCCESS"}}
|
||||
</h2>
|
||||
{{/if}}
|
||||
{{#if failure}}
|
||||
<div style="text-align: center; width: 100%; font-weight: bold; color: darkred;">
|
||||
{{localize "ROLL.FAILURE"}}
|
||||
</div>
|
||||
<h2 style="border: none; text-align: center; width: 100%; font-weight: bold; color: darkred;">
|
||||
{{#if excetional}}{{localize "ROLL.EXCEPTIONAL"}}{{/if}} {{localize "ROLL.FAILURE"}}
|
||||
</h2>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -26,7 +26,24 @@
|
||||
</div>
|
||||
<div style="grid-column-start: 1; grid-column-end: 3;">
|
||||
<label>{{localize data.roll.label}}</label>
|
||||
<input name="data.roll.value" type="text" value="{{data.roll.value}}" />
|
||||
<select class="item-weapon-cat-select" name="data.roll.value">
|
||||
{{#select data.roll.value}}
|
||||
<option value="roll">{{localize "SPELL.ROLL"}}</option>
|
||||
<option value="attackroll">{{localize "SPELL.ATTACKROLL"}}</option>
|
||||
<option value="opposite">{{localize "SPELL.OPPOSITE"}}</option>
|
||||
<option value="ritual">{{localize "SPELL.RITUAL"}}</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div style="grid-column-start: 1; grid-column-end: 3;">
|
||||
<label>{{localize "ITEM.SKILL"}}</label>
|
||||
<select class="item-weapon-skill-select" name="data.roll.skill">
|
||||
{{#select data.roll.skill}}
|
||||
{{#each this.khskills as |t|}}
|
||||
<option value="{{t.name}}">{{t.name}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
@@ -39,4 +56,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
@@ -2,16 +2,16 @@
|
||||
<div class="combat border">
|
||||
<ul class="items">
|
||||
<ul class="items-list">
|
||||
<li class="item flexrow">
|
||||
<li class="item-nor flexrow">
|
||||
<div class="item-name" style="flex-grow: 8;">{{localize "MOD.INIT"}}</div>
|
||||
<div class="item-value" style="flex: none;"><input name="data.combat.init" class="skill-value" type="number" value="{{data.combat.init}}" data-dtype="Number" /></div>
|
||||
</li>
|
||||
|
||||
<li class="item flexrow">
|
||||
<li class="item-defence flexrow" data-defence="{{data.combat.defence}}">
|
||||
<div class="item-name roll-defence rollable" data-defence="{{data.combat.defence}}" style="flex-grow: 8;">{{localize "ADVERSARY.DEFENCE"}}</div>
|
||||
<div class="item-value" style="flex: none;"><input name="data.combat.defence" class="skill-value" type="text" value="{{data.combat.defence}}" /></div>
|
||||
</li>
|
||||
<li class="item flexrow">
|
||||
<li class="item-nor flexrow">
|
||||
<div class="item-name" style="flex-grow: 8;">{{localize "ADVERSARY.HASHELMET"}}</div>
|
||||
<div style="align-self: flex-end">
|
||||
<a style="margin: auto;" class="adversary-helmet-click {{#if data.combat.helmet}}active{{/if}}">
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="item flexrow">
|
||||
<li class="item-nor flexrow">
|
||||
<div class="item-name roll-adversary-armor rollable" data-armor="{{data.combat.armor}}" style="flex-grow: 8;">{{localize "ITEM.DEFENCE"}}</div>
|
||||
<div class="item-value" style="flex: none;"><input name="data.combat.armor" class="skill-value" type="text" value="{{data.combat.armor}}" /></div>
|
||||
</li>
|
||||
@@ -33,7 +33,7 @@
|
||||
<ul class="items">
|
||||
<ul class="items-list">
|
||||
{{#each actor.skills as |skill key|}}
|
||||
<li class="item flexrow" data-item-id="{{skill._id}}">
|
||||
<li class="item-skill flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill rollable" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<div class="item-value" style="flex: none;"><input class="skill-value" type="number" value="{{skill.data.value}}" min="0" data-item-id="{{skill._id}}" data-dtype="Number" /></div>
|
||||
</li>
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<ul class="items-list">
|
||||
{{#each actor.attacks as |item key|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}" data-ability="{{item.data.skill.value}}">
|
||||
<li class="item-attack flexrow" data-item-id="{{item._id}}" data-ability="{{item.data.skill.value}}">
|
||||
<div class="item-name">{{item.name}}</div>
|
||||
<div class="skill-roll">
|
||||
<div class="roll-button">
|
||||
@@ -61,12 +61,12 @@
|
||||
</div>
|
||||
<div class="skill-roll">
|
||||
<div class="roll-button">
|
||||
<div class="roll-damage rollable">{{item.data.damage.value}}</div>
|
||||
<div class="roll-attack-damage rollable">{{item.data.damage.value}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
<a class="item-control item-edit" data-parent=".item-attack" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" data-parent=".item-attack" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</li>
|
||||
<ul class="items-list">
|
||||
{{#each actor.weapons as |item id|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}" data-ability="{{item.data.skill.value}}">
|
||||
<li class="item-weapon flexrow" data-item-id="{{item._id}}" data-ability="{{item.data.skill.value}}">
|
||||
<div class="item-name">{{item.name}}</div>
|
||||
<div>
|
||||
{{#if item.data.equipable.equipped}}
|
||||
@@ -40,8 +40,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
<a class="item-control item-edit" data-parent=".item-weapon" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" data-parent=".item-weapon" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
@@ -79,8 +79,8 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
<a class="item-control item-edit" data-parent=".item" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" data-parent=".item" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
@@ -105,8 +105,8 @@
|
||||
<div class="quantity decrease"><i class="far fa-minus-square"></i></div>
|
||||
</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
<a class="item-control item-edit" data-parent=".item" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" data-parent=".item" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
<div class="combat border">
|
||||
<ul class="items">
|
||||
<ul class="items-list">
|
||||
<li class="item flexrow">
|
||||
<li class="item-nor flexrow">
|
||||
<div class="item-name" style="flex-grow: 8;">{{localize "MOD.INIT"}}</div>
|
||||
<div class="item-value" style="flex: none;"><input name="data.combat.init" class="skill-value" type="number" value="{{data.combat.init}}" data-dtype="Number" /></div>
|
||||
</li>
|
||||
|
||||
<li class="item flexrow">
|
||||
<li class="item-defence flexrow" data-defence="{{data.combat.defence}}">
|
||||
<div class="item-name roll-defence rollable" data-defence="{{data.combat.defence}}" style="flex-grow: 8;">{{localize "ADVERSARY.DEFENCE"}}</div>
|
||||
<div class="item-value" style="flex: none;"><input name="data.combat.defence" class="skill-value" type="text" value="{{data.combat.defence}}" /></div>
|
||||
</li>
|
||||
|
||||
<li class="item flexrow">
|
||||
<li class="item-nor flexrow">
|
||||
<div class="item-name roll-adversary-armor rollable" data-armor="{{data.combat.armor}}" style="flex-grow: 8;">{{localize "ITEM.DEFENCE"}}</div>
|
||||
<div class="item-value" style="flex: none;"><input name="data.combat.armor" class="skill-value" type="text" value="{{data.combat.armor}}" /></div>
|
||||
</li>
|
||||
@@ -25,7 +25,7 @@
|
||||
<ul class="items">
|
||||
<ul class="items-list">
|
||||
{{#each actor.skills as |skill key|}}
|
||||
<li class="item flexrow" data-item-id="{{skill._id}}">
|
||||
<li class="item-skill flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill rollable" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<div class="item-value" style="flex: none;"><input class="skill-value" type="number" value="{{skill.data.value}}" min="0" data-item-id="{{skill._id}}" data-dtype="Number" /></div>
|
||||
</li>
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
<ul class="items-list">
|
||||
{{#each actor.attacks as |item key|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}" data-ability="{{item.data.skill.value}}">
|
||||
<li class="item-attack flexrow" data-item-id="{{item._id}}" data-ability="{{item.data.skill.value}}">
|
||||
<div class="item-name">{{item.name}}</div>
|
||||
<div class="skill-roll">
|
||||
<div class="roll-button">
|
||||
@@ -53,12 +53,12 @@
|
||||
</div>
|
||||
<div class="skill-roll">
|
||||
<div class="roll-button">
|
||||
<div class="roll-damage rollable">{{item.data.damage.value}}</div>
|
||||
<div class="roll-attack-damage rollable">{{item.data.damage.value}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
<a class="item-control item-edit" data-parent=".item-attack" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" data-parent=".item-attack" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
<ul class="items-list">
|
||||
{{#each actor.skills as |skill key|}}
|
||||
{{#if skill.hasAdventure}}
|
||||
<li class="item flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<li class="item-skill flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill rollable" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<div class="item-value" style="flex: none;"><input class="skill-value" type="number" value="{{skill.data.value}}" min="0" data-item-id="{{skill._id}}" data-dtype="Number" /></div>
|
||||
<div style="align-self: flex-end">
|
||||
<div style="align-self: flex-end; margin-top: auto; margin-bottom: auto;">
|
||||
<a style="margin: auto;" class="click-skill {{#if skill.data.used}}active{{/if}}" data-item-id="{{skill._id}}">
|
||||
<i class="far {{#if skill.data.used}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
|
||||
</a>
|
||||
@@ -25,10 +25,10 @@
|
||||
<ul class="items-list">
|
||||
{{#each actor.skills as |skill key|}}
|
||||
{{#if skill.hasCombat}}
|
||||
<li class="item flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<li class="item-skill flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill rollable" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<div class="item-value" style="flex: none;"><input class="skill-value" type="number" value="{{skill.data.value}}" min="0" data-item-id="{{skill._id}}" data-dtype="Number" /></div>
|
||||
<div style="align-self: flex-end">
|
||||
<div style="align-self: flex-end; margin-top: auto; margin-bottom: auto;">
|
||||
<a style="margin: auto;" class="click-skill {{#if skill.data.used}}active{{/if}}" data-item-id="{{skill._id}}">
|
||||
<i class="far {{#if skill.data.used}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
|
||||
</a>
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
<ul class="items-list">
|
||||
{{#each actor.skills as |skill key|}}
|
||||
{{#if skill.hasBase}}
|
||||
<li class="item flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<li class="item-skill flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill rollable" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<div class="item-value" style="flex: none;"><input class="skill-value" type="number" value="{{skill.data.value}}" min="0" data-item-id="{{skill._id}}" data-dtype="Number" /></div>
|
||||
<div style="align-self: flex-end">
|
||||
<div style="align-self: flex-end; margin-top: auto; margin-bottom: auto;">
|
||||
<a style="margin: auto;" class="click-skill {{#if skill.data.used}}active{{/if}}" data-item-id="{{skill._id}}">
|
||||
<i class="far {{#if skill.data.used}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
|
||||
</a>
|
||||
@@ -25,10 +25,10 @@
|
||||
<ul class="items-list">
|
||||
{{#each actor.skills as |skill key|}}
|
||||
{{#if skill.hasAdventure}}
|
||||
<li class="item flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<li class="item-skill flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill rollable" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<div class="item-value" style="flex: none;"><input class="skill-value" type="number" value="{{skill.data.value}}" min="0" data-item-id="{{skill._id}}" data-dtype="Number" /></div>
|
||||
<div style="align-self: flex-end">
|
||||
<div style="align-self: flex-end; margin-top: auto; margin-bottom: auto;">
|
||||
<a style="margin: auto;" class="click-skill {{#if skill.data.used}}active{{/if}}" data-item-id="{{skill._id}}">
|
||||
<i class="far {{#if skill.data.used}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
|
||||
</a>
|
||||
@@ -45,10 +45,10 @@
|
||||
<ul class="items-list">
|
||||
{{#each actor.skills as |skill key|}}
|
||||
{{#if skill.hasCombat}}
|
||||
<li class="item flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<li class="item-skill flexrow" data-item-id="{{skill._id}}">
|
||||
<div class="item-name roll-skill rollable" style="flex-grow: 8;">{{skill.name}}</div>
|
||||
<div class="item-value" style="flex: none;"><input class="skill-value" type="number" value="{{skill.data.value}}" min="0" data-item-id="{{skill._id}}" data-dtype="Number" /></div>
|
||||
<div style="align-self: flex-end">
|
||||
<div style="align-self: flex-end; margin-top: auto; margin-bottom: auto;">
|
||||
<a style="margin: auto;" class="click-skill {{#if skill.data.used}}active{{/if}}" data-item-id="{{skill._id}}">
|
||||
<i class="far {{#if skill.data.used}}fa-times-circle{{else}}fa-circle{{/if}}"></i>
|
||||
</a>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<li class="item flexrow" data-item-id="{{talent._id}}">
|
||||
<div class="item-name">{{talent.name}}</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
<a class="item-control item-edit" data-parent=".item" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" data-parent=".item" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
@@ -25,13 +25,13 @@
|
||||
<ul class="items">
|
||||
<ul class="items-list">
|
||||
{{#each actor.spells as |spell key|}}
|
||||
<li class="item flexrow" data-item-id="{{spell._id}}">
|
||||
<div class="item-name">{{spell.name}}</div>
|
||||
<li class="item-spell flexrow" data-item-id="{{spell._id}}">
|
||||
<div class="item-name roll-spell-skill rollable" style="margin-top: auto; margin-bottom: auto;">{{spell.name}}</div>
|
||||
<div class="cost roll-spell-cost rollable">{{spell.data.cost.value}}</div>
|
||||
<div class="difficulty">{{rollDifficulty spell.data.difficulty.value}}</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
<a class="item-control item-edit" data-parent=".item-spell" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" data-parent=".item-spell" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
|
||||
55
templates/roll-dialog.html
Normal file
55
templates/roll-dialog.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<div id="{{id}}" class="roll-dialog">
|
||||
<h1 style="text-align: center;">{{localize skillName}} ({{skillValue}})</h1>
|
||||
<div class="flexrow" style="margin-bottom: 10px;">
|
||||
<label style="margin: auto;">{{localize "ROLL.OPENCLOSE"}}</label>
|
||||
<input type="button" name="openclosed" min="0" value="{{startopen}}" style="min-height: 30px; min-width: 45px;" />
|
||||
<label name="notopenedorclosed" style="margin: auto; display: inline-block;"> </label>
|
||||
<label name="closed" style="margin: auto; display: none; text-align: center;">{{localize "ROLL.CLOSED"}}</label>
|
||||
<label name="opened" style="margin: auto; display: none; text-align: center;">{{localize "ROLL.OPENED"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
const scope = document.getElementById("{{{id}}}");
|
||||
const input = scope.querySelector(`[name="openclosed"`);
|
||||
const closed = scope.querySelector(`[name="closed"`);
|
||||
const opened = scope.querySelector(`[name="opened"`);
|
||||
const none = scope.querySelector(`[name="notopenedorclosed"`);
|
||||
|
||||
input.addEventListener("click", (event) => {
|
||||
event.target.value++;
|
||||
|
||||
if(event.target.value > 0) {
|
||||
closed.style.display = "none"
|
||||
none.style.display = "none"
|
||||
opened.style.display = "inline-block"
|
||||
} else if(event.target.value < 0) {
|
||||
opened.style.display = "none"
|
||||
none.style.display = "none"
|
||||
closed.style.display = "inline-block"
|
||||
} else {
|
||||
opened.style.display = "none"
|
||||
closed.style.display = "none"
|
||||
none.style.display = "inline-block"
|
||||
}
|
||||
});
|
||||
input.addEventListener("contextmenu", (event) => {
|
||||
event.target.value--;
|
||||
|
||||
if(event.target.value > 0) {
|
||||
closed.style.display = "none"
|
||||
none.style.display = "none"
|
||||
opened.style.display = "inline-block"
|
||||
} else if(event.target.value < 0) {
|
||||
opened.style.display = "none"
|
||||
none.style.display = "none"
|
||||
closed.style.display = "inline-block"
|
||||
} else {
|
||||
opened.style.display = "none"
|
||||
closed.style.display = "none"
|
||||
none.style.display = "inline-block"
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
Reference in New Issue
Block a user