فهرست منبع

Checklist and Checklist-Item editing closes all other inlined forms

Martin Filser 3 سال پیش
والد
کامیت
f74fab64b6
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      client/components/cards/checklists.js

+ 3 - 2
client/components/cards/checklists.js

@@ -188,6 +188,7 @@ BlazeComponent.extendComponent({
     }
     }
   },
   },
 
 
+  /** closes all inlined forms (checklist and checklist-item input fields) */
   closeAllInlinedForms() {
   closeAllInlinedForms() {
     this.$('.js-close-inlined-form').click();
     this.$('.js-close-inlined-form').click();
   },
   },
@@ -216,8 +217,8 @@ BlazeComponent.extendComponent({
         'click .js-delete-checklist-item': this.deleteItem,
         'click .js-delete-checklist-item': this.deleteItem,
         'click .confirm-checklist-delete': this.deleteChecklist,
         'click .confirm-checklist-delete': this.deleteChecklist,
         'focus .js-add-checklist-item': this.focusChecklistItem,
         'focus .js-add-checklist-item': this.focusChecklistItem,
-        'click .add-checklist-item.js-open-inlined-form': this.closeAllInlinedForms,
-        'click .add-checklist.js-open-inlined-form': this.closeAllInlinedForms,
+        // add and delete checklist / checklist-item
+        'click .js-open-inlined-form': this.closeAllInlinedForms,
         keydown: this.pressKey,
         keydown: this.pressKey,
       },
       },
     ];
     ];