Merge branch 'hotfix/4.8.2'
This commit is contained in:
@@ -196,6 +196,14 @@ Espo.define('crm:views/calendar/calendar', ['view', 'lib!full-calendar'], functi
|
||||
this.$el.find('button[data-action="today"]').removeClass('active');
|
||||
}
|
||||
|
||||
var title = this.getTitle();
|
||||
|
||||
this.$el.find('.date-title h4 span').text(title);
|
||||
},
|
||||
|
||||
getTitle: function () {
|
||||
var view = this.$calendar.fullCalendar('getView');
|
||||
|
||||
var map = {
|
||||
'agendaWeek': 'week',
|
||||
'agendaDay': 'day',
|
||||
@@ -215,7 +223,8 @@ Espo.define('crm:views/calendar/calendar', ['view', 'lib!full-calendar'], functi
|
||||
if (this.options.userId && this.options.userName) {
|
||||
title += ' (' + this.options.userName + ')';
|
||||
}
|
||||
this.$el.find('.date-title h4 span').text(title);
|
||||
|
||||
return title;
|
||||
},
|
||||
|
||||
convertToFcEvent: function (o) {
|
||||
|
||||
@@ -281,12 +281,18 @@ Espo.define('crm:views/calendar/timeline', ['view', 'lib!vis'], function (Dep, V
|
||||
if (!this.header) {
|
||||
return;
|
||||
}
|
||||
var title;
|
||||
|
||||
var title = this.getTitle();
|
||||
this.$el.find('.date-title h4 span').text(title);
|
||||
},
|
||||
|
||||
getTitle: function () {
|
||||
var title = '';
|
||||
|
||||
if (this.options.userId && this.options.userName) {
|
||||
title += ' (' + this.options.userName + ')';
|
||||
}
|
||||
this.$el.find('.date-title h4 span').text(title);
|
||||
return title;
|
||||
},
|
||||
|
||||
convertEvent: function (o) {
|
||||
|
||||
@@ -70,7 +70,16 @@ Espo.define('crm:views/dashlets/calendar', 'views/dashlets/abstract/base', funct
|
||||
enabledScopeList: this.getOption('enabledScopeList'),
|
||||
containerSelector: this.options.el
|
||||
}, function (view) {
|
||||
this.listenTo(view, 'view', function () {
|
||||
if (this.getOption('mode') === 'month') {
|
||||
var title = this.getOption('title');
|
||||
var $headerSpan = this.$el.closest('.panel').find('.panel-heading > .panel-title > span');
|
||||
title += ' » ' + view.getTitle();
|
||||
$headerSpan.html(title);
|
||||
}
|
||||
}, this);
|
||||
view.render();
|
||||
|
||||
this.on('resize', function () {
|
||||
setTimeout(function() {
|
||||
view.adjustSize();
|
||||
|
||||
Reference in New Issue
Block a user