Difference between revisions of "Uber Calendar"

From WebOS Internals
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
There are 2 patch files for the JS source and for the CSS. There are also 2 small icons which need to be copied into the images folder. The icons are here: [http://www.metaviewsoft.de/Calendar/menu-icon-agenda.png Agenda icon] and [http://www.metaviewsoft.de/Calendar/alarm-icon.png Alarm bell]
+
The UberCalendar patch enhances the build-in calendar application. It brings more detailed views (like subject lines in week view or shrinked day view) and a lot of other customizations. You will find the latest stable version of this patch in Preware.
  
<source lang="text">
+
A documentation of all features and settings is available here: http://forums.precentral.net/webos-patches/273919-preference-guide-metaviews-ubercalendar-uc-patch.html
  
Name: UberCalendar
+
A forums thread for questions, comments and more infos about the latest test version can be found here: http://forums.precentral.net/webos-patches/245177-ubercalendar-enhanced-calendar-patch.html
Version: 1.4.0-5
 
Author: metaview, frause
 
Description: Enhance the calendar views. (MIT license)
 
 
 
 
 
--- /usr/palm/applications/com.palm.app.calendar/app/controllers/app-assistant.js 2010-01-22 04:25:18.000000000 +0100
 
+++ /cygdrive/z/Programme/Komodo/Calendar2/src/app/controllers/app-assistant.js 2010-05-02 11:48:42.000000000 +0200
 
@@ -489,7 +489,15 @@ var AppAssistant = Class.create({
 
this.firstUseManager = new FirstUseManager(stageController);
 
} else {
 
// Otherwise show the Day View
 
- stageController.pushScene({name: "day", transition: Mojo.Transition.crossFade, disableSceneScroller: true});
 
+ var view = "day";
 
+ var cookie = new Mojo.Model.Cookie("LastView");
 
+ try {
 
+ view = cookie.get();
 
+ } catch (e) {}
 
+ if ((view != "month") && (view != "week")) {
 
+ view = "day";
 
+ }
 
+ stageController.pushScene({name: view, transition: Mojo.Transition.crossFade, disableSceneScroller: true});
 
}
 
},
 
 
--- /usr/palm/applications/com.palm.app.calendar/app/controllers/day-assistant.js 2010-02-09 23:08:26.000000000 +0100
 
+++ /cygdrive/z/Programme/Komodo/Calendar2/src/app/controllers/day-assistant.js 2010-05-03 21:10:34.000000000 +0200
 
@@ -42,6 +42,8 @@ var DayAssistant = Class.create({
 
this.pendingCalendarSettingsUpdate = false;
 
//this.pendingOpenScratchEventInDetails = false;
 
this.snapEffectCount = 0;
 
+ this.imgAlarm = new Image();
 
+ this.imgAlarm.src = "images/alarm-icon.png";
 
 
 
this.hourHeight = 48;
 
@@ -212,17 +214,23 @@ var DayAssistant = Class.create({
 
buildDayTitle: function(doScrim) {
 
var today = Date.today().clearTime();
 
var dayDateNoTime = new Date(this.dayDate).clearTime();
 
+ var weekNumber = new Date(this.dayDate).getISO8601Week();
 
 
if (dayDateNoTime.compareTo(today) == 0) {
 
- var template = new Template($L("#{todayStr}, #{dateStr}"));
 
+ var template = new Template($L("#{todayStr}, #{dateStr}") + ", W#{weekStr}");
 
var todayStr= Mojo.Format.formatRelativeDate(today, {date: "short"}).capitalize();
 
 
var templateModel = {};
 
templateModel.todayStr = todayStr;
 
+ templateModel.weekStr = weekNumber;
 
templateModel.dateStr = Mojo.Format.formatDate(this.dayDate, $L("EEE MMM d"));
 
this.controller.get('dv_title').update(template.evaluate(templateModel)); // Localize this date format string
 
} else {
 
- this.controller.get('dv_title').update(Mojo.Format.formatDate(this.dayDate, $L("EEE MMM d, yyyy"))); // Localize this date format string
 
+ var template = new Template($L("#{dateStr}") + ", W#{weekStr}");
 
+ var templateModel = {};
 
+ templateModel.weekStr = weekNumber;
 
+ templateModel.dateStr = Mojo.Format.formatDate(this.dayDate, $L("EEE MMM d, yyyy"));
 
+ this.controller.get('dv_title').update(template.evaluate(templateModel)); // Localize this date format string
 
}
 
 
if (doScrim) {
 
@@ -702,6 +710,8 @@ var DayAssistant = Class.create({
 
//Mojo.Log.info("day-assistant: renderEvent");
 
if (this.animating && !event.animatible)
 
return;
 
+
 
+//Mojo.Log.error(Object.toJSON(event));
 
 
var ctx = this.divs[whichDay].ctxEvents;
 
var marginLeft = 28;
 
@@ -743,6 +753,17 @@ var DayAssistant = Class.create({
 
ctx.fillRect(left+1, top+height-3, width-2, 1);
 
 
var textTop = top + 30;
 
+
 
+///
 
+ // Alarm
 
+ if (event.gotFullDetails === undefined) {
 
+ // get more infos for this event
 
+ getCalendarService().getEvent(event.id,
 
+ this.getEventDetails.bind(this, whichDay, event, selected, ghost),
 
+ function(response) {Mojo.Log.error(response.errorText);},
 
+ this.controller);
 
+ }
 
+///
 
 
// Subject
 
ctx.fillStyle = this.colors[event.calendarColor].text;
 
@@ -753,8 +774,14 @@ var DayAssistant = Class.create({
 
var subjectTop = top+15;
 
if (bottom >= (top + height))
 
subjectTop = top+17; // no room for location or note, therefore vertically center subject text
 
- this.fillText(event.subject, ctx, left+4, subjectTop, width, bottom, 15 /*line height*/);
 
-
 
+ this.fillText(event.subject, ctx, left+4, subjectTop, width-((event.alarm !== undefined) ? 18 : 0), bottom, 15 /*line height*/);
 
+
 
+///
 
+ if (event.alarm !== undefined) {
 
+ try{ ctx.drawImage(this.imgAlarm, left+4+width-18, subjectTop+1, 12, 12); } catch(e){}
 
+ }
 
+///
 
+
 
// Location
 
if (event.location && (event.location.length > 0) && (textTop < (top + height))) {
 
ctx.font = "italic bold 14px Prelude";
 
@@ -769,7 +796,7 @@ var DayAssistant = Class.create({
 
bottom = top+height;
 
this.fillText(event.note, ctx, left+4, textTop-2, width, bottom-2, 12 /*line height*/);
 
}
 
-
 
+
 
if (ghost) {
 
var selectedColor = "rgba(228, 228, 226, 0.85)"
 
ctx.fillStyle = selectedColor;
 
@@ -789,6 +816,14 @@ var DayAssistant = Class.create({
 
  ctx.fillRect(left, top, width, height);
 
}
 
},
 
+
 
+///
 
+ getEventDetails: function(whichDay, event, selected, ghost, details) {
 
+ event.alarm = details.alarm;
 
+ event.gotFullDetails = true;
 
+ this.renderEvent(whichDay, event, selected, ghost);
 
+ },
 
+///
 
 
getAllDayDimensions: function(index, event) {
 
var marginLeft = 4;
 
@@ -1828,6 +1863,7 @@ var DayAssistant = Class.create({
 
{label:$L('Views'),
 
toggleCmd:'day',
 
items:[
 
+ {label:$L('Agenda'), icon: 'menu-agenda', command:'agenda'},
 
{label:$L('Day'), icon: 'menu-day', command:'day'},
 
{label:$L('Week'), icon: 'menu-week', command:'week'},
 
{label:$L('Month'), icon: 'menu-month', command:'month'}
 
@@ -1854,6 +1890,9 @@ var DayAssistant = Class.create({
 
this.controller.setupWidget(this.divs[this.PREV_DAY].alldayevents_scroller, undefined, {mode: 'vertical'});
 
this.controller.setupWidget(this.divs[this.NEXT_DAY].alldayevents_scroller, undefined, {mode: 'vertical'});
 
 
+ var cookie = new Mojo.Model.Cookie("LastView");
 
+ cookie.put("day");
 
+
 
    this.CalSelectorHandler = this.calSelector.bindAsEventListener(this);
 
 
// IMPORTANT: Set up the height of the scrollers.  If this is not done
 
@@ -2095,6 +2134,17 @@ var DayAssistant = Class.create({
 
Event.stop(event);
 
this.maybeCommitScratchEvent(true);
 
this.syncAllCalendars();
 
+ } else if (event.command == 'agenda') {
 
+ Event.stop(event);
 
+ this.maybeCommitScratchEvent(true);
 
+ this.controller.serviceRequest('palm://com.palm.applicationManager', {
 
+ method: 'launch',
 
+ parameters: {
 
+ id: 'com.palm.app.agenda'
 
+ }
 
+ });
 
+ this.menuModel.items[1].toggleCmd = 'day';
 
+ this.controller.modelChanged(this.menuModel, this);
 
}
 
} else if(event.type == Mojo.Event.commandEnable && event.command == Mojo.Menu.prefsCmd) {
 
// Enable prefs menuitem for this scene.
 
--- /usr/palm/applications/com.palm.app.calendar/app/controllers/month-assistant.js 2010-01-06 03:09:08.000000000 +0100
 
+++ /cygdrive/z/Programme/Komodo/Calendar2/src/app/controllers/month-assistant.js 2010-05-03 21:11:06.000000000 +0200
 
@@ -5,6 +5,7 @@ var MONTH_DAY_ID_FORMAT = 'MMMM dd yyyy'
 
var MonthAssistant = Class.create({
 
 
reminderMenuItemId: 3,
 
+ fullEvts: null,
 
 
initialize: function() {
 
  this.appMenuModel = { visible:true,
 
@@ -22,12 +23,28 @@ var MonthAssistant = Class.create({
 
 
this.scrollerModel = { scrollbars: false, mode: "vertical-snap", snapIndex: 0, snapElements: { y: [] } };
 
},
 
+
 
+ colors: {"cal-color-blue": "#91d3ea",
 
+ "cal-color-green": "#8cf08c",
 
+ "cal-color-yellow": "#e8e37c",
 
+ "cal-color-gray": "#c2c2c2",
 
+ "cal-color-orange": "#fbb474",
 
+ "cal-color-pink": "#f59cbc",
 
+ "cal-color-red": "#ff9797",
 
+ "cal-color-purple": "#d9b7ff",
 
+ "cal-color-teal": "#72dfd2"},
 
 
  setupMonth: function(startDate, endDate, callbackfn)
 
{
 
+ getCalendarService().getEvents('all', startDate.getTime(), endDate.getTime(), this.getEventsCallback.bind(this), this.controller, this.getEventsFailCallback, {useSlices: true});
 
getCalendarService().getBusyDays(getCurrentCal(), startDate.getTime(), endDate.getTime(), callbackfn, this.controller);
 
},
 
-
 
+
 
+ getEventsCallback: function(resp)
 
+ {
 
+ this.fullEvts = resp.days;
 
+ },
 
+
 
buildViewHeader: function()
 
{
 
//Mojo.Log.info("month-assistant: buildViewHeader");
 
@@ -37,7 +54,13 @@ var MonthAssistant = Class.create({
 
 
buildMonthTitle: function()
 
{
 
- this.mvTitle.innerText = Mojo.Format.formatDate(this.monthDate, $L("MMM yyyy")); // Localize this date format string
 
+ var wn = new Date(this.monthDate);
 
+ wn.setDate(1);
 
+ var firstWeek = wn.getISO8601Week();
 
+ wn.setMonth(wn.getMonth()+1);
 
+ wn.setDate(wn.getDate()-1);
 
+ var lastWeek = wn.getISO8601Week();
 
+ this.mvTitle.innerText = Mojo.Format.formatDate(this.monthDate, $L("MMM yyyy")) + ", " + $L("Week") + " " + firstWeek + "-" + lastWeek; // Localize this date format string
 
  },
 
 
  buildDayHeader: function() {
 
@@ -359,26 +382,39 @@ var MonthAssistant = Class.create({
 
calStyle = getCalendarsManager().getCalColorStyle('id'+getCurrentCal());
 
}
 
 
+
 
var weekCell = this._months.rows[0];
 
var dayCell = weekCell.cells[0];
 
 
+ var cls;
 
var days = response.days;
 
var daylen = days.length - 1; // We get back more days of info that we want - 1 more in fact, because its inclusive, rather than exclusive
 
for (var d = 0; d < daylen; d++)
 
{
 
var day = this._token2state(days.charCodeAt(d));
 
-
 
+
 
+ var bgcolor = "";
 
+ if (this.fullEvts[d].allDayEvents.length > 1)
 
+ {
 
+ bgcolor = "gray";
 
+ }
 
+ else if (this.fullEvts[d].allDayEvents.length == 1)
 
+ {
 
+ bgcolor = this.colors[this.fullEvts[d].allDayEvents[0].calendarColor];
 
+ }
 
+
 
+//Mojo.Log.error(bgcolor, this.fullEvts[d].allDayEvents.length);
 
var child = dayCell.firstChild;
 
- var cls;
 
for (var i = 1; i < 8; i <<= 1)
 
{
 
- if (day & (i << 3))
 
+ child.style.backgroundColor = bgcolor;
 
+ if (day & (i << 3))
 
{
 
- cls = "monthview-busy-time " + calStyle;
 
+ cls = "monthview-partly-busy-time " + calStyle;
 
}
 
else if (day & i)
 
{
 
- cls = "monthview-busy-time";
 
+ cls = "monthview-partly-busy-time";
 
}
 
else
 
{
 
@@ -642,6 +678,11 @@ var MonthAssistant = Class.create({
 
                label: $L('Views'),
 
                toggleCmd: 'month',
 
                items: [
 
+ {
 
+ label:$L('Agenda'),
 
+ icon: 'menu-agenda',
 
+ command:'agenda'
 
+ },
 
                {
 
                    label: $L('Day'),
 
                    icon: 'menu-day',
 
@@ -664,6 +705,9 @@ var MonthAssistant = Class.create({
 
this.controller.setupWidget(Mojo.Menu.appMenu, {omitDefaultItems:true}, this.appMenuModel);
 
this.remindersUpdated(); // Update missed reminders menu item
 
 
+ var cookie = new Mojo.Model.Cookie("LastView");
 
+ cookie.put("month");
 
+
 
this.CalSelectorHandler = this.calSelector.bindAsEventListener(this);
 
  },
 
 
 
@@ -729,6 +773,16 @@ var MonthAssistant = Class.create({
 
} else if (event.command == 'reminders') {
 
Event.stop(event);
 
this.controller.stageController.pushScene('reminder-list');
 
+ } else if (event.command == 'agenda') {
 
+ Event.stop(event);
 
+ this.controller.serviceRequest('palm://com.palm.applicationManager', {
 
+ method: 'launch',
 
+ parameters: {
 
+ id: 'com.palm.app.agenda'
 
+ }
 
+ });
 
+ this.menuModel.items[1].toggleCmd = 'month';
 
+ this.controller.modelChanged(this.menuModel, this);
 
}
 
}
 
else if(event.type == Mojo.Event.commandEnable && event.command == Mojo.Menu.prefsCmd) {
 
--- /usr/palm/applications/com.palm.app.calendar/app/controllers/week-assistant.js 2010-01-06 03:09:08.000000000 +0100
 
+++ /cygdrive/z/Programme/Komodo/Calendar2/src/app/controllers/week-assistant.js 2010-05-03 21:11:48.000000000 +0200
 
@@ -42,6 +42,8 @@ var WeekAssistant = Class.create({
 
this.COL_POS = [0, 45, 91, 137, 183, 229, 275];
 
this.pendingRender = false;
 
this.pendingCalendarSettingsUpdate = false;
 
+ this.imgAlarm = new Image();
 
+ this.imgAlarm.src = "images/alarm-icon.png";
 
},
 
 
getEventChangeCallback: function(response) {
 
@@ -103,10 +105,12 @@ var WeekAssistant = Class.create({
 
buildWeekTitle: function() {
 
var today = Date.today().clearTime();
 
var dayOfWeek = this.getFirstDayOfWeek(this.weekDate);
 
+ var weekNumber = new Date(this.weekDate).getISO8601Week();
 
 
- var template = new Template($L("Week of #{dateStr}"));
 
+ var template = new Template($L("Week") + " #{weekStr}, " + $L("#{dateStr}"));
 
var templateModel = {};
 
templateModel.dateStr = Mojo.Format.formatDate(dayOfWeek, $L("MMM d, yyyy"));
 
+ templateModel.weekStr = weekNumber;
 
this.title.innerHTML = template.evaluate(templateModel);
 
 
if (this.changingWeeks)
 
@@ -373,6 +377,13 @@ var WeekAssistant = Class.create({
 
var startPos = this.startDayMarkerPos * this.HOUR_HEIGHT - 1;
 
var midPos = this.midDayMarkerPos * this.HOUR_HEIGHT - 1;
 
var endPos = this.endDayMarkerPos * this.HOUR_HEIGHT - 1;
 
+
 
+ for (var i=1; i<24; i++) {
 
+ ctx.fillStyle = "rgb(185, 185, 185)";
 
+ ctx.fillRect(0, i * this.HOUR_HEIGHT - 1, 320, 1);
 
+ ctx.fillStyle = "rgb(255, 255, 255)";
 
+ ctx.fillRect(0, i * this.HOUR_HEIGHT, 320, 1);
 
+ }
 
 
// Draw marker lines
 
ctx.fillStyle = "rgb(135, 135, 134)";
 
@@ -388,7 +399,16 @@ var WeekAssistant = Class.create({
 
 
renderStartEndDayLabels: function(whichWeek) {
 
var ctx = this.weeks[whichWeek].ctxEvents;
 
-
 
+
 
+ // Draw marker labels
 
+ ctx.fillStyle = "rgb(0, 0, 0)";
 
+ ctx.font = "bold 14px Prelude";
 
+
 
+ for (var i=2; i<24; i+=2) {
 
+ var endPos = i * this.HOUR_HEIGHT - 1;
 
+ ctx.strokeText(i, 12, endPos + 24);
 
+ }
 
+ /*
 
var startPos = this.startDayMarkerPos * this.HOUR_HEIGHT - 1;
 
var midPos = this.midDayMarkerPos * this.HOUR_HEIGHT - 1;
 
var endPos = this.endDayMarkerPos * this.HOUR_HEIGHT - 1;
 
@@ -401,6 +421,7 @@ var WeekAssistant = Class.create({
 
if (this.midDayMarkerPos != this.startDayMarkerPos && this.midDayMarkerPos != this.endDayMarkerPos)
 
ctx.strokeText(this.midDayMarkerTime, 12, midPos + 24);
 
ctx.strokeText(this.endDayMarkerTime, 17, endPos + 24);
 
+ */
 
},
 
 
renderEmptyWeek: function(whichWeek) {
 
@@ -488,8 +509,65 @@ var WeekAssistant = Class.create({
 
 
ctx.fillStyle = "rgba(255, 255, 255, 0.10)";
 
ctx.fillRect(left+1, top+height-3, width-2, 1);
 
+
 
+///
 
+//Mojo.Log.error(Object.toJSON(event));
 
+ if (event.subject === undefined) {
 
+ // get more infos for this event
 
+ getCalendarService().getEvent(event.id,
 
+ this.getEventDetails.bind(this, whichWeek, whichDay, event),
 
+ function(response) {Mojo.Log.error(response.errorText);},
 
+ this.controller);
 
+ } else {
 
+ // Subject
 
+ ctx.fillStyle = this.colors[event.calendarColor].text;
 
+ ctx.font = "10px Prelude";
 
+ var oldAlign = ctx.textAlign;
 
+ var oldBaseline = ctx.textBaseline;
 
+ ctx.textAlign = "left";
 
+ ctx.textBaseline = "top";
 
+
 
+ var text = event.subject;
 
+ var length = text.length;
 
+ var metrics = ctx.measureText(text);
 
+ while ((metrics.width > eventMaxWidth-3) && (length > 0)) {
 
+ // too large, try one less
 
+ length--;
 
+ text = text.substring(0, length);
 
+ metrics = ctx.measureText(text);
 
+ }
 
+ ctx.fillText(text, left+2, top+1);
 
+ top += 12
 
+ if (text.length < event.subject.length) {
 
+ var text = event.subject.substring(text.length);
 
+ var length = text.length;
 
+ var metrics = ctx.measureText(text);
 
+ while ((metrics.width > eventMaxWidth-3) && (length > 0)) {
 
+ // too large, try one less
 
+ length--;
 
+ text = text.substring(0, length);
 
+ metrics = ctx.measureText(text);
 
+ }
 
+ ctx.fillText(text, left+2, top+1);
 
+ top += 12
 
+ }
 
+ if (event.alarm !== undefined) {
 
+ ctx.drawImage(this.imgAlarm, left+1, top+2, 12, 12);
 
+ }
 
+ ctx.textAlign = oldAlign;
 
+ ctx.textBaseline = oldBaseline;
 
+ }
 
+///
 
},
 
-
 
+
 
+///
 
+ getEventDetails: function(whichWeek, whichDay, event, details) {
 
+ event.subject = details.subject;
 
+ event.alarm = details.alarm;
 
+ this.renderEvent(whichWeek, whichDay, event);
 
+ },
 
+///
 
+
 
renderBusyTime: function(whichWeek, whichDay, busy) {
 
var ctx = this.weeks[whichWeek].ctxEvents;
 
var marginLeft = 1;
 
@@ -712,6 +790,7 @@ var WeekAssistant = Class.create({
 
{ label:$L('Views'),
 
toggleCmd:'week',
 
items:[
 
+ {label:$L('Agenda'), icon: 'menu-agenda', command:'agenda'},
 
{label:$L('Day'), icon: 'menu-day', command:'day'},
 
{label:$L('Week'), icon: 'menu-week', command:'week'},
 
{label:$L('Month'), icon: 'menu-month', command:'month'}
 
@@ -723,6 +802,9 @@ var WeekAssistant = Class.create({
 
this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.menuModel);
 
this.controller.setupWidget(Mojo.Menu.appMenu, {omitDefaultItems:true}, this.appMenuModel);
 
this.remindersUpdated(); // Update missed reminders menu item
 
+
 
+ var cookie = new Mojo.Model.Cookie("LastView");
 
+ cookie.put("week");
 
 
    this.CalSelectorHandler = this.calSelector.bindAsEventListener(this);
 
 
@@ -791,6 +873,16 @@ var WeekAssistant = Class.create({
 
} else if (event.command == 'reminders') {
 
Event.stop(event);
 
this.controller.stageController.pushScene('reminder-list');
 
+ } else if (event.command == 'agenda') {
 
+ Event.stop(event);
 
+ this.controller.serviceRequest('palm://com.palm.applicationManager', {
 
+ method: 'launch',
 
+ parameters: {
 
+ id: 'com.palm.app.agenda'
 
+ }
 
+ });
 
+ this.menuModel.items[1].toggleCmd = 'week';
 
+ this.controller.modelChanged(this.menuModel, this);
 
}
 
}
 
else if(event.type == Mojo.Event.commandEnable && event.command == Mojo.Menu.prefsCmd) {
 
--- /usr/palm/applications/com.palm.app.calendar/javascripts/datejs/week.js 1970-01-01 01:00:00.000000000 +0100
 
+++ /cygdrive/z/Programme/Komodo/Calendar2/src/javascripts/datejs/week.js 2010-05-03 21:17:06.000000000 +0200
 
@@ -0,0 +1,44 @@
 
+Date.prototype.getWeek = function() {
 
+ var date = new Date(this);
 
+ var year = date.getFullYear();
 
+ var month = date.getMonth();
 
+ var day = date.getDate();
 
+
 
+ var when = new Date(year,month,day);
 
+ var newYear = new Date(year,0,1);
 
+ var modDay = newYear.getDay();
 
+
 
+ if(this.startDay != 1)
 
+ if (modDay == 0) modDay=6; else modDay--;
 
+
 
+ var daynum = ((Date.UTC(year,when.getMonth(),when.getDate(),0,0,0) -
 
+ Date.UTC(year,0,1,0,0,0)) /1000/60/60/24) + 1;
 
+
 
+ if (modDay < 4 ) {
 
+ var weekno = Math.floor((daynum+modDay-1)/7)+1;
 
+ }
 
+ else {
 
+ var weekno = Math.floor((daynum+modDay-1)/7);
 
+
 
+ if (weekno == 0) {
 
+ year--;
 
+
 
+ var prevNewYear = new Date(year,0,1);
 
+ var prevmodDay = prevNewYear.getDay();
 
+ if (prevmodDay == 0) prevmodDay = 6; else prevmodDay--;
 
+ if (prevmodDay < 4) weekno = 53; else weekno = 52;
 
+ }
 
+ }
 
+
 
+ return weekno;
 
+};
 
+
 
+Date.prototype.getISO8601Week = function() {
 
+ var d = new Date(this);
 
+ d.setUTCDate(d.getUTCDate() - (d.getUTCDay() + 6) % 7 + 3);
 
+ var ms = d.valueOf();
 
+ d.setUTCMonth(0, 4);
 
+ var w = Math.round((ms - d.valueOf()) / 604800000) + 1;
 
+ if (w <= 9) { w = "0" + w; }
 
+ return w;
 
+};
 
--- /usr/palm/applications/com.palm.app.calendar/sources.json 2009-12-15 01:57:53.000000000 +0100
 
+++ /cygdrive/z/Programme/Komodo/Calendar2/src/sources.json 2010-05-03 21:14:12.000000000 +0200
 
@@ -3,6 +3,9 @@
 
    "source": "javascripts\/datejs\/date.js"
 
  },
 
  {
 
+    "source": "javascripts\/datejs\/week.js"
 
+  },
 
+  {
 
    "source": "javascripts\/recurrence-rule.js"
 
  },
 
  {
 
 
 
</source>
 
 
 
<source lang="text">
 
 
 
Name: UberCalendar_css
 
Version: 1.4.0-5
 
Author: metaview, frause
 
Description: Enhance the calendar views. (MIT license)
 
 
 
 
 
--- /usr/palm/applications/com.palm.app.calendar/stylesheets/calendar.css 2010-01-22 21:26:25.000000000 +0100
 
+++ /cygdrive/z/Programme/Komodo/Calendar2/src/stylesheets/calendar.css 2010-05-01 21:16:44.000000000 +0200
 
@@ -59,6 +59,10 @@
 
background-image: url(../images/menu-icon-day.png);
 
}
 
 
+.palm-menu-icon.menu-agenda {
 
+ background-image: url(../images/menu-icon-agenda.png);
 
+}
 
+
 
.palm-menu-icon.edit {
 
background-image: url(../images/menu-icon-compose.png);
 
}
 
--- /usr/palm/applications/com.palm.app.calendar/stylesheets/event-colors.css 2009-06-13 01:46:10.000000000 +0200
 
+++ /cygdrive/z/Programme/Komodo/Calendar2/src/stylesheets/event-colors.css 2010-05-02 15:33:56.000000000 +0200
 
@@ -15,15 +15,26 @@ Copyright 2009 Palm, Inc.  All rights re
 
*/
 
 
/* Month View: busy time */
 
-.monthview-busy-time.cal-color-blue { background: url(../images/month-busy-time-blue.png) 0 0 fixed repeat; }
 
-.monthview-busy-time.cal-color-green { background: url(../images/month-busy-time-green.png) 0 0 fixed repeat; }
 
-.monthview-busy-time.cal-color-yellow { background: url(../images/month-busy-time-yellow.png) 0 0 fixed repeat; }
 
-.monthview-busy-time.cal-color-gray { background: url(../images/month-busy-time-gray.png) 0 0 fixed repeat; }
 
-.monthview-busy-time.cal-color-orange { background: url(../images/month-busy-time-orange.png) 0 0 fixed repeat; }
 
-.monthview-busy-time.cal-color-pink { background: url(../images/month-busy-time-pink.png) 0 0 fixed repeat; }
 
-.monthview-busy-time.cal-color-red { background: url(../images/month-busy-time-red.png) 0 0 fixed repeat; }
 
-.monthview-busy-time.cal-color-purple { background: url(../images/month-busy-time-purple.png) 0 0 fixed repeat; }
 
-.monthview-busy-time.cal-color-teal { background: url(../images/month-busy-time-teal.png) 0 0 fixed repeat; }
 
+.monthview-busy-time.cal-color-blue { background: url(../images/month-busy-time-blue.png) right 0 fixed repeat-y; }
 
+.monthview-busy-time.cal-color-green { background: url(../images/month-busy-time-green.png) right 0 fixed repeat-y; }
 
+.monthview-busy-time.cal-color-yellow { background: url(../images/month-busy-time-yellow.png) right 0 fixed repeat-y; }
 
+.monthview-busy-time.cal-color-gray { background: url(../images/month-busy-time-gray.png) right 0 fixed repeat-y; }
 
+.monthview-busy-time.cal-color-orange { background: url(../images/month-busy-time-orange.png) right 0 fixed repeat-y; }
 
+.monthview-busy-time.cal-color-pink { background: url(../images/month-busy-time-pink.png) right 0 fixed repeat-y; }
 
+.monthview-busy-time.cal-color-red { background: url(../images/month-busy-time-red.png) right 0 fixed repeat-y; }
 
+.monthview-busy-time.cal-color-purple { background: url(../images/month-busy-time-purple.png) right 0 fixed repeat-y; }
 
+.monthview-busy-time.cal-color-teal { background: url(../images/month-busy-time-teal.png) right 0 fixed repeat-y; }
 
+
 
+/* Month View: partly busy time */
 
+.monthview-partly-busy-time.cal-color-blue { background: url(../images/month-busy-time-blue.png) left center fixed no-repeat; }
 
+.monthview-partly-busy-time.cal-color-green { background: url(../images/month-busy-time-green.png) left center fixed no-repeat; }
 
+.monthview-partly-busy-time.cal-color-yellow { background: url(../images/month-busy-time-yellow.png) left center fixed no-repeat; }
 
+.monthview-partly-busy-time.cal-color-gray { background: url(../images/month-busy-time-gray.png) left center fixed no-repeat; }
 
+.monthview-partly-busy-time.cal-color-orange { background: url(../images/month-busy-time-orange.png) left center fixed no-repeat; }
 
+.monthview-partly-busy-time.cal-color-pink { background: url(../images/month-busy-time-pink.png) left center fixed no-repeat; }
 
+.monthview-partly-busy-time.cal-color-red { background: url(../images/month-busy-time-red.png) left center fixed no-repeat; }
 
+.monthview-partly-busy-time.cal-color-purple { background: url(../images/month-busy-time-purple.png) left center fixed no-repeat; }
 
+.monthview-partly-busy-time.cal-color-teal { background: url(../images/month-busy-time-teal.png) left center fixed no-repeat; }
 
 
/* Week View: Events */
 
.wv_event.cal-color-blue,
 
--- /usr/palm/applications/com.palm.app.calendar/stylesheets/month.css 2009-06-13 01:46:10.000000000 +0200
 
+++ /cygdrive/z/Programme/Komodo/Calendar2/src/stylesheets/month.css 2010-05-02 14:49:48.000000000 +0200
 
@@ -124,12 +124,24 @@
 
float: left;
 
}
 
 
+.monthview-partly-busy-time {
 
+ background: none;
 
+ background-image: url(../images/busy-time.png);
 
+ background-repeat: no-repeat;
 
+ background-attachment: fixed;
 
+ background-position: left center;
 
+ /*color: #FF0000;*/
 
+ width: 100%;
 
+ height: 16px;
 
+ float: left;
 
+}
 
+
 
.monthview-busy-time {
 
background: none;
 
background-image: url(../images/busy-time.png);
 
- background-repeat: repeat;
 
+ background-repeat: repeat-y;
 
background-attachment: fixed;
 
- background-position: 0 0;
 
+ background-position: right 0;
 
/*color: #FF0000;*/
 
width: 100%;
 
height: 16px;
 
 
 
</source>
 

Latest revision as of 09:55, 17 May 2011

The UberCalendar patch enhances the build-in calendar application. It brings more detailed views (like subject lines in week view or shrinked day view) and a lot of other customizations. You will find the latest stable version of this patch in Preware.

A documentation of all features and settings is available here: http://forums.precentral.net/webos-patches/273919-preference-guide-metaviews-ubercalendar-uc-patch.html

A forums thread for questions, comments and more infos about the latest test version can be found here: http://forums.precentral.net/webos-patches/245177-ubercalendar-enhanced-calendar-patch.html