我有一个显示2种事件的p:schedule
。
包含Events
的列表中填充了Try
方法,如下所示:
//ResourceEvents
eventResourceAvailPerDay.addEvent(new DefaultScheduleEvent(reason, dateBeginConverted, dateEndConverted, "resource"));
//WaitingItemEvents
DefaultScheduleEvent newResourceEvent = new DefaultScheduleEvent(reason, dteBeginOrWaitingItem, dteEndOrWaitingItem, orWaitinglist.getWKey());
newResourceEvent.setStyleClass("waitingitem");
eventResourceAvailPerDay.addEvent(newResourceEvent);
2 Events
具有以下创建的以下css类:resource
,waitingitem
以下是我想要实现的目标:
在Month视图中,我只希望waitingitem
类可见,因此隐藏resource
类,如果可能,也可以覆盖JSP 2.0,这些事件(waitingitem
)是不可点击的。
在周视图和日视图中,只有resource
类可见
我已经有了以下css代码,它没有给我我想要的结果:
.waitingitem, .schedule .waitingitem .fc-view-month, .waitingitem a {
display: none;
}
.waitingitem, .schedule .waitingitem .fc-view-agendaWeek, .waitingitem a {
display: block!important;
}
.resource, .schedule .resource .fc-view-month, .resource a {
display: block;
}
.resource, .schedule .resource .fc-view-agendaWeek, .resource a {
display: none!important;
}
.resource, .schedule .resource .fc-view-agendaDay, .resource a {
display: none!important;
}
有什么建议吗?
更新 //工作css
schedule .fc-view-month .resource,
.schedule .fc-view-agendaWeek .resource,
.schedule .fc-view-agendaDay .resource,
.schedule .fc-view-agendaWeek .waitingitem
.schedule .fc-view-agendaDay .waitingitem
{
display: block;
}
.schedule .fc-view-month .waitingitem
{
display: none!important;
}
答案 0 :(得分:1)
你可以尝试这样的事情:
#id-of-a-parent .fc-view-month .resource,
#id-of-a-parent .fc-view-agendaWeek .waitingitem,
#id-of-a-parent .fc-view-agendaDay .waitingitem
{
display: none;
}
#id-of-a-parent .fc-view-month .waitingitem,
#id-of-a-parent .fc-view-agendaWeek .resource,
#id-of-a-parent .fc-view-agendaDay .resource
{
display: block;
}
注意:#id-of-a-parent
可以是您想要的,只是为了使规则更重要。
这有意义吗?我仍然无法测试您的设置。