mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[CHR WIP] CHR10, CHR12, CHR13, CHR14, CHR15, CHR17 - WIP not validated
This commit is contained in:
1 parent
994d3449d3
commit
fcd8199d86
12 files changed
+353
-52
No files matched your search
@@ -17,7 +17,7 @@ transition-group.vuecal__cell(
|
||||
@keypress.enter="onCellkeyPressEnter($event)"
|
||||
@touchstart="!isDisabled && onCellTouchStart($event, splitsCount ? split.id : null)"
|
||||
@mousedown="!isDisabled && onCellMouseDown($event, splitsCount ? split.id : null)"
|
||||
@click="!isDisabled && onCellClick($event)"
|
||||
@click="!isDisabled && onCellClick($event, split)"
|
||||
@dblclick="!isDisabled && onCellDblClick($event)"
|
||||
@contextmenu="!isDisabled && options.cellContextmenu && onCellContextMenu($event)"
|
||||
@dragenter="!isDisabled && editEvents.drag && dnd && dnd.cellDragEnter($event, $data, data.startDate)"
|
||||
@@ -63,6 +63,7 @@ transition-group.vuecal__cell(
|
||||
|
||||
<script>
|
||||
import Event from './event.vue'
|
||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
|
||||
export default {
|
||||
inject: ['vuecal', 'utils', 'modules', 'view', 'domEvents'],
|
||||
@@ -80,6 +81,7 @@ export default {
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
tmUtils,
|
||||
cellOverlaps: {},
|
||||
cellOverlapsStreak: 1, // Largest amount of simultaneous events in cell.
|
||||
// On mouse down, save the time at cursor so it can be reused on cell focus event
|
||||
@@ -251,7 +253,22 @@ export default {
|
||||
this.onCellMouseDown(DOMEvent, split, true)
|
||||
},
|
||||
|
||||
onCellClick (DOMEvent) {
|
||||
onCellClick(DOMEvent, split) {
|
||||
if (DOMEvent.offsetY > 950 && DOMEvent.offsetY < 1700) {
|
||||
const dateFrom = split.date
|
||||
dateFrom.setHours(Math.floor(DOMEvent.offsetY / 100), 0, 0, 0)
|
||||
const dateTo = new Date(dateFrom)
|
||||
dateTo.setHours(dateFrom.getHours() + 1)
|
||||
this.$events.emit('show-subtask-modal', {})
|
||||
setTimeout(() => {
|
||||
this.$events.emit('add-timeblock', {
|
||||
id: null,
|
||||
start: tmUtils.formatDateTimeForBackend(dateFrom),
|
||||
end: tmUtils.formatDateTimeForBackend(dateTo)
|
||||
})
|
||||
}, 150)
|
||||
}
|
||||
|
||||
if (!this.isDOMElementAnEvent(DOMEvent.target)) this.selectCell(DOMEvent)
|
||||
},
|
||||
|
||||
|
||||
@@ -245,7 +245,6 @@ export default {
|
||||
);
|
||||
|
||||
const height = Math.max(bottom - top, 5); // Min height is 5px.
|
||||
|
||||
return { top, height };
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user