From bc79b83140ec2e120f4050ac78f6f8baa0483137 Mon Sep 17 00:00:00 2001 From: Xavier Priour Date: Tue, 13 Oct 2015 20:29:25 +0200 Subject: Add card import UI --- client/components/lists/listHeader.jade | 9 +++++++++ client/components/lists/listHeader.js | 2 ++ i18n/en.i18n.json | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/client/components/lists/listHeader.jade b/client/components/lists/listHeader.jade index 7d01f1ba..597e2bbd 100644 --- a/client/components/lists/listHeader.jade +++ b/client/components/lists/listHeader.jade @@ -25,11 +25,20 @@ template(name="listActionPopup") li: a.js-archive-cards {{_ 'list-archive-cards'}} hr ul.pop-over-list + li: a.js-import-card {{_ 'import-card'}} li: a.js-close-list {{_ 'archive-list'}} template(name="listMoveCardsPopup") +boardLists +template(name="listImportCardPopup") + form + label + | {{_ 'card-json'}} + //+editor(class="js-card-json" autofocus=true) + textarea.js-card-json(placeholder="{{_ 'card-json-placeholder'}}" autofocus) + input.primary.wide(type="submit" value="{{_ 'import'}}") + template(name="boardLists") ul.pop-over-list each currentBoard.lists diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index a893e873..4f5fc3a0 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -33,6 +33,7 @@ Template.listActionPopup.events({ MultiSelection.add(cardIds); Popup.close(); }, + 'click .js-import-card': Popup.open('listImportCard'), 'click .js-move-cards': Popup.open('listMoveCards'), 'click .js-archive-cards': Popup.afterConfirm('listArchiveCards', function() { this.allCards().forEach((card) => { @@ -40,6 +41,7 @@ Template.listActionPopup.events({ }); Popup.close(); }), + 'click .js-close-list'(evt) { evt.preventDefault(); this.archive(); diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index a8c2c5d9..436db890 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -65,6 +65,8 @@ "card-edit-attachments": "Edit attachments", "card-edit-labels": "Edit labels", "card-edit-members": "Edit members", + "card-json": "Card data", + "card-json-placeholder": "Paste your valid JSON data here", "card-labels-title": "Change the labels for the card.", "card-members-title": "Add or remove members of the board from the card.", "cardAttachmentsPopup-title": "Attach From", @@ -118,6 +120,8 @@ "fullname": "Full Name", "header-logo-title": "Go back to your boards page.", "home": "Home", + "import": "Import", + "import-card": "Import as new card", "info": "Infos", "initials": "Initials", "joined": "joined", @@ -136,6 +140,7 @@ "list-select-cards": "Select all cards in this list", "listActionPopup-title": "List Actions", "listArchiveCardsPopup-title": "Archive All Cards in this List?", + "listImportCardPopup-title": "Import as new card", "listMoveCardsPopup-title": "Move All Cards in List", "lists": "Lists", "log-out": "Log Out", -- cgit v1.2.3-1-g7c22