diff options
Diffstat (limited to 'client/components/sidebar')
-rw-r--r-- | client/components/sidebar/sidebarCustomFields.jade | 10 | ||||
-rw-r--r-- | client/components/sidebar/sidebarCustomFields.js | 18 |
2 files changed, 28 insertions, 0 deletions
diff --git a/client/components/sidebar/sidebarCustomFields.jade b/client/components/sidebar/sidebarCustomFields.jade index fd31e5ac..f0a17773 100644 --- a/client/components/sidebar/sidebarCustomFields.jade +++ b/client/components/sidebar/sidebarCustomFields.jade @@ -41,6 +41,16 @@ template(name="createCustomFieldPopup") .materialCheckBox(class="{{#if showOnCard}}is-checked{{/if}}") span {{_ 'show-field-on-card'}} + a.flex.js-field-automatically-on-card(class="{{#if automaticallyOnCard}}is-checked{{/if}}") + .materialCheckBox(class="{{#if automaticallyOnCard}}is-checked{{/if}}") + + span {{_ 'automatically-field-on-card'}} + + a.flex.js-field-showLabel-on-card(class="{{#if showLabelOnMiniCard}}is-checked{{/if}}") + .materialCheckBox(class="{{#if showLabelOnMiniCard}}is-checked{{/if}}") + + span {{_ 'showLabel-field-on-card'}} + button.primary.wide.left(type="button") | {{_ 'save'}} if _id diff --git a/client/components/sidebar/sidebarCustomFields.js b/client/components/sidebar/sidebarCustomFields.js index e56d744e..ccc8ffb9 100644 --- a/client/components/sidebar/sidebarCustomFields.js +++ b/client/components/sidebar/sidebarCustomFields.js @@ -83,6 +83,22 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({ $target.find('.materialCheckBox').toggleClass('is-checked'); $target.toggleClass('is-checked'); }, + 'click .js-field-automatically-on-card'(evt) { + let $target = $(evt.target); + if(!$target.hasClass('js-field-automatically-on-card')){ + $target = $target.parent(); + } + $target.find('.materialCheckBox').toggleClass('is-checked'); + $target.toggleClass('is-checked'); + }, + 'click .js-field-showLabel-on-card'(evt) { + let $target = $(evt.target); + if(!$target.hasClass('js-field-showLabel-on-card')){ + $target = $target.parent(); + } + $target.find('.materialCheckBox').toggleClass('is-checked'); + $target.toggleClass('is-checked'); + }, 'click .primary'(evt) { evt.preventDefault(); @@ -92,6 +108,8 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({ type: this.type.get(), settings: this.getSettings(), showOnCard: this.find('.js-field-show-on-card.is-checked') !== null, + showLabelOnMiniCard: this.find('.js-field-showLabel-on-card.is-checked') !== null, + automaticallyOnCard: this.find('.js-field-automatically-on-card.is-checked') !== null, }; // insert or update |