浏览代码

Add card import UI

Xavier Priour 9 年之前
父节点
当前提交
bc79b83140
共有 3 个文件被更改,包括 16 次插入0 次删除
  1. 9 0
      client/components/lists/listHeader.jade
  2. 2 0
      client/components/lists/listHeader.js
  3. 5 0
      i18n/en.i18n.json

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

@@ -25,11 +25,20 @@ template(name="listActionPopup")
       li: a.js-archive-cards {{_ 'list-archive-cards'}}
       li: a.js-archive-cards {{_ 'list-archive-cards'}}
   hr
   hr
   ul.pop-over-list
   ul.pop-over-list
+    li: a.js-import-card {{_ 'import-card'}}
     li: a.js-close-list {{_ 'archive-list'}}
     li: a.js-close-list {{_ 'archive-list'}}
 
 
 template(name="listMoveCardsPopup")
 template(name="listMoveCardsPopup")
   +boardLists
   +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")
 template(name="boardLists")
   ul.pop-over-list
   ul.pop-over-list
     each currentBoard.lists
     each currentBoard.lists

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

@@ -33,6 +33,7 @@ Template.listActionPopup.events({
     MultiSelection.add(cardIds);
     MultiSelection.add(cardIds);
     Popup.close();
     Popup.close();
   },
   },
+  'click .js-import-card': Popup.open('listImportCard'),
   'click .js-move-cards': Popup.open('listMoveCards'),
   'click .js-move-cards': Popup.open('listMoveCards'),
   'click .js-archive-cards': Popup.afterConfirm('listArchiveCards', function() {
   'click .js-archive-cards': Popup.afterConfirm('listArchiveCards', function() {
     this.allCards().forEach((card) => {
     this.allCards().forEach((card) => {
@@ -40,6 +41,7 @@ Template.listActionPopup.events({
     });
     });
     Popup.close();
     Popup.close();
   }),
   }),
+
   'click .js-close-list'(evt) {
   'click .js-close-list'(evt) {
     evt.preventDefault();
     evt.preventDefault();
     this.archive();
     this.archive();

+ 5 - 0
i18n/en.i18n.json

@@ -65,6 +65,8 @@
     "card-edit-attachments": "Edit attachments",
     "card-edit-attachments": "Edit attachments",
     "card-edit-labels": "Edit labels",
     "card-edit-labels": "Edit labels",
     "card-edit-members": "Edit members",
     "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-labels-title": "Change the labels for the card.",
     "card-members-title": "Add or remove members of the board from the card.",
     "card-members-title": "Add or remove members of the board from the card.",
     "cardAttachmentsPopup-title": "Attach From",
     "cardAttachmentsPopup-title": "Attach From",
@@ -118,6 +120,8 @@
     "fullname": "Full Name",
     "fullname": "Full Name",
     "header-logo-title": "Go back to your boards page.",
     "header-logo-title": "Go back to your boards page.",
     "home": "Home",
     "home": "Home",
+    "import": "Import",
+    "import-card": "Import as new card",
     "info": "Infos",
     "info": "Infos",
     "initials": "Initials",
     "initials": "Initials",
     "joined": "joined",
     "joined": "joined",
@@ -136,6 +140,7 @@
     "list-select-cards": "Select all cards in this list",
     "list-select-cards": "Select all cards in this list",
     "listActionPopup-title": "List Actions",
     "listActionPopup-title": "List Actions",
     "listArchiveCardsPopup-title": "Archive All Cards in this List?",
     "listArchiveCardsPopup-title": "Archive All Cards in this List?",
+    "listImportCardPopup-title": "Import as new card",
     "listMoveCardsPopup-title": "Move All Cards in List",
     "listMoveCardsPopup-title": "Move All Cards in List",
     "lists": "Lists",
     "lists": "Lists",
     "log-out": "Log Out",
     "log-out": "Log Out",