简体   繁体   English

在第一个面板中的用户名之后显示每个用户的事件数

[英]Show number of events for the every user just after the user name in 1st panel

I have 2 panels in 'timeline' full-calendar, 1st panel showing users and 2nd panel showing all the events but now I want to show number of events(in bold) also for the every user just after the user name in 1st panel.我在“时间轴”完整日历中有 2 个面板,第一个面板显示用户,第二个面板显示所有事件,但现在我想在第一个面板中的用户名之后也显示每个用户的事件数量(粗体)。 How can I achieve this?我怎样才能做到这一点? Help is highly appreciated.非常感谢帮助。

Sample Code :示例代码:

$('#calendar').fullCalendar({
    defaultView: 'timelineYear',
    header: {
        left: 'prev,next',
        center: 'title',
    },
    resources: getJSonObject(jsonUser),
    events: getJSonObject(jsonEvent),
});

在此处输入图片说明

I am able to solve the problem using resorceRender.我能够使用 resorceRender 解决这个问题。 Just send json from controller and pass it to resourcejson in fullcalender只需从控制器发送 json 并将其传递给 fullcalender 中的 resourcejson

$('#calendar').fullCalendar({ $('#calendar').fullCalendar({
displayEventTime: false,显示事件时间:假,
defaultView: 'timelineYear', defaultView: 'timelineYear',
header: {标题:{
left: 'prev,next',左:'上一个,下一个',
center: 'title',中心:'标题',
}, },
resources: getJSonObject(users),资源:getJSonObject(用户),
resourceRender: function (users, $td) {资源渲染:功能(用户,$ td){

$td.find('.fc-cell-text').append($(' '+users.count+' ')); $td.find('.fc-cell-text').append($(' '+users.count+' '));
}, },
events: getJSonObject(events),事件:getJSonObject(events),
}); });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM