Răsfoiți Sursa

Remove unnecessary template name declaration

This code was duplicate with the name we use to `register` the
component. A update of blaze-component removed the need to duplicate
this declaration.
Maxime Quandalle 9 ani în urmă
părinte
comite
ac6491ea12

+ 0 - 4
client/components/activities/activities.js

@@ -1,10 +1,6 @@
 const activitiesPerPage = 20;
 const activitiesPerPage = 20;
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'activities';
-  },
-
   onCreated() {
   onCreated() {
     // XXX Should we use ReactiveNumber?
     // XXX Should we use ReactiveNumber?
     this.page = new ReactiveVar(1);
     this.page = new ReactiveVar(1);

+ 0 - 4
client/components/activities/comments.js

@@ -1,10 +1,6 @@
 const commentFormIsOpen = new ReactiveVar(false);
 const commentFormIsOpen = new ReactiveVar(false);
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'commentForm';
-  },
-
   onDestroyed() {
   onDestroyed() {
     commentFormIsOpen.set(false);
     commentFormIsOpen.set(false);
   },
   },

+ 0 - 4
client/components/boards/boardArchive.js

@@ -5,10 +5,6 @@ Template.boardListHeaderBar.events({
 });
 });
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'archivedBoards';
-  },
-
   onCreated() {
   onCreated() {
     this.subscribe('archivedBoards');
     this.subscribe('archivedBoards');
   },
   },

+ 0 - 8
client/components/boards/boardBody.js

@@ -1,10 +1,6 @@
 const subManager = new SubsManager();
 const subManager = new SubsManager();
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'board';
-  },
-
   onCreated() {
   onCreated() {
     this.draggingActive = new ReactiveVar(false);
     this.draggingActive = new ReactiveVar(false);
     this.showOverlay = new ReactiveVar(false);
     this.showOverlay = new ReactiveVar(false);
@@ -180,10 +176,6 @@ Template.boardBody.onRendered(function() {
 });
 });
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'addListForm';
-  },
-
   // Proxy
   // Proxy
   open() {
   open() {
     this.childComponents('inlinedForm')[0].open();
     this.childComponents('inlinedForm')[0].open();

+ 0 - 16
client/components/boards/boardHeader.js

@@ -41,10 +41,6 @@ Template.boardChangeTitlePopup.events({
 });
 });
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'boardHeaderBar';
-  },
-
   isStarred() {
   isStarred() {
     const boardId = Session.get('currentBoard');
     const boardId = Session.get('currentBoard');
     const user = Meteor.user();
     const user = Meteor.user();
@@ -93,10 +89,6 @@ BlazeComponent.extendComponent({
 }).register('boardHeaderBar');
 }).register('boardHeaderBar');
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'boardChangeColorPopup';
-  },
-
   backgroundColors() {
   backgroundColors() {
     return Boards.simpleSchema()._schema.color.allowedValues;
     return Boards.simpleSchema()._schema.color.allowedValues;
   },
   },
