notifyat column should default to null; improve fullcalendar click behavior
This commit is contained in:
parent
34a0911fe8
commit
57ae204c4a
4 changed files with 11 additions and 7 deletions
|
@ -43,7 +43,7 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
|
|||
var me = this;
|
||||
|
||||
// private vars
|
||||
var day_clicked = 0;
|
||||
var day_clicked = day_clicked_ts = 0;
|
||||
var ignore_click = false;
|
||||
|
||||
// event details dialog (show only)
|
||||
|
@ -518,13 +518,17 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
|
|||
// callback for clicks in all-day box
|
||||
dayClick: function(date, allDay, e, view) {
|
||||
var now = new Date().getTime();
|
||||
if (now - day_clicked < 400) // emulate double-click on day
|
||||
event_edit_dialog('new', { start:date, end:date, allDay:allDay, calendar:me.selected_calendar });
|
||||
day_clicked = now;
|
||||
if (now - day_clicked_ts < 400 && day_clicked == date.getTime()) // emulate double-click on day
|
||||
return event_edit_dialog('new', { start:date, end:date, allDay:allDay, calendar:me.selected_calendar });
|
||||
|
||||
if (!ignore_click) {
|
||||
view.calendar.gotoDate(date);
|
||||
fullcalendar_update();
|
||||
if (day_clicked && new Date(day_clicked).getMonth() != date.getMonth())
|
||||
view.calendar.select(date, date, allDay);
|
||||
}
|
||||
day_clicked = date.getTime();
|
||||
day_clicked_ts = now;
|
||||
},
|
||||
// callback when a specific event is clicked
|
||||
eventClick : function(event) {
|
||||
|
|
|
@ -41,7 +41,7 @@ CREATE TABLE `events` (
|
|||
`priority` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`alarms` varchar(255) DEFAULT NULL,
|
||||
`attendees` text DEFAULT NULL,
|
||||
`notifyat` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
|
||||
`notifyat` datetime DEFAULT NULL,
|
||||
PRIMARY KEY(`event_id`),
|
||||
CONSTRAINT `fk_events_calendar_id` FOREIGN KEY (`calendar_id`)
|
||||
REFERENCES `calendars`(`calendar_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
|
|
|
@ -56,7 +56,7 @@ CREATE TABLE events (
|
|||
priority smallint NOT NULL DEFAULT 1,
|
||||
alarms varchar(255) DEFAULT NULL,
|
||||
attendees text DEFAULT NULL,
|
||||
notifyat timestamp without time zone DEFAULT now() NOT NULL
|
||||
notifyat timestamp without time zone DEFAULT NULL
|
||||
PRIMARY KEY (event_id)
|
||||
);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ CREATE TABLE events (
|
|||
priority tinyint(1) NOT NULL default '1',
|
||||
alarms varchar(255) default NULL,
|
||||
attendees text default NULL,
|
||||
notifyat datetime NOT NULL default '1000-01-01 00:00:00',
|
||||
notifyat datetime default NULL,
|
||||
CONSTRAINT fk_events_calendar_id FOREIGN KEY (calendar_id)
|
||||
REFERENCES calendars(calendar_id)
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue