mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[ADD] web_calendar_slot_duration: customizable calendar slots timespan
This module extends the functionality of backend calendars to support custom slot durations and to allow you to provide more specific UX regarding event duration and snapping. @Tecnativa TT28201 [UPD] Update web_calendar_slot_duration.pot [UPD] README.rst
This commit is contained in:
committed by
Christopher Rogos
parent
f3d59726f5
commit
7fa193cf1e
22
web_calendar_slot_duration/static/src/js/calendar_model.js
Normal file
22
web_calendar_slot_duration/static/src/js/calendar_model.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/* Copyright 2021 Tecnativa - Jairo Llopis
|
||||
* License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */
|
||||
|
||||
odoo.define("web_calendar_slot_duration.CalendarModel", function (require) {
|
||||
"use strict";
|
||||
|
||||
var CalendarModel = require("web.CalendarModel");
|
||||
|
||||
CalendarModel.include({
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
_getFullCalendarOptions: function () {
|
||||
var result = this._super.call(this, arguments);
|
||||
result.slotDuration =
|
||||
this.data.context.calendar_slot_duration ||
|
||||
result.slotDuration ||
|
||||
"00:30:00";
|
||||
return result;
|
||||
},
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user