- fix: width to 100%

flex: 1;  // get all space
  order: 1;
This commit is contained in:
Paolo Arena
2019-01-28 13:31:41 +01:00
parent 3f678e28a6
commit d8f0ead522
7 changed files with 124 additions and 69 deletions

View File

@@ -2,7 +2,7 @@
background-color: rgb(250, 250, 250);
padding: 5px;
display: flex;
flex-flow: row;
flex-direction: row;
justify-content: space-between;
}
@@ -52,7 +52,7 @@
}
.drag {
background-color: green;
//background-color: green;
}
.dragArea {

View File

@@ -493,7 +493,7 @@ export default class Todo extends Vue {
// }
//
deselectAllRows(item, check) {
deselectAllRows(item, check, onlythis:boolean = false) {
console.log('deselectAllRows : ', item)
for (let i = 0; i < this.$refs.single.length; i++) {
@@ -503,7 +503,13 @@ export default class Todo extends Vue {
// @ts-ignore
let id = contr.itemtodo.id
// Don't deselect the actual clicked!
if ((check && (item.id !== id)) || (!check)) {
let des = false
if (onlythis) {
des = item.id === id
}else {
des = ((check && (item.id !== id)) || (!check))
}
if (des) {
// @ts-ignore
contr.deselectAndExitEdit()
}

View File

@@ -10,28 +10,26 @@
<div style="display: none">{{ prior = 0, priorcomplet = false }}</div>
<div class="drag">
<div class="flex-container">
<draggable v-model="todos_arr" :options="{draggable:'.myitemdrag'}"
@start="onStart" @end="onEnd" class="dragArea">
<transition-group>
<div :id="getmyid(mytodo.id)" :key="mytodo.id" v-for="mytodo in todos_arr" class="myitemdrag">
<draggable v-model="todos_arr" :options="{draggable:'.myitemdrag'}"
@start="onStart" @end="onEnd" class="dragArea">
<transition-group>
<div :id="getmyid(mytodo.id)" :key="mytodo.id" v-for="mytodo in todos_arr" class="myitemdrag">
<div v-if="(prior !== mytodo.priority) && !mytodo.completed" :class="getTitlePriority(mytodo.priority)">
<label>{{getPriorityByInd(mytodo.priority)}}</label>
</div>
<div v-if="(!priorcomplet && mytodo.completed)" class="titleCompleted">
<label>{{$t('todo.completed')}}</label>
<div style="display: none">{{ priorcomplet = true }}</div>
</div>
<SingleTodo ref="single" @deleteitem="deleteitem" @eventupdate="updateitem"
@deselectAllRows="deselectAllRows"
:itemtodo='mytodo' />
<div style="display: none">{{ prior = mytodo.priority, priorcomplet = mytodo.completed }}</div>
<div v-if="(prior !== mytodo.priority) && !mytodo.completed" :class="getTitlePriority(mytodo.priority)">
<label>{{getPriorityByInd(mytodo.priority)}}</label>
</div>
</transition-group>
</draggable>
</div>
<div v-if="(!priorcomplet && mytodo.completed)" class="titleCompleted">
<label>{{$t('todo.completed')}}</label>
<div style="display: none">{{ priorcomplet = true }}</div>
</div>
<SingleTodo ref="single" @deleteitem="deleteitem" @eventupdate="updateitem"
@deselectAllRows="deselectAllRows"
:itemtodo='mytodo' />
<div style="display: none">{{ prior = mytodo.priority, priorcomplet = mytodo.completed }}</div>
</div>
</transition-group>
</draggable>
</div>
</div>