21 New Patches.
[webos-internals:djcin7s-modifications.git] / calendar / calendar-edit-item-as-new.patch
1 diff --git a/usr/palm/applications/com.palm.app.calendar/app/controllers/edit-assistant.js b/usr/palm/applications/com.palm.app.calendar/app/controllers/edit-assistant.js
2 index 9ba9c70..6760a29 100644
3 --- a/usr/palm/applications/com.palm.app.calendar/app/controllers/edit-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.calendar/app/controllers/edit-assistant.js
5 @@ -8,6 +8,7 @@ var EditAssistant = Class.create({
6                                                                                                                  {label:$L('Get Directions'), command:'direction', disabled:false}] 
7                                                                                                                                                                 
8                                                         },
9 +                                                       {label:$L('Edit event as new'), command:'editAsNewEvent', disabled:false},
10                                                         {label:$L('Delete event'), command:'deleteEvent', disabled:false},
11                                                         {label:$L('Preferences & Accounts'), command:Mojo.Menu.prefsCmd, disabled: true},
12                                                         {label:$L('Help'), command:Mojo.Menu.helpCmd, disabled:false}]
13 @@ -671,6 +672,12 @@ var EditAssistant = Class.create({
14                         } else if (event.command == Mojo.Menu.prefsCmd) {
15                                 Event.stop(event);
16                                 this.controller.stageController.pushScene('prefs');
17 +                       }else if(event.command =='editAsNewEvent'){
18 +                               Event.stop(event);
19 +                               this.targetEvent = Object.clone(this.targetEvent);
20 +                               this.targetId = 0;
21 +                               this.targetEvent.id = 0;
22 +                               this.targetEvent.dirty = true;
23                         }else if(event.command =='copy'){
24                                 //@todo
25                         }else if(event.command == Mojo.Menu.helpCmd){