webOS Nation Forums >  Homebrew >  webOS patches > All-Day Events in Month View Patch
All-Day Events in Month View Patch

  Reply
 
LinkBack Thread Tools Display Modes
Old 07/24/2009, 04:38 AM   #1 (permalink)
Member
 
d2globalinc's Avatar
 
Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
Default All-Day Events in Month View Patch

- UPDATE 07-24-2009 - NEW AND CERTIFIED FOR Palm WebOS v1.1.0

THIS HOWTO IS CERTIFIED FOR WEBOS v1.1.0 - DO NOT USE THIS FOR OLDER VERSIONS OF WEBOS!


This HOWTO requires that you already have root access to your phone. If you need more information on how to do that search the forum.

Click Here to search for my HOWTO's and Answers for the Palm PRE!

NOTES:
This was taken from the original post over at http://www.webos-internals.org/wiki/...dar_month_view - I just put it into a simple script/command set that you can just copy and paste into your ssh / terminal window. This patch will modify the calendar application to show all day events in the month view of the application. It denotes days with all day events by changing the background of the cell to be blue. Thanks to webos-internals.org for the information!

SCREENSHOT OF MONTHVIEW


The HowTO:

I'll try to make this as simple as possible.

1. Login to your Palm PRE and obtain root access.. (Again look around the forums to see how to do this)

2. Once you are at the "root@castle" prompt COPY and PASTE all of the following code into your terminal / putty / ssh window.. (These commands will make backup copies of the original files, then modify them)


** This will reboot your PRE so be sure to close all of your applications beforehand. **
Code:
#
# ENABLE SHOW ALL-DAY EVENTS IN CALENDAR MONTH VIEW
#
mount -o remount,rw /
#
# RESTORE FILES
# 
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.calendar/app/controllers/month-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.calendar/app/controllers/month-assistant.js
#
# BACKUP FILES
#
echo BACKING UP ORIGINAL FILES
cp /usr/palm/applications/com.palm.app.calendar/app/controllers/month-assistant.js /usr/palm/applications/com.palm.app.calendar/app/controllers/month-assistant.js_1-1-0
#
# MAKING FIRST MODIFICATIONS TO month-assistant.js
#
echo MAKING FIRST MODIFICATIONS TO month-assistant.js
sed -i "s/setupMonth: function(startDate, endDate, callbackfn)/fullEvts: null,\n\
\n\
        setupMonth: function(startDate, endDate, callbackfn)/g" /usr/palm/applications/com.palm.app.calendar/app/controllers/month-assistant.js
#
# MAKING SECOND MODIFICATIONS TO month-assistant.js
#
echo MAKING SECOND MODIFICATIONS TO month-assistant.js
sed -i "s/getCalendarService().getBusyDays(getCurrentCal(), startDate.getTime(), endDate.getTime(), callbackfn, this.controller);/getCalendarService().getEvents(getCurrentCal(),startDate.getTime(), endDate.getTime(), this.getEventsCallback.bind(this), this.controller, this.getEventsFailCallback, {useSlices: true});\n\
                getCalendarService().getBusyDays(getCurrentCal(), startDate.getTime(), endDate.getTime(), callbackfn, this.controller);/g" /usr/palm/applications/com.palm.app.calendar/app/controllers/month-assistant.js
#
# MAKING THIRD MODIFICATIONS TO month-assistant.js
#
echo MAKING THIRD MODIFICATIONS TO month-assistant.js
sed -i "s/buildViewHeader: function()/getEventsCallback: function(resp)\n\
        {\n\
                \/\/Mojo.Log.info(\'month-assistant:getEventsCallback\');\n\
                this.fullEvts = resp.days;\n\
        },\n\
\n\
        buildViewHeader: function()/g" /usr/palm/applications/com.palm.app.calendar/app/controllers/month-assistant.js