@@ -119,10 +111,6 @@ BlazeComponent.extendComponent({
 }).register('boardChangeColorPopup');
 }).register('boardChangeColorPopup');
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'createBoardPopup';
-  },
-
   onCreated() {
   onCreated() {
     this.visibilityMenuIsOpen = new ReactiveVar(false);
     this.visibilityMenuIsOpen = new ReactiveVar(false);
     this.visibility = new ReactiveVar('private');
     this.visibility = new ReactiveVar('private');
@@ -170,10 +158,6 @@ BlazeComponent.extendComponent({
 }).register('createBoardPopup');
 }).register('createBoardPopup');
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'boardChangeVisibilityPopup';
-  },
-
   visibilityCheck() {
   visibilityCheck() {
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
     return this.currentData() === currentBoard.permission;
     return this.currentData() === currentBoard.permission;

+ 0 - 4
client/components/boards/boardsList.js

@@ -1,8 +1,4 @@
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'boardList';
-  },
-
   boards() {
   boards() {
     return Boards.find({
     return Boards.find({
       archived: false,
       archived: false,

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

@@ -1,8 +1,4 @@
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'cardDetails';
-  },
-
   mixins() {
   mixins() {
     return [Mixins.InfiniteScrolling, Mixins.PerfectScrollbar];
     return [Mixins.InfiniteScrolling, Mixins.PerfectScrollbar];
   },
   },

+ 0 - 4
client/components/cards/labels.js

@@ -4,10 +4,6 @@ Meteor.startup(() => {
 });
 });
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'formLabel';
-  },
-
   onCreated() {
   onCreated() {
     this.currentColor = new ReactiveVar(this.data().color);
     this.currentColor = new ReactiveVar(this.data().color);
   },
   },

+ 0 - 4
client/components/import/import.js

@@ -7,10 +7,6 @@
 /// - getLabel(): i18n key for the text displayed in the popup, usually to
 /// - getLabel(): i18n key for the text displayed in the popup, usually to
 /// explain how to get the data out of the source system.
 /// explain how to get the data out of the source system.
 const ImportPopup = BlazeComponent.extendComponent({
 const ImportPopup = BlazeComponent.extendComponent({
-  template() {
-    return 'importPopup';
-  },
-
   jsonText() {
   jsonText() {
     return Session.get('import.text');
     return Session.get('import.text');
   },
   },

+ 0 - 4
client/components/lists/list.js

@@ -1,10 +1,6 @@
 const { calculateIndex } = Utils;
 const { calculateIndex } = Utils;
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'list';
-  },
-
   // Proxy
   // Proxy
   openForm(options) {
   openForm(options) {
     this.childComponents('listBody')[0].openForm(options);
     this.childComponents('listBody')[0].openForm(options);

+ 0 - 8
client/components/lists/listBody.js

@@ -1,8 +1,4 @@
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'listBody';
-  },
-
   mixins() {
   mixins() {
     return [Mixins.PerfectScrollbar];
     return [Mixins.PerfectScrollbar];
   },
   },
@@ -122,10 +118,6 @@ function toggleValueInReactiveArray(reactiveValue, value) {
 }
 }
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'addCardForm';
-  },
-
   onCreated() {
   onCreated() {
     this.labels = new ReactiveVar([]);
     this.labels = new ReactiveVar([]);
     this.members = new ReactiveVar([]);
     this.members = new ReactiveVar([]);

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

@@ -1,8 +1,4 @@
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'listHeader';
-  },
-
   editTitle(evt) {
   editTitle(evt) {
     evt.preventDefault();
     evt.preventDefault();
     const newTitle = this.childComponents('inlinedForm')[0].getValue().trim();
     const newTitle = this.childComponents('inlinedForm')[0].getValue().trim();

+ 0 - 8
client/components/sidebar/sidebar.js

@@ -9,10 +9,6 @@ const viewTitles = {
 };
 };
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'sidebar';
-  },
-
   mixins() {
   mixins() {
     return [Mixins.InfiniteScrolling, Mixins.PerfectScrollbar];
     return [Mixins.InfiniteScrolling, Mixins.PerfectScrollbar];
   },
   },
@@ -232,10 +228,6 @@ Template.membersWidget.onRendered(draggableMembersLabelsWidgets);
 Template.labelsWidget.onRendered(draggableMembersLabelsWidgets);
 Template.labelsWidget.onRendered(draggableMembersLabelsWidgets);
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'addMemberPopup';
-  },
-
   onCreated() {
   onCreated() {
     this.error = new ReactiveVar('');
     this.error = new ReactiveVar('');
     this.loading = new ReactiveVar(false);
     this.loading = new ReactiveVar(false);

+ 0 - 4
client/components/sidebar/sidebarArchives.js

@@ -1,8 +1,4 @@
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'archivesSidebar';
-  },
-
   tabs() {
   tabs() {
     return [
     return [
       { name: TAPi18n.__('cards'), slug: 'cards' },
       { name: TAPi18n.__('cards'), slug: 'cards' },

+ 0 - 8
client/components/sidebar/sidebarFilters.js

@@ -1,8 +1,4 @@
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'filterSidebar';
-  },
-
   events() {
   events() {
     return [{
     return [{
       'click .js-toggle-label-filter'(evt) {
       'click .js-toggle-label-filter'(evt) {
@@ -37,10 +33,6 @@ function mutateSelectedCards(mutationName, ...args) {
 }
 }
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'multiselectionSidebar';
-  },
-
   mapSelection(kind, _id) {
   mapSelection(kind, _id) {
     return Cards.find(MultiSelection.getMongoSelector()).map((card) => {
     return Cards.find(MultiSelection.getMongoSelector()).map((card) => {
       const methodName = kind === 'label' ? 'hasLabel' : 'isAssigned';
       const methodName = kind === 'label' ? 'hasLabel' : 'isAssigned';

+ 0 - 4
client/components/users/userAvatar.js

@@ -52,10 +52,6 @@ Template.userAvatarInitials.helpers({
 });
 });
 
 
 BlazeComponent.extendComponent({
 BlazeComponent.extendComponent({
-  template() {
-    return 'changeAvatarPopup';
-  },
-
   onCreated() {
   onCreated() {
     this.error = new ReactiveVar('');
     this.error = new ReactiveVar('');
   },
   },