updates and additions
[webos-internals:imagineer1981s-modifications.git] / email / email-email-mega-mix.patch
1 diff --git a/usr/palm/applications/com.palm.app.email/app/controllers/accountpreferences-assistant.js b/usr/palm/applications/com.palm.app.email/app/controllers/accountpreferences-assistant.js
2 index 15f6bac..f0a960a 100644
3 --- a/usr/palm/applications/com.palm.app.email/app/controllers/accountpreferences-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.email/app/controllers/accountpreferences-assistant.js
5 @@ -522,6 +522,11 @@ AccountpreferencesAssistant.prototype.syncWindowOptions = {
6                 {label: $L('7 days'), value: 7},
7                 {label: $L('2 weeks'), value: 14},
8                 {label: $L('1 month'), value: 30},
9 +               {label: $L('2 months'), value: 60},
10 +               {label: $L('3 months'), value: 90},
11 +               {label: $L('6 months'), value: 180},
12 +               {label: $L('9 months'), value: 270},
13 +               {label: $L('1 year'), value: 365},
14                 {label: $L('All'), value: "0"}
15         ]
16  };
17 @@ -562,8 +567,13 @@ AccountpreferencesAssistant.prototype.fetchOptions = {
18                 {label: $L('10 minutes'), value: AccountPreferences.SYNC_10_MINS + ""},
19                 {label: $L('15 minutes'), value: AccountPreferences.SYNC_15_MINS + ""},
20                 {label: $L('30 minutes'), value: AccountPreferences.SYNC_30_MINS + ""},
21 +               {label: $L('45 minutes'), value: AccountPreferences.SYNC_45_MINS + ""},
22                 {label: $L('1 hour'), value: AccountPreferences.SYNC_1_HR + ""},
23 +               {label: $L('2 hours'), value: AccountPreferences.SYNC_2_HRS + ""},
24 +               {label: $L('4 hours'), value: AccountPreferences.SYNC_4_HRS + ""},
25                 {label: $L('6 hours'), value: AccountPreferences.SYNC_6_HRS + ""},
26 +               {label: $L('8 hours'), value: AccountPreferences.SYNC_8_HRS + ""},
27 +               {label: $L('10 hours'), value: AccountPreferences.SYNC_10_HRS + ""},
28                 {label: $L('12 hours'), value: AccountPreferences.SYNC_12_HRS + ""},
29                 {label: $L('24 hours'), value: AccountPreferences.SYNC_24_HRS + ""},
30                 {label: $L('Manual'), value: AccountPreferences.SYNC_MANUAL + ""}
31 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
32 index 55f61d0..492ecad 100644
33 --- a/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
34 +++ b/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
35 @@ -254,8 +254,11 @@ ComposeAssistant.prototype.setup = function() {
36                         visible: true,
37                         menuClass: 'palm-white',
38                         items: [
39 +                               {label:$L('Priority'), icon:'priority', command:'priority'},
40                                 {label:$L('Attach'), icon:'attach', command:'attach'},
41 -                               {label:$L('Send'), icon:'send', command:'send'}
42 +                                       {label:$L('Send'), icon:'send', command:'send'},
43 +                                       {label:$L('Save'), icon:'save', command:'save'},
44 +                                       {label:$L('Delete'),icon:'delete', command:'cancel'}
45                         ]};
46         this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.cmdMenuModel);
47  
48 @@ -669,16 +672,37 @@ ComposeAssistant.prototype.handleCommand = function(event) {
49                                 break;
50  
51                         case 'save':
52 -                               this.draftIsDirty = true; // set to true to make sure the save occurs
53 -                               this.saveDraft();
54 +                                       this.controller.showAlertDialog({
55 +                                       onChoose: function(value) {if (value == 'yes') {this.saveDraft();}},
56 +                                       title: $L("Save This Message?"),
57 +                                       choices:[
58 +                                               {label:$L('Yes'), value:"yes", type:'negative'},  
59 +                                               {label:$L("No"), value:"no", type: 'dismiss'}
60 +                                                       ]
61 +                                       });
62                                 break;
63  
64                         case 'send':
65 -                               this.send();
66 -                               break;
67 +                                       this.controller.showAlertDialog({
68 +                                       onChoose: function(value) {if (value == 'yes') {this.send();}},
69 +                                       title: $L("Send This Message?"),
70 +                                       choices:[
71 +                                               {label:$L('Yes'), value:"yes", type:'negative'},  
72 +                                               {label:$L("No"), value:"no", type: 'dismiss'}
73 +                                                       ]
74 +                                       });
75 +                                       break;
76  
77                         case 'cancel':
78 -                               this.cancelCompose();
79 +                                       this.controller.showAlertDialog({
80 +                                       onChoose: function(value) {if (value == 'yes') {this.cancelCompose();}},
81 +                                       title: $L("Discard this Draft?"),
82 +                                       message: $L("This cannot be undone"),
83 +                                       choices:[
84 +                                               {label:$L('Yes'), value:"yes", type:'negative'},  
85 +                                               {label:$L("No"), value:"no", type: 'dismiss'}
86 +                                                       ]
87 +                                       });
88                                 break;
89                                         
90                         case 'priority':
91 diff --git a/usr/palm/applications/com.palm.app.email/app/controllers/list-assistant.js b/usr/palm/applications/com.palm.app.email/app/controllers/list-assistant.js
92 index 2e239ef..1ca462e 100644
93 --- a/usr/palm/applications/com.palm.app.email/app/controllers/list-assistant.js
94 +++ b/usr/palm/applications/com.palm.app.email/app/controllers/list-assistant.js
95 @@ -72,7 +72,8 @@ ListAssistant.prototype.setup = function() {
96                         visible:true,
97                         items: [
98                                 {label:$L('Compose'), icon:'compose', command:'compose'},
99 -                               {},
100 +                               {label:$L('Delete All'), icon:'delete', command:'empty-folder'},
101 +                               {label:$L('All Read'), icon:'priority', command:'mark-folder-read'},
102                                 {label:$L('Update'), icon:'sync', command:'sync'}
103                         ]};
104         this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.cmdMenuModel);
105 diff --git a/usr/palm/applications/com.palm.app.email/app/controllers/message-assistant.js b/usr/palm/applications/com.palm.app.email/app/controllers/message-assistant.js
106 index 95bb302..6a7481e 100644
107 --- a/usr/palm/applications/com.palm.app.email/app/controllers/message-assistant.js
108 +++ b/usr/palm/applications/com.palm.app.email/app/controllers/message-assistant.js
109 @@ -128,6 +128,8 @@ var MessageAssistant = function(targetEmail, focusStage, detailsObj){
110                 this.cmdMenuModel = {
111                                 visible:true,
112                                 items: [
113 +                                       {label:$L('Move'),      icon:'file',    command:'move'},
114 +                                       {label:$L('Set Flag'),  icon:'make-vip',      command:'flag'},
115                                         {label:$L('Reply'),     icon:'reply',     command:'reply'},
116                                         {label:$L('Reply all'), icon:'reply-all', command:'replyAll'},
117                                         {label:$L('Forward'),   icon:'forward-email', command:'forward'},
118 diff --git a/usr/palm/applications/com.palm.app.email/app/models/AccountPreferences.js b/usr/palm/applications/com.palm.app.email/app/models/AccountPreferences.js
119 index 3dd59f4..dc279c0 100644
120 --- a/usr/palm/applications/com.palm.app.email/app/models/AccountPreferences.js
121 +++ b/usr/palm/applications/com.palm.app.email/app/models/AccountPreferences.js
122 @@ -82,8 +82,13 @@ AccountPreferences.SYNC_5_MINS       = 5;
123  AccountPreferences.SYNC_10_MINS        = 10;
124  AccountPreferences.SYNC_15_MINS        = 15;
125  AccountPreferences.SYNC_30_MINS        = 30;
126 +AccountPreferences.SYNC_45_MINS        = 45;
127  AccountPreferences.SYNC_1_HR   = 60;
128 +AccountPreferences.SYNC_2_HRS  = 120;
129 +AccountPreferences.SYNC_4_HRS  = 240;
130  AccountPreferences.SYNC_6_HRS  = 360;
131 +AccountPreferences.SYNC_8_HRS  = 480;
132 +AccountPreferences.SYNC_10_HRS = 600;
133  AccountPreferences.SYNC_12_HRS = 720;
134  AccountPreferences.SYNC_24_HRS = 1440;
135  AccountPreferences.SYNC_PUSH   = -1;