#
# MAKING FOURTH MODIFICATIONS TO month-assistant.js
#
echo MAKING THIRD MODIFICATIONS TO month-assistant.js
sed -i "s/var day = this._token2state(days.charCodeAt(d));/if (this.fullEvts[d].allDayEvents.length > 0)\n\
                        {\n\
                                dayCell.style.backgroundColor = '#99ccff';\n\
                        }\n\
\n\
                        var day = this._token2state(days.charCodeAt(d));/g" /usr/palm/applications/com.palm.app.calendar/app/controllers/month-assistant.js
#
# COMPLETE UPDATE
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#
Good Luck! And Happy Hacking!!

- D2G

To restore original files use the following:
Code:
#
# DISABLE SHOW ALL-DAY EVENTS IN CALENDAR MONTH VIEW
#
mount -o remount,rw /
#
# RESTORE FILES
# 
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.calendar/app/controllers/month-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.calendar/app/controllers/month-assistant.js
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#
Attached Images
File Type: jpg calendar_2009-24-07_043351.jpg (47.6 KB, 446 views) Email Attachment
__________________
---------
Click Here to search for my HOWTO's and Answers for the Palm PRE!

Last edited by d2globalinc; 07/24/2009 at 05:14 AM.
d2globalinc is offline   Reply With Quote
Thanked by DNic, Vandyfc
Old 07/24/2009, 04:46 AM   #2 (permalink)
Member
 
jack87's Avatar
 
Join Date: Jun 2009
Location: Salt Lake City, Ut
Posts: 1,225
Likes Received: 9
Thanks: 78
Thanked 179 Times in 128 Posts
Default

You need to fix your link to the webos-internals wiki in this post. i added the h and still no luck

Update: damn typos haha we really should be a sleep thank a bunch!
__________________
MatterOfFactJack

Last edited by jack87; 07/24/2009 at 05:36 AM.
jack87 is offline   Reply With Quote
Old 07/24/2009, 05:28 AM   #3 (permalink)
Member
 
d2globalinc's Avatar
 
Join Date: Mar 2008
Posts: 105
Likes Received: 0
Thanks: 2
Thanked 243 Times in 42 Posts
Default

Quote:
Originally Posted by jack87 View Post
You need to fix your link to the webinernals wiki in this post. i added the h and still no luck
Fixed!

- D2G
__________________
---------
Click Here to search for my HOWTO's and Answers for the Palm PRE!
d2globalinc is offline   Reply With Quote
Old 07/24/2009, 07:13 AM   #4 (permalink)
Member
 
Bigchris's Avatar
 
Join Date: Jan 2005
Location: Southern California
Posts: 644
Likes Received: 0
Thanks: 126
Thanked 43 Times in 22 Posts
Default

D2, THANKS....... This is a great How To, to have.. Thanks.... The Calendar app really needed this....
__________________
Remember, this is my opinion ! We all have a right to our own.....

Treo's 650-800..NOW,
Palm Pre

Last edited by Bigchris; 07/24/2009 at 07:38 AM.
Bigchris is offline   Reply With Quote
Old 07/24/2009, 12:17 PM   #5 (permalink)
Member
 
Join Date: Jun 2009
Posts: 66
Likes Received: 0
Thanks: 4
Thanked 24 Times in 9 Posts
Default

I don't have a rooted pre....but made a thread about a google calendar month view with text

http://bit.ly/mThRp
whitesmoke33 is offline   Reply With Quote
Old 07/24/2009, 01:37 PM   #6 (permalink)
Member
 
DNic's Avatar
 
Join Date: Jun 2009
Posts: 599
Likes Received: 0
Thanks: 174
Thanked 44 Times in 34 Posts
Default

Thanks, don't understand why palm hasn't addressed this.
Is there any way to default to month view??
DNic is offline   Reply With Quote
Old 07/25/2009, 04:06 AM   #7 (permalink)
Member
 
Join Date: Jul 2009
Posts: 89
Likes Received: 0
Thanks: 3
Thanked 2 Times in 2 Posts
Default

It glitches alot. It shows blue highlighted days when there is no event on that day.
Muyiwafly is offline   Reply With Quote
Old 07/25/2009, 07:50 AM   #8 (permalink)
Member
 
