2019-01-14 22:40:30 +01:00
|
|
|
<template>
|
|
|
|
|
<q-page>
|
|
|
|
|
<div class="panel">
|
|
|
|
|
<p class="caption"></p>
|
|
|
|
|
|
|
|
|
|
<q-input v-model="todo" inverted float-label="Inserisci il Todo"
|
|
|
|
|
:after="[{icon: 'arrow_forward', content: true, handler () {}}]"
|
|
|
|
|
v-on:keyup.enter="insertTodo"/>
|
|
|
|
|
|
|
|
|
|
|
2019-01-27 19:09:48 +01:00
|
|
|
<div style="display: none">{{ prior = 0 }}</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">
|
|
|
|
|
|
|
|
|
|
<div v-if="prior !== mytodo.priority">
|
|
|
|
|
<label>{{getPriorityByInd(mytodo.priority)}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
<SingleTodo ref="single" @deleteitem="deleteitem" @eventupdate="updateitem"
|
|
|
|
|
@click="clickRiga"
|
|
|
|
|
:itemtodo='mytodo' />
|
2019-01-16 02:26:43 +01:00
|
|
|
|
2019-01-27 19:09:48 +01:00
|
|
|
<div style="display: none">{{ prior = mytodo.priority }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</transition-group>
|
|
|
|
|
</draggable>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-01-14 22:40:30 +01:00
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</q-page>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" src="./todo.ts">
|
|
|
|
|
</script>
|
2019-01-16 02:26:43 +01:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
@import './todo.scss';
|
|
|
|
|
</style>
|