Hide currentboard in selector (fixes #967)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -22,6 +22,11 @@
|
|||||||
|
|
||||||
import app from '../app/App.js';
|
import app from '../app/App.js';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
|
Vue.prototype.t = t;
|
||||||
|
Vue.prototype.n = n;
|
||||||
|
Vue.prototype.OC = OC;
|
||||||
|
|
||||||
import CollaborationView from '../views/CollaborationView';
|
import CollaborationView from '../views/CollaborationView';
|
||||||
|
|
||||||
/* global oc_defaults oc_config OC OCP OCA */
|
/* global oc_defaults oc_config OC OCP OCA */
|
||||||
|
|||||||
@@ -29,17 +29,18 @@ __webpack_nonce__ = btoa(OC.requestToken);
|
|||||||
__webpack_public_path__ = OC.linkTo('deck', 'js/build/');
|
__webpack_public_path__ = OC.linkTo('deck', 'js/build/');
|
||||||
|
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
|
Vue.prototype.$ = $
|
||||||
|
Vue.prototype.t = t
|
||||||
|
Vue.prototype.n = n
|
||||||
|
Vue.prototype.OC = OC
|
||||||
|
|
||||||
import BoardSelector from './views/BoardSelector';
|
import BoardSelector from './views/BoardSelector';
|
||||||
|
|
||||||
import './../css/collections.css';
|
import './../css/collections.css';
|
||||||
|
|
||||||
((function(OCP) {
|
((function(OCP) {
|
||||||
|
|
||||||
Vue.prototype.$ = $
|
|
||||||
Vue.prototype.t = t
|
|
||||||
Vue.prototype.n = n
|
|
||||||
Vue.prototype.OC = OC
|
|
||||||
|
|
||||||
OCP.Collaboration.registerType('deck', {
|
OCP.Collaboration.registerType('deck', {
|
||||||
action: () => {
|
action: () => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<div id="modal-inner" :class="{ 'icon-loading': loading }">
|
<div id="modal-inner" :class="{ 'icon-loading': loading }">
|
||||||
<h1>Select a board to add to the collection</h1>
|
<h1>Select a board to add to the collection</h1>
|
||||||
<ul v-if="!loading">
|
<ul v-if="!loading">
|
||||||
<li v-for="board in boards" @click="selectedBoard=board.id" :class="{'selected': (selectedBoard === board.id) }">
|
<li v-for="board in boards" v-if="currentBoard && ''+board.id !== ''+currentBoard" @click="selectedBoard=board.id" :class="{'selected': (selectedBoard === board.id) }">
|
||||||
<span class="board-bullet" :style="{ 'backgroundColor': '#' + board.color }"></span>
|
<span class="board-bullet" :style="{ 'backgroundColor': '#' + board.color }"></span>
|
||||||
<span>{{ board.title }}</span>
|
<span>{{ board.title }}</span>
|
||||||
</li>
|
</li>
|
||||||
@@ -84,10 +84,14 @@
|
|||||||
boards: [],
|
boards: [],
|
||||||
selectedBoard: null,
|
selectedBoard: null,
|
||||||
loading: true,
|
loading: true,
|
||||||
|
currentBoard: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
this.fetchBoards();
|
this.fetchBoards();
|
||||||
|
if (angular.element('#board')) {
|
||||||
|
this.currentBoard = angular.element('#board').scope().boardservice.id || null;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchBoards() {
|
fetchBoards() {
|
||||||
|
|||||||
Reference in New Issue
Block a user