DNic's Avatar
 
Join Date: Jun 2009
Posts: 599
Likes Received: 0
Thanks: 174
Thanked 44 Times in 34 Posts
Default

Quote:
Originally Posted by Muyiwafly View Post
It glitches alot. It shows blue highlighted days when there is no event on that day.
Yup it sure is.
DNic is offline   Reply With Quote
Old 07/25/2009, 10:58 PM   #9 (permalink)
Member
 
halmo20's Avatar
 
Join Date: Jun 2009
Posts: 115
Likes Received: 0
Thanks: 20
Thanked 13 Times in 10 Posts
Default

Noticed that blue square follows to the next month and beyond on the same spot on the screen even though there is no event on that date....
__________________
iPhone; the official phone of 'the Borg'
halmo20 is offline   Reply With Quote
Old 07/26/2009, 01:33 AM   #10 (permalink)
Member
 
Join Date: Jun 2006
Posts: 8
Likes Received: 0
Thanks: 1
Thanked 5 Times in 1 Post
Default

The patch in this thread is very problematic; it screws everything up if you move from month to month in the monthly view.

As for changing the default calendar view to the monthly view, that is possible. I posted the answer in another thread a while back, and I'd like to link to it, but the board is making that hard because I haven't posted enough times yet (sigh). Best I can do until I post five more times, gah:

forums.precentral.net/web-os-development/192542-howto-change-default-view-calendar-hack-rooting-required.html
matthewn is offline   Reply With Quote
Old 07/26/2009, 09:37 PM   #11 (permalink)
Member
 
Join Date: Jul 2009
Posts: 89
Likes Received: 0
Thanks: 3
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by matthewn View Post
The patch in this thread is very problematic; it screws everything up if you move from month to month in the monthly view.

As for changing the default calendar view to the monthly view, that is possible. I posted the answer in another thread a while back, and I'd like to link to it, but the board is making that hard because I haven't posted enough times yet (sigh). Best I can do until I post five more times, gah:

forums.precentral.net/web-os-development/192542-howto-change-default-view-calendar-hack-rooting-required.html
This does not resolve the "it screws everything up if you move from month to month in the monthly view" problem.
Muyiwafly is offline   Reply With Quote
Old 07/27/2009, 12:11 PM   #12 (permalink)
Forum Leader
 
mamouton's Avatar
 
Join Date: Jan 2007
Location: Fort Worth, TX
Posts: 5,771
Likes Received: 5
Thanks: 796
Thanked 1,165 Times in 801 Posts
Default

Quote:
Originally Posted by Muyiwafly View Post
It glitches alot. It shows blue highlighted days when there is no event on that day.
Quote:
Originally Posted by DNic View Post
Yup it sure is.
I thought that too at first but if you have the weather showing on your google calendar any type of tasks it will show that as aan all day event.
mamouton is offline   Reply With Quote
Old 07/27/2009, 12:35 PM   #13 (permalink)
Member
 
DNic's Avatar
 
Join Date: Jun 2009
Posts: 599
Likes Received: 0
Thanks: 174
Thanked 44 Times in 34 Posts
Default

Quote:
Originally Posted by mamouton View Post
I thought that too at first but if you have the weather showing on your google calendar any type of tasks it will show that as aan all day event.
I dont have weather up on my calendar.
DNic is offline   Reply With Quote
Old 07/28/2009, 12:38 AM   #14 (permalink)
Homebrew Developer
 
Join Date: Nov 2008
Location: Raleigh, NC
Posts: 191
Likes Received: 0
Thanks: 38
Thanked 29 Times in 16 Posts
Default

I'm thinking the random blue days that don't have events are birthdays. I don't mind that they display birthdays, but can we get them to have a different color AND display who's birthday it is!?
mfive is offline   Reply With Quote
Old 07/28/2009, 12:53 AM   #15 (permalink)
Member
 
Bigchris's Avatar
 
