5 adds, 2 modifies via submission form
[webos-internals:skurriers-modifications.git] / email / email-add-priority-discard-btns.patch
1 Name: Add Priority Discard Btns
2 Version: 1.2.1-12120
3 Author: mamouton
4 Description: This will place a high priority icon and a discard message icon at the bottom of your current message. Special thanks to Tibfib for adding the confirmation for the discard message and removing the options from the menu area.
5
6 --- .orig/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
7 +++ /usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
8 @@ -79,6 +79,7 @@
9                                 visible: true,
10                                 menuClass: 'palm-white',
11                                 items: [
12 +                                       {label:$L('Priority'), icon:'priority', command:'priority'},
13                                         {label:$L('Attach'), icon:'attach', command:'attach'},
14                                         {label:$L('Send'), icon:'send', command:'send'}
15                                 ]};
16 @@ -80,7 +81,8 @@
17                                 menuClass: 'palm-white',
18                                 items: [
19                                         {label:$L('Attach'), icon:'attach', command:'attach'},
20 -                                       {label:$L('Send'), icon:'send', command:'send'}
21 +                                       {label:('Send'), icon:'send', command:'send'},
22 +                                       {label:$L('Delete'),icon:'delete', command:'cancel'}
23                                 ]};
24  
25                 this.draftIsDirty = false;
26 @@ -89,8 +91,8 @@
27                 this.appMenuModel = {
28                                 visible:true,
29                                 items: [
30 -                                       this.priorityFlagMenuItem,
31 -                                       {label:$L('Discard Message'), command:'cancel'},
32 +                                       //this.priorityFlagMenuItem,
33 +                                       //{label:$L('Discard Message'), command:'cancel'},
34                                         {label:$L('Save as Draft'),   command:'save', disabledProperty:true }
35                                 ]};
36                 this.controller.setupWidget(Mojo.Menu.appMenu, {richTextEditMenu: true}, this.appMenuModel);
37 @@ -185,7 +187,8 @@
38                 }
39  
40                 // Delayed a little, since we want the header part of render as quickly as possible
41 -               ComposeAssistant.onLoad.defer(this.controller, this.email);
42 +ComposeAssistant.onLoad.defer(this.controller, this.email);
43 +this.controller.window.PalmSystem.setWindowOrientation("free");
44         },
45  
46         cleanup: function() {
47 @@ -236,7 +239,15 @@
48                                         break;
49  
50                                 case 'cancel':
51 -                                       this.cancelCompose();
52 +                                       this.controller.showAlertDialog({
53 +                                       onChoose: function(value) {if (value == 'yes') {this.cancelCompose();}},
54 +                                       title: $L("Discard this Draft?"),
55 +                                       message: $L("This cannot be undone"),
56 +                                       choices:[
57 +                                               {label:$L('Yes'), value:"yes", type:'negative'},  
58 +                                               {label:$L("No"), value:"no", type: 'dismiss'}
59 +                                                       ]
60 +                                       });
61                                         break;
62                                                 
63                                 case 'priority':