diff --git a/less/items.less b/less/items.less index 5c5dd132..f85d929c 100644 --- a/less/items.less +++ b/less/items.less @@ -212,76 +212,6 @@ } } - h4.armorproperties-header { - margin: 0; - padding: 0; - font-weight: bold; - line-height: 24px; - color: @colorOlive; - } - - .armorproperties-parts { - list-style: none; - margin: 0; - padding: 0; - - .armorproperties-part { - flex: 0 0 100%; - padding: 0; - input { - flex: 3; - } - select { - margin-left: 5px; - flex: 1; - } - } - } - - .armorproperties-control { - width: 18px; - flex: 0 0 18px; - line-height: 24px; - float: right; - text-align: right; - color: @colorTan; - } - - h4.weaponproperties-header { - margin: 0; - padding: 0; - font-weight: bold; - line-height: 24px; - color: @colorOlive; - } - - .weaponproperties-parts { - list-style: none; - margin: 0; - padding: 0; - - .weaponproperties-part { - flex: 0 0 100%; - padding: 0; - input { - flex: 3; - } - select { - margin-left: 5px; - flex: 1; - } - } - } - - .weaponproperties-control { - width: 18px; - flex: 0 0 18px; - line-height: 24px; - float: right; - text-align: right; - color: @colorTan; - } - /* ----------------------------------------- */ /* Item Actions */ /* ----------------------------------------- */ diff --git a/module/item/sheet.js b/module/item/sheet.js index a04db6b8..edc3b84d 100644 --- a/module/item/sheet.js +++ b/module/item/sheet.js @@ -251,10 +251,10 @@ export default class ItemSheet5e extends ItemSheet { html.find('.trait-selector.class-skills').click(this._onConfigureClassSkills.bind(this)); // Armor properties - html.find(".armorproperties-control").click(this._onarmorpropertiesControl.bind(this)); +// html.find(".armorproperties-control").click(this._onarmorpropertiesControl.bind(this)); // Weapon properties - html.find(".weaponproperties-control").click(this._onweaponpropertiesControl.bind(this)); +// html.find(".weaponproperties-control").click(this._onweaponpropertiesControl.bind(this)); } @@ -289,62 +289,6 @@ export default class ItemSheet5e extends ItemSheet { /* -------------------------------------------- */ -/** - * Add or remove a armorproperties part from the armorproperties formula - * @param {Event} event The original click event - * @return {Promise} - * @private - */ - async _onarmorpropertiesControl(event) { - event.preventDefault(); - const a = event.currentTarget; - - // Add new armorproperties component - if ( a.classList.contains("add-armorproperties") ) { - await this._onSubmit(event); // Submit any unsaved changes - const armorproperties = this.item.data.data.armorproperties; - return this.item.update({"data.armorproperties.parts": armorproperties.parts.concat([["", ""]])}); - } - - // Remove a armorproperties component - if ( a.classList.contains("delete-armorproperties") ) { - await this._onSubmit(event); // Submit any unsaved changes - const li = a.closest(".armorproperties-part"); - const armorproperties = duplicate(this.item.data.data.armorproperties); - armorproperties.parts.splice(Number(li.dataset.armorpropertiesPart), 1); - return this.item.update({"data.armorproperties.parts": armorproperties.parts}); - } - } - - /* -------------------------------------------- */ - - /** - * Add or remove a weaponproperties part from the weaponproperties formula - * @param {Event} event The original click event - * @return {Promise} - * @private - */ - async _onweaponpropertiesControl(event) { - event.preventDefault(); - const a = event.currentTarget; - - // Add new weaponproperties component - if ( a.classList.contains("add-weaponproperties") ) { - await this._onSubmit(event); // Submit any unsaved changes - const weaponproperties = this.item.data.data.weaponproperties; - return this.item.update({"data.weaponproperties.parts": weaponproperties.parts.concat([["", ""]])}); - } - - // Remove a weaponproperties component - if ( a.classList.contains("delete-weaponproperties") ) { - await this._onSubmit(event); // Submit any unsaved changes - const li = a.closest(".weaponproperties-part"); - const weaponproperties = duplicate(this.item.data.data.weaponproperties); - weaponproperties.parts.splice(Number(li.dataset.weaponpropertiesPart), 1); - return this.item.update({"data.weaponproperties.parts": weaponproperties.parts}); - } - } - /** * Handle spawning the TraitSelector application which allows a checkbox of multiple trait options * @param {Event} event The click event which originated the selection diff --git a/sw5e.css b/sw5e.css index bf00ddce..33e311b8 100644 --- a/sw5e.css +++ b/sw5e.css @@ -1313,7 +1313,10 @@ color: #7a7971; } .sw5e.sheet.item .weapon-properties label.checkbox { - flex: 0 0 98px; + flex: 0 0 110px; +} +.sw5e.sheet.item .armor-properties label.checkbox { + flex: 0 0 110px; } .sw5e.sheet.item .loot-header { margin-bottom: 10px; diff --git a/templates/items/equipment.html b/templates/items/equipment.html index 9a9740f4..42415b85 100644 --- a/templates/items/equipment.html +++ b/templates/items/equipment.html @@ -76,32 +76,15 @@ {{/unless}} - {{#unless isWeapon }} - {{!-- ArmorProperties Formula --}} -