Patches.
[webos-internals:modifications.git] / email / email-email-save-confirmation.patch
1 diff --git a/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js b/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
2 index e4f2e91..7b9fa10 100644
3 --- a/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
5 @@ -173,7 +173,9 @@ var ComposeAssistant = Class.create({
6                                 menuClass: 'palm-white',
7                                 items: [
8                                         {label:$L('Attach'), icon:'attach', command:'attach'},
9 -                                       {label:$L('Send'), icon:'send', command:'send'}
10 +                                       {label:$L('Send'), icon:'send', command:'send'},
11 +                                       {label:$L('Save'), icon:'save', command:'save'},
12 +                                       {label:$L('Delete'),icon:'delete', command:'cancel'}
13                                 ]};
14  
15                 this.appMenuSaveIndex = 2;
16 @@ -609,8 +611,14 @@ var ComposeAssistant = Class.create({
17                                         break;
18  
19                                 case 'save':
20 -                                       this.draftIsDirty = true; // set to true to make sure the save occurs
21 -                                       this.saveDraft();
22 +                                       this.controller.showAlertDialog({
23 +                                       onChoose: function(value) {if (value == 'yes') {this.save();}},
24 +                                       title: $L("Save This Message?"),
25 +                                       choices:[
26 +                                               {label:$L('Yes'), value:"yes", type:'negative'},  
27 +                                               {label:$L("No"), value:"no", type: 'dismiss'}
28 +                                                       ]
29 +                                       });
30                                         break;
31  
32                                 case 'send':