Skip to content
Extraits de code Groupes Projets
Valider 7e3dee1b rédigé par Benjamin's avatar Benjamin
Parcourir les fichiers

add allday event

parent 5d8b7868
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -29,6 +29,7 @@ class ScopHome(models.AbstractModel): ...@@ -29,6 +29,7 @@ class ScopHome(models.AbstractModel):
self, e.start) if not e.allday else e.start_date, self, e.start) if not e.allday else e.start_date,
'end': fields.Datetime.context_timestamp( 'end': fields.Datetime.context_timestamp(
self, e.stop) if not e.allday else e.stop_date, self, e.stop) if not e.allday else e.stop_date,
'allDay': e.allday
}, event_ids)) }, event_ids))
# Calcul des activités # Calcul des activités
......
...@@ -35,10 +35,6 @@ odoo.define('cgscop_home.home', function (require) { ...@@ -35,10 +35,6 @@ odoo.define('cgscop_home.home', function (require) {
}, },
}, },
init: function() {
var result = this._super.apply(this, arguments);
return result;
},
willStart: function() { willStart: function() {
var deferred = new jQuery.Deferred(); var deferred = new jQuery.Deferred();
...@@ -58,12 +54,15 @@ odoo.define('cgscop_home.home', function (require) { ...@@ -58,12 +54,15 @@ odoo.define('cgscop_home.home', function (require) {
}, },
start: function() { start: function() {
this._super();
this.calendar = this.render_calendar(); this.calendar = this.render_calendar();
this.calendar.render(); this.calendar.render();
this.calendar.updateSize(); this.calendar.refetchEvents();
console.log(this.$el.find('#calendar-container')); setTimeout(this.calendar.updateSize(),1000);
console.log(this.$el.find('#calendar-container')[0]); setTimeout(console.log("Salut 1000"),1000);
setTimeout(console.log("Salut 2000"),2000);
setTimeout(console.log("Salut 3000"),3000);
setTimeout(console.log("Salut 100000"),100000);
// return this._super.apply(this, arguments)
}, },
render_calendar: function() { render_calendar: function() {
self = this self = this
...@@ -71,7 +70,7 @@ odoo.define('cgscop_home.home', function (require) { ...@@ -71,7 +70,7 @@ odoo.define('cgscop_home.home', function (require) {
var calendar = new FullCalendar.Calendar(calendarEl, { var calendar = new FullCalendar.Calendar(calendarEl, {
themeSystem: 'bootstrap', themeSystem: 'bootstrap',
plugins: [ 'bootstrap', 'dayGrid', 'timeGrid', 'monthGrid', 'list' ], plugins: [ 'bootstrap', 'dayGrid', 'timeGrid', 'list' ],
defaultView: 'timeGridWeek', defaultView: 'timeGridWeek',
minTime: '07:00:00', minTime: '07:00:00',
maxTime: '21:00:00', maxTime: '21:00:00',
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter