diff --git a/js/controller/BoardController.js b/js/controller/BoardController.js
index 418b0e5ad..802756db0 100644
--- a/js/controller/BoardController.js
+++ b/js/controller/BoardController.js
@@ -19,12 +19,17 @@
* along with this program. If not, see .
*
*/
+/* global oc_defaults oc_config OC OCP OCA t n */
import app from '../app/App.js';
import Vue from 'vue';
+
+Vue.prototype.t = t;
+Vue.prototype.n = n;
+Vue.prototype.OC = OC;
+
import CollaborationView from '../views/CollaborationView';
-/* global oc_defaults oc_config OC OCP OCA */
app.controller('BoardController', function ($rootScope, $scope, $element, $stateParams, StatusService, BoardService, StackService, CardService, LabelService, $state, $transitions, $filter, FileService) {
$scope.sidebar = $rootScope.sidebar;
diff --git a/js/init-collections.js b/js/init-collections.js
index d4de97435..9a6d06911 100644
--- a/js/init-collections.js
+++ b/js/init-collections.js
@@ -29,17 +29,17 @@ __webpack_nonce__ = btoa(OC.requestToken);
__webpack_public_path__ = OC.linkTo('deck', 'js/build/');
import Vue from 'vue';
+
+Vue.prototype.t = t;
+Vue.prototype.n = n;
+Vue.prototype.OC = OC;
+
import BoardSelector from './views/BoardSelector';
import './../css/collections.css';
((function(OCP) {
- Vue.prototype.$ = $
- Vue.prototype.t = t
- Vue.prototype.n = n
- Vue.prototype.OC = OC
-
OCP.Collaboration.registerType('deck', {
action: () => {
return new Promise((resolve, reject) => {
@@ -63,7 +63,7 @@ import './../css/collections.css';
});
});
},
- typeString: t('deck', 'board'),
+ typeString: t('deck', 'Link to a board'),
typeIconClass: 'icon-deck'
});
})(window.OCP));
diff --git a/js/views/BoardSelector.vue b/js/views/BoardSelector.vue
index 576e6de54..a34790559 100644
--- a/js/views/BoardSelector.vue
+++ b/js/views/BoardSelector.vue
@@ -23,14 +23,14 @@
-
Select a board to add to the collection
+
{{ t('deck', 'Select the board to link to a project') }}
-
+
@@ -84,10 +84,14 @@
boards: [],
selectedBoard: null,
loading: true,
+ currentBoard: null,
}
},
beforeMount() {
this.fetchBoards();
+ if (angular.element('#board')) {
+ this.currentBoard = angular.element('#board').scope().boardservice.id || null;
+ }
},
methods: {
fetchBoards() {