Procházet zdrojové kódy

Duplicate Board now open board

Ben0it-T před 3 roky
rodič
revize
9fa5b59d7c
1 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. 6 1
      client/components/boards/boardsList.js

+ 6 - 1
client/components/boards/boardsList.js

@@ -228,6 +228,7 @@ BlazeComponent.extendComponent({
           evt.preventDefault();
           evt.preventDefault();
         },
         },
         'click .js-clone-board'(evt) {
         'click .js-clone-board'(evt) {
+          let title = getSlug(Boards.findOne(this.currentData()._id).title) || 'cloned-board';
           Meteor.call(
           Meteor.call(
             'copyBoard',
             'copyBoard',
             this.currentData()._id,
             this.currentData()._id,
@@ -242,7 +243,11 @@ BlazeComponent.extendComponent({
               } else {
               } else {
                 Session.set('fromBoard', null);
                 Session.set('fromBoard', null);
                 subManager.subscribe('board', res, false);
                 subManager.subscribe('board', res, false);
-                Utils.goBoardId(res);
+                FlowRouter.go('board', {
+                  id: res,
+                  slug: title,
+                });
+                //Utils.goBoardId(res);
               }
               }
             },
             },
           );
           );