| Issue 327: | Default cursor for non-editable no-url events | |
| 3 people starred this issue and may be notified of changes. | Back to list |
Background:
I have a RESTful resource that outputs events for fullcalendar to consume in JSON
format. These events are returned with a className of "custom" and editable:true.
I have two places in my app that use the fullcalendar plugin. One is display-only
and the other one is editable. I use disableDragging/disableResizing on the
display-only calendar.
Here is the CSS:
.custom,
.fc-agenda .custom .fc-event-time,
.custom a {
cursor: default;
}
On the display-only calendar, this displays events that cannot be edited and the
cursor doesn't indicate that it can be edited. This is what I want.
On the editable calendar, the events can be edited, but the cursor doesn't change to
indicate this capability. I want the cursor to use fullcalendar's CSS settings for
cursor (pointer, s-resize, etc.)
I could return a different classnames to each calendar, such as "custom" and
"editable". But the server would then need to know when to output which className.
I would need to send a parameter or use a different URL, and I don't want to
complicate the server API just for this simple purpose.
Could fullcalendar be updated to change the cursor of an event based on if it is
editable or not? I've got this working with the following update to the code (this
code should be repeated in 3 different locations):
if (event.editable || event.editable == undefined && options.editable) {
draggableDayEvent(event, eventElement, seg.isStart);
if (seg.isEnd) {
view.resizableDayEvent(event, eventElement, colWidth);
}
// Added TNM 2010/02/05
if (options.disableDragging && options.disableResizing) {
eventElement.children('a').css('cursor','default');
}
}
// Added TNM 2010/02/05
else {
eventElement.children('a').css('cursor','default');
}
I realize this doesn't take into account Events with clickable URLs. Right now I
don't want clickable URLs anyway and am disabling all URLs by overriding eventClick
to return false. But for fullcalendar to know if you want a URL to be clickable or
not, just overriding eventClick won't let it know. Yet another setting might be
necessary. Something like "clickable: false". Then people wouldn't have to override
eventClick either.
Feb 6, 2010
Project Member
#1
adamrs...@gmail.com
Feb 6, 2010
Ah, yes that should work! I'll give it a shot. Thanks! Still, it seems like this might be good to add to the core. It doesn't make sense to show a pointer cursor if the item isn't editable or have a URL.
Feb 6, 2010
yeah, you are probably right. if i attached an "fc-event-editable" class to editable events, and used the "a:link" pseudo class, you could have control over this stuff via the stylesheet
Summary:
Default cursor for non-editable no-url events
Status: Accepted
Mar 20, 2011
fixed in 1.5 (just released)
Status:
Fixed
Aug 13, 2013
(No comment was entered for this change.)
Status:
Implemented
Aug 13, 2013
(No comment was entered for this change.)
Status:
Released
|
|
| ► Sign in to add a comment |