email-add-priority-discard-btns.patch
[webos-internals:skurriers-modifications.git] / email / email-add-priority-discard-btns.patch
1 --- .orig/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
2 +++ /usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
3 @@ -79,6 +79,7 @@
4                                 visible: true,
5                                 menuClass: 'palm-white',
6                                 items: [
7 +                                       {label:$L('Priority'), icon:'priority', command:'priority'},
8                                         {label:$L('Attach'), icon:'attach', command:'attach'},
9                                         {label:$L('Send'), icon:'send', command:'send'}
10                                 ]};
11 @@ -80,7 +81,8 @@
12                                 menuClass: 'palm-white',
13                                 items: [
14                                         {label:$L('Attach'), icon:'attach', command:'attach'},
15 -                                       {label:$L('Send'), icon:'send', command:'send'}
16 +                                       {label:('Send'), icon:'send', command:'send'},
17 +                                       {label:$L('Delete'),icon:'delete', command:'cancel'}
18                                 ]};
19  
20                 this.draftIsDirty = false;
21 @@ -236,7 +238,15 @@
22                                         break;
23  
24                                 case 'cancel':
25 -                                       this.cancelCompose();
26 +                                       this.controller.showAlertDialog({
27 +                                       onChoose: function(value) {if (value == 'yes') {this.cancelCompose();}},
28 +                                       title: $L("Discard this Draft?"),
29 +                                       message: $L("This cannot be undone"),
30 +                                       choices:[
31 +                                               {label:$L('Yes'), value:"yes", type:'negative'},  
32 +                                               {label:$L("No"), value:"no", type: 'dismiss'}
33 +                                                       ]
34 +                                       });
35                                         break;
36                                                 
37                                 case 'priority':