I am writing a jQuery Calendar plugin for Roundcube. It is still alpha.
Some features:
* full week calendar
* add/edit/remove events
* and more...
* localization
* configuration under Settings
For more info and download: RoundCube Calendar (http://rc-calendar.lazlo.me/)
Feedback, translations and feature request are welcome!
As mentioned in the Webcalendar thread, nice work.
But please adjust the layout. There is no need to have space on the left hand side and to get a scrollbar. Test it with my wrapper plugin!
I fixed the scrollbar, check the screenshot (Firefox 3.5).
EDIT: And the calendar is full width now (in BETA release)
Thanks, looks fine. Did you update the .zip?
Not yet, will update it soon.
Keep on your hard work. I like this much more than my Webcalendar interface!
What I would need to deprecate Webcalender plugin is:
(*) Import/Export (iCal)
(*) Event reminders (Cron Job)
(*) Implementation of Google Calendar API (not supported by Webcalendar but on my - now stopped - ToDo's)
(*) MiniCal (to implement at bottom of folder list)
Just my 5 cents ;)
I updated the zips.
I'm working on the import and export of iCalendar files (searching for a good PHP iCal parser lib)
Added the rest to the todo.
Perhaps you find something here;
iCal - PHP Classes (http://www.phpclasses.org/search.html?words=iCal&restrict)
- =C&restrict[1]=R&restrict[2]=B&restrict[3]=V&restrict[4]=D&forums=F&go_search=1&advanced=1
That's my favorit php classes repository!
Perhaps you find something here:
http://www.phpclasses.org/search.html?words=iCal&restrict[0]=C&restrict[1]=R&restrict[2]=B&restrict[3]=V&restrict[4]=D&forums=F&go_search=1&advanced=1
That's my favorit php classes repository!
#1- You have an error in the mysql.sql script:
CONSTRAINT `user_id_fk_events` FOREIGN KEY (`user_id`) [replace old stuff with that]
#2- I'm still not satisfied with the positioning ... why this left-hand space of about 200px? Do you plan a navigation bar there?
Quote from: rosali;24876#1- You have an error in the mysql.sql script:
CONSTRAINT `user_id_fk_events` FOREIGN KEY (`user_id`) [replace old stuff with that]
#2- I'm still not satisfied with the positioning ... why this left space of about 200px?
#1 Fixed
#2 There is no left space, which version did you download? Check the screenshot on RoundCube Calendar (http://rc-calendar.lazlo.me/)
I've downloaded the current .zip and see:
#calendar {
width: 900px;
height: 200px;
margin-top: 40px;
margin-left: 160px; <---- why that?
}
Forget it ... Damned caching issue.
--> Implement no caching headers at your project site as long the site is updated frequently.
--> Add a download script with "time()" as $_GET.
Mm, refresh your browsercache. My zip says:
#calendar {
width: 100%;
margin-top: 40px;
}
Niiiice... will have a try!
Thanx!!!
Rgds.
I seem to be having some issues running the MySQL:
#1005 - Can't create table './roundcube/events.frm' (errno: 150)
I had simply done a copy/paste of the .sql file into the roundcube database via phpMyAdmin.
Anyone else run into this or have any tips for me?
Thanks!
@ Gaia: The bundled sql script has an error; see my previous post.
Very cool, thanks for doing this work.
I did some work on the plugin:
#1- Updated SQL script
#2- Worked on the localization
(*) saved files UTF-8 encoded
(*) nearly completed (see below)
#3- Styled the modal dialog box
#4- Improved settings by using select boxes (I had to rename date_formats because there was a conflict with my moreuserinfo plugin)
_____________
Remaining:
#1- I'm too stupid to find a way to localize modal dialog buttons cancel|delete|save when adding/editing an event.
#2- css does not play nice with IE7
#3- public $task = 'mail|settings'; should be removed -> blocks navigation to cal from addressbook
Have a look at my compose_address plugin, it's got a localized modal window.
Cor or Lazlo,
could you please take this job? I'm not good on jquery etc. ... I'll start to code the switch_calendar plugin ...
Im heading for a diving expedition to Dominica (sperm whales) tomorrow, but i'll be back in a week. I'll check the discussion and see how its going :)
I created a subversion repository to simplify things.
PM your GitHub username to gain commit access.
(http://github.com/LazloNL/roundcube-calendar/)
Lazlo,
I have solved all things. It is your plugin. But to avoid wasting time I suggest to wait 2-3 day until I come up with my stuff ... Currently I'm implementing a datepicker to navigate weeks picked up by date (creating far in future events is a pain currently ...).
Localization etc. is completed. I had to take care to remove/recode stuff which conflicts with other favorit plugins like keyboard_shortcuts which use also jquery dialog ...
The code project is a good idea. Wait and decide if you agree with my modifications. Then we should decide which version is the starting point for a release candidate ;)
The Roundcube community was waiting for this plugin ... and it should be a runner!
I will wait, I have some exams coming so I will not be working on the plugin this week.
BTW, it is not my plugin, it is Open Source. That makes it ours. :P
Hello,
first nice new calender plugin. One of the features I really miss on the TODO-List is the month view and day view. Fullcalendar(JQuery) (http://arshaw.com/fullcalendar/) supports already these features. Maybe it is easier to use this version as the jquery week calendar where "month" and "day" view must be implemented. Fullcalendar also provides a google calender extension (http://arshaw.com/fullcalendar/docs/google_calendar/).
Another needed feature is the synchronisation between Thunderbird/Sunbird iCal calender application. Maybe it can be included with the import/export iCal feature.
@ Erendur
I agree. But let us first finish the weekcalendar. In most parts this will be a good framework for the full calendar.
@ Lazlo
Are you interested in coding the framework for fullcalendar? It looks like you are much better than me when it comes to jquery! I would contribute your framework like I did with weekcalendar.
I have finished my work on your calendar plugin and will upload the result today evening.
Major changes:
#1 Renamed it to weekcalendar (avoid conflicts with fullcalendar later).
#2 Save events in Database in GMT time and consider Roundcube Timezone settings when returning events to client (your way caused problems when client and server are in different timezones).
#3 Datepicker to make navigation into weeks far in future easier.
#4 Separated jquery stuff into a new plugin "jquery" (Reason: I use jquery-ui in serveral other plugins. To have the stuff centralized makes maintenance easier).
#5 Finished localization
Still missing:
#1 A basic print feature
#2 A message while weekcalendar is loading
I don't think we should add more features and spend our time for coding on fullcalendar.
You can check my results at RoundCube Webmail :: Welcome to RoundCube Webmail (http://mail4us.net) (Notice: The duplicate Calendar icon will disappear as soon I've coded the calendar switch plugin).
I think it is a release candidate now.
The fullcalendar is in basic the same jQuery script. I will replace the weekCalendar with the fullcalendar.
The datepicker doesn't work for me, if you select a day it works, but if you change month or year nothing happens.
I think this is the intended datepicker behavior. First change month/year and then select a day. This should navigate to the week where the day is. Doesn't it?
Please find attached the current development version. Please don't miss to register "jquery" plugin.
If you going to implement fullcalendar just search files for "weekcalendar" and replace with "fullcalendar".
I need opions for timezone handling:
#1 - The database is GMT - that's ok
#2 - If Roundcube timezone is not "auto" then js timezone and Roundcube timezone are different
#3- If Roundcube offset is -5 and a user adds an event 12:00 the event is created at 7:00 - technically ok but could be confusing.
solved
use that:
function get_events()
{
$rcmail = rcmail::get_instance();
$tz = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : date('Z')/3600;
I've noticed a bug:
#1- First view of weekcalendar
#2- Edit event -> times are not selected (0:00 start)
#3- Add a new event
#4- Edit event -> times selection is ok
I'll stop working on it now and wait for your feedback (mailto myroundcube at mail4us.net) ;)
Do you have a diff of the changes? Otherwise I have to rename everything.
Don't see the point of moving jquery weekCalendar into the jQuery plugin since it is online used bij the calendar, jquery-ui could be used by other plugins.
That bug doesn't exist in the previous version.
No, I don't have a diff. IMO, things like "plugin.new_event" shouldn't be used. They may conflict with other plugins.
Move those two files belonging to weekcalendar back if you prefer it. My point of view was to have all jquery third party stuff in the jquery plugin. Shoudn't we use "fullcalender"?
Regarding the event update bug ... where the hell I've introduced it :(
I received a patch to abstract all the backoffice related stuff to a backend. That makes it less complicated to add support to other backends than a database.
I really prefer diffs because I get patches from everywhere and otherwise I can't merge them.
OK, I make diffs in future.
I have fixed the "edit event" bug. For some odd reason I have a gap of 10 milliseconds between startTime.getTime() and calEvent.start.getTime().
This problem exists in your beta version too ( IE7 / 8 ).
Fix calendar.js
function setupStartAndEndTimeFields($startTimeField, $endTimeField, calEvent, timeslotTimes) {
for (var i = 0; i < timeslotTimes.length; i++) {
var startTime = timeslotTimes[i].start;
var endTime = timeslotTimes[i].end;
var startSelected = "";
//alert(abs(startTime.getTime() - calEvent.start.getTime()))
if (Math.abs(startTime.getTime() - calEvent.start.getTime()) < 1000) { // 1 second tolerance
startSelected = "selected=\"selected\"";
}
var endSelected = "";
if (Math.abs(endTime.getTime() - calEvent.end.getTime()) < 1000) { // 1 second tolerance
endSelected = "selected=\"selected\"";
}
$startTimeField.append("<option value=\"" + startTime + "\" " + startSelected + ">" + timeslotTimes[i].startFormatted + "</option>");
$endTimeField.append("<option value=\"" + endTime + "\" " + endSelected + ">" + timeslotTimes[i].endFormatted + "</option>");
}
$endTimeOptions = $endTimeField.find("option");
$startTimeField.trigger("change");
}
I attach a .zip of the plugin (weekcalendar is reverted to calendar) and a patch against your beta.
Thanks, great work rosali.
Lazo & Rosali - great work and glad to see the cooperation.
I think the full calendar implementation would be great!
Some features that would be nice with the full calendar implementation:
1. year change (for future dates while still in month view)
2. recurring events (for birthdays, etc)
3. expanded event data (title, location, description, tags, categories, etc)
4. shared and multiple calendars
5. event search
Just thinking out loud. Keep up the good work.
Great thoughts ... but recurring events have to be implemented by fullcalendar develolper. I don't see a way to implement it by the plugin interface. Do you see a way, Lazlo?
Year change could be done, IMO (FullCalendar Documentation - gotoDate (http://arshaw.com/fullcalendar/docs/current_date/gotoDate/)).
I'm not sure about expanded event data ... I think that's also a todo for fullcalendar devs.
A search feature and shared/multiple calendars could be implemented. But be patient. First of all the framework has to be coded and Lazlo stated this will take some time ...
Quote from: rosali;25042Great thoughts ... but recurring events have to be implemented by fullcalendar develolper. I don't see a way to implement it by the plugin interface. Do you see a way, Lazlo?
It is possible and on the TODO list but there are other things with a higher priority.
Because a recurring event has a starting date and is a daily/weekly/monthly or yearly event (following RFC 5545) you can loop through all the recurring events and check if it is exactly a number of days/weeks/monts/years later than the start time.
many thanks rosali and lazlo
i have fix some little issues with scrollbar and update events
here is my modified calendar.js
one issue is since RC 3226 RC using jquery 1.4 with jquery 1.4 drag and drop and resizing events dont work.
my workaround search in rcube_template.php to
$this->include_script('jquery-1.4.min.js');and replace with
if($task == 'dummy')
$this->include_script('jquery-1.3.min.js');
else
$this->include_script('jquery-1.4.min.js');you need for this jquery-1.3.min.js
i cant fix this in jquery 1.4 im not a javascript expert
i hope this help a little bit
Lacri, I don't see your modified calendar.js ... Very good that you pointed out the jquery version issue. I was just digging around why drag/drop resizing stopped working.
ohhh upload quota exceeded ;)
i have now attached the calendar.js to my original post
@lazlo and rosali here is a little patch to fix some little issues with updating events resizing and drag and drop and two little display issues with scrollbar and timeslot size.
when trying to execute the mysql script for the 'calendar' plug in, this portion of the script
ALTER TABLE `events`
ADD CONSTRAINT `events_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;
produces this error
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ADD CONSTRAINT `events_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user' at line 1
This is on MySQL 5.1.9-2. I have checked the manual and I don't see the problem. But then I don't talk MySQL (just a user).
I cut/paste from the script file provided, into Phpmyadmin.
I also entered it from a command line with the same results.
Does anyone see the syntax error?
Thanks,
Issue 44 - myroundcube - Can't create MySQL Table - Project Hosting on Google Code (http://code.google.com/p/myroundcube/issues/detail?id=44)
MySQL bug: MySQL Bugs: #46293: Conditional comments not working in FOREIGN KEY definition (http://bugs.mysql.com/bug.php?id=46293)
Do you think that a google calendar sync is possible ?
Because if it's possible and made, with extended contact and group in adress book...Many people (me include) have no benefit to keep microsoft outlook.
EDIt : i just see it on todo list. Great...I will work on french localization
$labels = array();
$labels['calendar'] = 'Calendrier';
$labels['24_hour'] = 'Utiliser le format 24 heures';
$labels['timeslots'] = 'Intervalle de temps par heure';
$labels['time_seperator'] = 'à';
$labels['date_format'] = 'Format de la date';
In utf-8 because if not, you must replace :
$labels['time_seperator'] = 'à';
by
$labels['time_seperator'] = 'à';
But there is missing translation in files because when creatinf event, everything is in english and there is no translation available for it.
Appreciate the assistance.
Again, I'm not fluent in MySQL. So while your links may reveal something obvious to others, I am having difficulty piecing it together.
@ Lazlo -
I am having a difficult time understanding how your link applies to my problem. If it has to do with the use of comments as described in the link; I don't have any comments in my command line that is producing the error.
Or are you implying that the 'CONSTRAINT' should be part of the 'CREATE' command and not have the 'ALTER TABLE' command?
@ rosali -
While I realize your link references a problem with 'google_contacts', I'm trying to see how the 'fix' in that link is different syntactically from what I have in my "ALTER TABLE' statement. From what is mention in the link, what I have IS the fix and shouldn't produce the error I have been getting.
OR it may be something else, in both cases, that I'm blind too.
Again, thanks for the help.
Quote from: bagu;25275Do you think that a google calendar sync is possible ?
I will release a new version in a couple of weeks based on jQuery fullcalendar which has GCal support. It also has a new backend structure which makes it possible to write a backend for the Google Calendar API.
I can't wait ^^
If there is more locales, i will translate it.
Am I on the right way?
CREATE TABLE `events` (
`event_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
`user_id_fk_contacts` int(10) unsigned NOT NULL,
`start` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
`end` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
`title` text NOT NULL,
PRIMARY KEY(`event_id`),
KEY(`user_id_fk_contacts`),
CONSTRAINT FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`)
)
Well, that executed without an error!
Let's just hope it accomplished the original goal.
Great first post!!
Really appreciate the help.
Thanks,
Scarabaeus
This thread holds post moved from http://www.roundcubeforum.net/7-third-party-contributions/46-api-based-plugins/6161-roundcube-calendar-jquery-calendar.html.
The original thread was rather crowdy. Free different plugins were discussed:
(*) jQuery Weekcalendar plugin (deprecated)
(*) jQuery Fullcalendar plugin (developed by Lazlo)
(*) jQuery Fullcalendar myroundcube plugin (based on Lazlo initial version and forked by rosali)
Now this thread is for weekcalendar only.