Browse Source

changing card color now closes the popup and doesn't refresh the whole boards page

Martin Filser 2 năm trước cách đây
mục cha
commit
45c2f1007b
1 tập tin đã thay đổi với 6 bổ sung4 xóa
  1. 6 4
      client/components/cards/cardDetails.js

+ 6 - 4
client/components/cards/cardDetails.js

@@ -846,13 +846,15 @@ BlazeComponent.extendComponent({
         'click .js-palette-color'() {
           this.currentColor.set(this.currentData().color);
         },
-        'click .js-submit'() {
+        'click .js-submit'(event) {
+          event.preventDefault();
           this.currentCard.setColor(this.currentColor.get());
-          Popup.close();
+          Popup.back();
         },
-        'click .js-remove-color'() {
+        'click .js-remove-color'(event) {
+          event.preventDefault();
           this.currentCard.setColor(null);
-          Popup.close();
+          Popup.back();
         },
       },
     ];