Browse Source

List header contains now a button to add the card to the bottom of the list

Martin Filser 3 years ago
parent
commit
861b98ea37

+ 2 - 2
client/components/lists/list.styl

@@ -91,7 +91,7 @@
     top: -7px
     top: -7px
     right: 3px
     right: 3px
 
 
-  .list-header-plus-icon
+  .list-header-plus-icon,.list-header-plus-square-icon
     color: #a6a6a6
     color: #a6a6a6
     margin-right: 15px
     margin-right: 15px
 
 
@@ -102,7 +102,7 @@
     color: #8c8c8c
     color: #8c8c8c
     font-size: 0.8em
     font-size: 0.8em
 
 
-.list-header .list-header-plus-icon, .js-open-list-menu, .list-header-menu a
+.list-header .list-header-plus-icon, .list-header .list-header-plus-square-icon, .js-open-list-menu, .list-header-menu a
     color #4d4d4d
     color #4d4d4d
     padding-left 4px
     padding-left 4px
 
 

+ 2 - 0
client/components/lists/listHeader.jade

@@ -28,6 +28,7 @@ template(name="listHeader")
           div.list-header-menu
           div.list-header-menu
             unless currentUser.isCommentOnly
             unless currentUser.isCommentOnly
               if canSeeAddCard
               if canSeeAddCard
+                a.js-add-card.fa.fa-plus-square.list-header-plus-square-icon(title="{{_ 'add-card-to-bottom-of-list'}}")
                 a.js-add-card.fa.fa-plus.list-header-plus-icon(title="{{_ 'add-card-to-top-of-list'}}")
                 a.js-add-card.fa.fa-plus.list-header-plus-icon(title="{{_ 'add-card-to-top-of-list'}}")
               a.fa.fa-navicon.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
               a.fa.fa-navicon.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
         else
         else
@@ -41,6 +42,7 @@ template(name="listHeader")
             //if isBoardAdmin
             //if isBoardAdmin
             //  a.fa.js-list-star.list-header-plus-icon(class="fa-star{{#unless starred}}-o{{/unless}}")
             //  a.fa.js-list-star.list-header-plus-icon(class="fa-star{{#unless starred}}-o{{/unless}}")
             if canSeeAddCard
             if canSeeAddCard
+              a.js-add-card.fa.fa-plus-square.list-header-plus-square-icon(title="{{_ 'add-card-to-bottom-of-list'}}")
               a.js-add-card.fa.fa-plus.list-header-plus-icon(title="{{_ 'add-card-to-top-of-list'}}")
               a.js-add-card.fa.fa-plus.list-header-plus-icon(title="{{_ 'add-card-to-top-of-list'}}")
             a.fa.fa-navicon.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
             a.fa.fa-navicon.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
           if currentUser.isBoardAdmin
           if currentUser.isBoardAdmin

+ 10 - 1
client/components/lists/listHeader.js

@@ -101,7 +101,7 @@ BlazeComponent.extendComponent({
           this.starred(!this.starred());
           this.starred(!this.starred());
         },
         },
         'click .js-open-list-menu': Popup.open('listAction'),
         'click .js-open-list-menu': Popup.open('listAction'),
-        'click .js-add-card'(event) {
+        'click .js-add-card.fa-plus'(event) {
           const listDom = $(event.target).parents(
           const listDom = $(event.target).parents(
             `#js-list-${this.currentData()._id}`,
             `#js-list-${this.currentData()._id}`,
           )[0];
           )[0];
@@ -110,6 +110,15 @@ BlazeComponent.extendComponent({
             position: 'top',
             position: 'top',
           });
           });
         },
         },
+        'click .js-add-card.fa-plus-square'(event) {
+          const listDom = $(event.target).parents(
+            `#js-list-${this.currentData()._id}`,
+          )[0];
+          const listComponent = BlazeComponent.getComponentForElement(listDom);
+          listComponent.openForm({
+            position: 'bottom',
+          });
+        },
         'click .js-unselect-list'() {
         'click .js-unselect-list'() {
           Session.set('currentList', null);
           Session.set('currentList', null);
         },
         },