Join Date: Jan 2005
Location: Southern California
Posts: 644
Likes Received: 0
Thanks: 126
Thanked 43 Times in 22 Posts
Default

With mine, when I first open the calendar app, and go to Month View, its ok. It gets weird when your in month view and switch months, then thats when the extra days show up. Part of it was when I had the weather on the calendar, then I got rid of that. What I find that works is when you switch months, go to the day view, then go back to the month view and it will show the correct all day events. Thats been working for me until there's a better fix.
__________________
Remember, this is my opinion ! We all have a right to our own.....

Treo's 650-800..NOW,
Palm Pre
Bigchris is offline   Reply With Quote
Old 08/03/2009, 01:10 PM   #16 (permalink)
Member
 
Join Date: Oct 2007
Posts: 168
Likes Received: 3
Thanks: 12
Thanked 15 Times in 11 Posts
Default All-Day Events in Month View Patch

Hi folks. I am writing here because I know no where else to go to get help.

It really frustrates me that palm doesn't show all day events in the calendar.

On the webos-internals.org website, I came across a patch to show all day event is blue. If you go to the patch section. it shows that this works post 1.1 update, but I have no idea how to get the patch on to the pre.

I tried to edit the month-assistant.js myself by looking for the lines it is adding and added them were they matched, but nothing happened. I rescanned, killed and restarted the luna sys manager and rebooted. It didn't work.

Here is the link to it: Patch Calendar Show All-Day Events in Month View - WebOS Internals

I have quilt installed and have a few mods from that series already working. I would really like to get this on my pre. I am very tech savy, I just don't know a whole lot about getting patches on to the pre using linux. I have no problem adding code manually if I have too.

Can anyone help me out here?
pyrognome is offline   Reply With Quote
Old 08/03/2009, 01:19 PM   #17 (permalink)
Member

 
Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
Default

There's a way to use it as a patch, I believe, but I don't know how, so I did it manually.

Basically when it says something like
Code:
@@ -25,11 +25,25 @@ var MonthAssistant = Class.create({
The first number is the line position, second is the length of the segment in the original file, second pair is for the new file.

It tells you a few lines before where things need to be modified, and then you'll start to see all of the lines with a + in front of them. Those need to be added. Lines with a - need to be removed.
jhoff80 is offline   Reply With Quote
Old 08/03/2009, 03:56 PM   #18 (permalink)
Member
 
Join Date: Oct 2007
Posts: 168
Likes Received: 3
Thanks: 12
Thanked 15 Times in 11 Posts
Default

Thanks for the info. go figure right >< I was looking and looking and looking. Once I thought I looked hard enough and couldn't find an answer I posted this. Then of course right after I created this thread I found this: http://forums.precentral.net/web-os-...onth-view.html
pyrognome is offline   Reply With Quote
Old 09/16/2009, 08:56 AM   #19 (permalink)
Member
 
Join Date: May 2009
Posts: 1,142
Likes Received: 49
Thanks: 151
Thanked 286 Times in 147 Posts
Default

bump this would make an awesome tweak imo. having the ability to display all-day events in month view is very important. after all, most all-day events usually last more than a day, and the month view is the optimal place to view multiple days since it can display the most number of days on the screen. displaying it in week view isn't enough because there's the limitation of when a week starts and ends.
__________________
--

Get your virtual onscreen keyboard themes & installation instructions here

Free 2GB of online storage, with automatic synching between multiple devices, on Dropbox
un_designer is offline   Reply With Quote
Old 10/01/2009, 08:56 PM   #20 (permalink)
Member
 
rpankoe's Avatar
 
Join Date: Aug 2009
Posts: 288
Likes Received: 1
Thanks: 20
Thanked 14 Times in 13 Posts
Default

I tried the patch for All-day events on Month view, but it seemed to just clear the entire month-view. When I removed it, I got my view of all the other stuff back. Something's not working with that patch.

Anyone know what the phone radio power patch and state patch are for? Just "???" in preware.
rpankoe is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0