diff -ru /home/alec/trunk/roundcubemail/config/main.inc.php.dist rc-beta/config/main.inc.php.dist
|
old
|
new
|
|
| 241 | 241 | $rcmail_config['dont_override'] = array(); |
| 242 | 242 | |
| 243 | 243 | // list of configuration option names that need to be available in Javascript. |
| 244 | | $rcmail_config['javascript_config'] = array('read_when_deleted', 'flag_for_deletion'); |
| | 244 | $rcmail_config['javascript_config'] = array('read_when_deleted', 'flag_for_deletion', 'logout_purge'); |
| 245 | 245 | |
| 246 | 246 | // try to load host-specific configuration |
| 247 | 247 | $rcmail_config['include_host_config'] = false; |
| … |
… |
|
| 283 | 283 | // default setting if preview pane is enabled |
| 284 | 284 | $rcmail_config['preview_pane'] = FALSE; |
| 285 | 285 | |
| | 286 | // Empty trash folder on logout |
| | 287 | $rcmail_config['logout_purge'] = FALSE; |
| | 288 | |
| 286 | 289 | // don't let users set pagesize to more than this value if set |
| 287 | 290 | $rcmail_config['max_pagesize'] = 200; |
| 288 | 291 | |
diff -ru /home/alec/trunk/roundcubemail/program/js/app.js rc-beta/program/js/app.js
|
old
|
new
|
|
| 488 | 488 | break; |
| 489 | 489 | |
| 490 | 490 | case 'logout': |
| 491 | | this.goto_url('logout', '', true); |
| 492 | | break; |
| | 491 | this.logout(); |
| | 492 | break; |
| 493 | 493 | |
| 494 | 494 | // commands to switch task |
| 495 | 495 | case 'mail': |
| … |
… |
|
| 1190 | 1190 | }; |
| 1191 | 1191 | |
| 1192 | 1192 | |
| | 1193 | this.logout = function() |
| | 1194 | { |
| | 1195 | var ref = this; |
| | 1196 | var func = function() { ref.goto_url('logout', '', true); }; |
| | 1197 | |
| | 1198 | if (this.env.logout_purge) |
| | 1199 | { |
| | 1200 | var url = '_mbox=' + urlencode(this.env.trash_mailbox) + '&_reload=1'; |
| | 1201 | this.set_busy(true, 'loading'); |
| | 1202 | this.http_post('purge', url, true, func); |
| | 1203 | } |
| | 1204 | else |
| | 1205 | func(); |
| | 1206 | } |
| | 1207 | |
| | 1208 | |
| 1193 | 1209 | /*********************************************************/ |
| 1194 | 1210 | /********* (message) list functionality *********/ |
| 1195 | 1211 | /*********************************************************/ |
| … |
… |
|
| 3379 | 3395 | |
| 3380 | 3396 | |
| 3381 | 3397 | // send a http request to the server |
| 3382 | | this.http_request = function(action, querystring, lock) |
| | 3398 | this.http_request = function(action, querystring, lock, oncomplete) |
| 3383 | 3399 | { |
| 3384 | 3400 | var request_obj = this.get_request_obj(); |
| 3385 | 3401 | querystring += (querystring ? '&' : '') + '_remote=1'; |
| … |
… |
|
| 3399 | 3415 | var rcm = this; |
| 3400 | 3416 | request_obj.__lock = lock ? true : false; |
| 3401 | 3417 | request_obj.__action = action; |
| 3402 | | request_obj.onerror = function(o){ ref.http_error(o); }; |
| 3403 | | request_obj.oncomplete = function(o){ ref.http_response(o); }; |
| | 3418 | request_obj.onerror = function(o){ rcm.http_error(o); }; |
| | 3419 | if (oncomplete && typeof(oncomplete) == 'function') |
| | 3420 | request_obj.oncomplete = function(o){ rcm.http_response(o); oncomplete(); }; |
| | 3421 | else |
| | 3422 | request_obj.oncomplete = function(o){ rcm.http_response(o); }; |
| 3404 | 3423 | request_obj.GET(this.env.comm_path+'&_action='+action+'&'+querystring); |
| 3405 | 3424 | } |
| 3406 | 3425 | }; |
| 3407 | 3426 | |
| 3408 | 3427 | // send a http POST request to the server |
| 3409 | | this.http_post = function(action, postdata, lock) |
| | 3428 | this.http_post = function(action, postdata, lock, oncomplete) |
| 3410 | 3429 | { |
| 3411 | 3430 | var request_obj; |
| 3412 | 3431 | if (postdata && typeof(postdata) == 'object') |
| … |
… |
|
| 3426 | 3445 | request_obj.__lock = lock ? true : false; |
| 3427 | 3446 | request_obj.__action = action; |
| 3428 | 3447 | request_obj.onerror = function(o){ rcm.http_error(o); }; |
| 3429 | | request_obj.oncomplete = function(o){ rcm.http_response(o); }; |
| 3430 | | request_obj.POST(this.env.comm_path+'&_action='+action, postdata); |
| | 3448 | if (oncomplete && typeof(oncomplete) == 'function') |
| | 3449 | request_obj.oncomplete = function(o){ rcm.http_response(o); oncomplete(); }; |
| | 3450 | else |
| | 3451 | request_obj.oncomplete = function(o){ rcm.http_response(o); }; |
| | 3452 | request_obj.POST(this.env.comm_path+'&_action='+action, postdata); |
| | 3453 | |
| | 3454 | return request_obj; |
| 3431 | 3455 | } |
| 3432 | 3456 | }; |
| 3433 | 3457 | |
diff -ru /home/alec/trunk/roundcubemail/program/localization/en_US/labels.inc rc-beta/program/localization/en_US/labels.inc
|
old
|
new
|
|
| 250 | 250 | $labels['htmleditor'] = 'Compose HTML messages'; |
| 251 | 251 | $labels['htmlsignature'] = 'HTML signature'; |
| 252 | 252 | $labels['previewpane'] = 'Show preview pane'; |
| | 253 | $labels['logoutpurge'] = 'Empty trash folder on logout'; |
| 253 | 254 | |
| 254 | 255 | $labels['autosavedraft'] = 'Automatically save draft'; |
| 255 | 256 | $labels['everynminutes'] = 'every $n minutes'; |
diff -ru /home/alec/trunk/roundcubemail/program/steps/settings/func.inc rc-beta/program/steps/settings/func.inc
|
old
|
new
|
|
| 195 | 195 | $select_autosave->show($CONFIG['draft_autosave'])); |
| 196 | 196 | } |
| 197 | 197 | |
| | 198 | // trash purge on logout |
| | 199 | if (!isset($no_override['logout_purge'])) |
| | 200 | { |
| | 201 | $field_id = 'rcmfd_logout_purge'; |
| | 202 | $input_purge = new checkbox(array('name' => '_logout_purge', 'id' => $field_id, 'value' => 1)); |
| | 203 | $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", |
| | 204 | $field_id, |
| | 205 | Q(rcube_label('logoutpurge')), |
| | 206 | $input_purge->show($CONFIG['logout_purge']?1:0)); |
| | 207 | } |
| | 208 | |
| 198 | 209 | $out .= "\n</table>$form_end"; |
| 199 | 210 | |
| 200 | 211 | return $out; |
diff -ru /home/alec/trunk/roundcubemail/program/steps/settings/save_prefs.inc rc-beta/program/steps/settings/save_prefs.inc
|
old
|
new
|
|
| 27 | 27 | 'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE, |
| 28 | 28 | 'htmleditor' => isset($_POST['_htmleditor']) ? TRUE : FALSE, |
| 29 | 29 | 'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE, |
| 30 | | 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0 |
| | 30 | 'logout_purge' => isset($_POST['_logout_purge']) ? TRUE : FALSE, |
| | 31 | 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0, |
| 31 | 32 | ); |
| 32 | 33 | |
| 33 | 34 | // don't override these parameters |