Implement collections integration
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -21,8 +21,11 @@
|
||||
*/
|
||||
|
||||
import app from '../app/App.js';
|
||||
import Vue from 'vue';
|
||||
import CollaborationView from '../views/CollaborationView';
|
||||
|
||||
/* global oc_defaults OC OCP OCA */
|
||||
app.controller('BoardController', function ($rootScope, $scope, $stateParams, StatusService, BoardService, StackService, CardService, LabelService, $state, $transitions, $filter, FileService) {
|
||||
app.controller('BoardController', function ($rootScope, $scope, $element, $stateParams, StatusService, BoardService, StackService, CardService, LabelService, $state, $transitions, $filter, FileService) {
|
||||
|
||||
$scope.sidebar = $rootScope.sidebar;
|
||||
|
||||
@@ -148,6 +151,31 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
}
|
||||
});
|
||||
|
||||
const ComponentVM = new Vue({
|
||||
render: h => h(CollaborationView),
|
||||
data: {
|
||||
model: BoardService.getCurrent()
|
||||
},
|
||||
});
|
||||
$scope.mountCollections = () => {
|
||||
console.log('mountCollections');
|
||||
const MountingPoint = document.getElementById('collaborationResources');
|
||||
if (MountingPoint) {
|
||||
console.log(MountingPoint);
|
||||
ComponentVM.model = BoardService.getCurrent();
|
||||
ComponentVM.$mount(MountingPoint);
|
||||
}
|
||||
};
|
||||
$scope.$$postDigest($scope.mountCollections);
|
||||
$scope.$watch(function () {
|
||||
return BoardService.getCurrent();
|
||||
}, function() {
|
||||
ComponentVM.model = BoardService.getCurrent();
|
||||
if ($scope.sidebar.show) {
|
||||
$scope.$$postDigest($scope.mountCollections);
|
||||
}
|
||||
});
|
||||
|
||||
$scope.toggleCompactMode = function() {
|
||||
$rootScope.compactMode = !$rootScope.compactMode;
|
||||
localStorage.setItem('deck.compactMode', JSON.stringify($rootScope.compactMode));
|
||||
|
||||
Reference in New Issue
Block a user