summaryrefslogtreecommitdiffstats
path: root/client/components/sidebar
diff options
context:
space:
mode:
authorIgnatz <computer-freak94@gmx.de>2018-05-18 10:24:51 +0200
committerIgnatz <computer-freak94@gmx.de>2018-05-18 10:24:51 +0200
commitd6cfac0122dc5e6819c82f73c728488e0600cb70 (patch)
tree4f392116329e8e7cbd8e679837ce90fa7f5a0ee3 /client/components/sidebar
parentc1d2e27c092f9bce4a9982d6b714b442dbf66a4b (diff)
downloadwekan-d6cfac0122dc5e6819c82f73c728488e0600cb70.tar.gz
wekan-d6cfac0122dc5e6819c82f73c728488e0600cb70.tar.bz2
wekan-d6cfac0122dc5e6819c82f73c728488e0600cb70.zip
linter corrections
Diffstat (limited to 'client/components/sidebar')
-rw-r--r--client/components/sidebar/sidebarCustomFields.js27
1 files changed, 14 insertions, 13 deletions
diff --git a/client/components/sidebar/sidebarCustomFields.js b/client/components/sidebar/sidebarCustomFields.js
index cfa21beb..9fed163c 100644
--- a/client/components/sidebar/sidebarCustomFields.js
+++ b/client/components/sidebar/sidebarCustomFields.js
@@ -27,11 +27,11 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
types() {
const currentType = this.data().type;
return this._types.
- map(type => {return {
+ map((type) => {return {
value: type,
- name: TAPi18n.__('custom-field-' + type),
- selected: type == currentType,
- }});
+ name: TAPi18n.__('custom-field-${type}'),
+ selected: type === currentType,
+ };});
},
isTypeNotSelected(type) {
@@ -39,7 +39,7 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
},
getDropdownItems() {
- var items = this.dropdownItems.get();
+ const items = this.dropdownItems.get();
Array.from(this.findAll('.js-field-settings-dropdown input')).forEach((el, index) => {
//console.log('each item!', index, el.value);
if (!items[index]) items[index] = {
@@ -51,12 +51,13 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
},
getSettings() {
- let settings = {};
+ const settings = {};
switch (this.type.get()) {
- case 'dropdown':
- let dropdownItems = this.getDropdownItems().filter(item => !!item.name.trim());
- settings.dropdownItems = dropdownItems;
- break;
+ case 'dropdown': {
+ const dropdownItems = this.getDropdownItems().filter((item) => !!item.name.trim());
+ settings.dropdownItems = dropdownItems;
+ break;
+ }
}
return settings;
},
@@ -69,7 +70,7 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
},
'keydown .js-dropdown-item.last'(evt) {
if (evt.target.value.trim() && evt.keyCode === 13) {
- let items = this.getDropdownItems();
+ const items = this.getDropdownItems();
this.dropdownItems.set(items);
evt.target.value = '';
}
@@ -90,8 +91,8 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
name: this.find('.js-field-name').value.trim(),
type: this.type.get(),
settings: this.getSettings(),
- showOnCard: this.find('.js-field-show-on-card.is-checked') != null
- }
+ showOnCard: this.find('.js-field-show-on-card.is-checked') !== null,
+ };
// insert or update
if (!this.data()._id) {