Changeset 3971 in subversion
- Timestamp:
- Sep 17, 2010 5:14:13 AM (3 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 1 added
- 5 edited
-
CHANGELOG (modified) (1 diff)
-
index.php (modified) (1 diff)
-
program/js/app.js (modified) (5 diffs)
-
program/steps/mail/func.inc (modified) (3 diffs)
-
program/steps/mail/list.inc (modified) (2 diffs)
-
program/steps/utils/save_pref.inc (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r3969 r3971 24 24 - Fix format=flowed handling (#1486989) 25 25 - Fix when IMAP connection fails in 'get' action session shouldn't be destroyed (#1486995) 26 - Fix list_cols is not updated after column dragging (#1486999) 26 27 27 28 RELEASE 0.4 -
trunk/roundcubemail/index.php
r3879 r3971 185 185 // handle keep-alive signal 186 186 if ($RCMAIL->action == 'keep-alive') { 187 $OUTPUT->reset();188 $OUTPUT->send();189 }190 // save preference value191 else if ($RCMAIL->action == 'save-pref') {192 $RCMAIL->user->save_prefs(array(get_input_value('_name', RCUBE_INPUT_POST) => get_input_value('_value', RCUBE_INPUT_POST)));193 187 $OUTPUT->reset(); 194 188 $OUTPUT->send(); -
trunk/roundcubemail/program/js/app.js
r3927 r3971 1289 1289 } 1290 1290 1291 this.http_post(' save-pref', '_name=collapsed_folders&_value='+urlencode(this.env.collapsed_folders));1291 this.http_post('utils/save-pref', '_name=collapsed_folders&_value='+urlencode(this.env.collapsed_folders)); 1292 1292 this.set_unread_count_display(id, false); 1293 1293 }; … … 1460 1460 this.set_env('subject_col', found); 1461 1461 1462 this.http_post(' save-pref', { '_name':'list_cols', '_value':this.env.coltypes});1462 this.http_post('utils/save-pref', { '_name':'list_cols', '_value':this.env.coltypes, '_session':'list_attrib/columns' }); 1463 1463 }; 1464 1464 … … 4895 4895 this.http_request = function(action, querystring, lock) 4896 4896 { 4897 var url = this.env.comm_path; 4898 4899 // overwrite task name 4900 if (action.match(/([a-z]+)\/([a-z-_]+)/)) { 4901 action = RegExp.$2; 4902 url = url.replace(/\_task=[a-z]+/, '_task='+RegExp.$1); 4903 } 4904 4897 4905 // trigger plugin hook 4898 4906 var result = this.triggerEvent('request'+action, querystring); 4907 4899 4908 if (typeof result != 'undefined') { 4900 4909 // abort if one the handlers returned false … … 4905 4914 } 4906 4915 4907 querystring += (querystring ? '&' : '') + '_remote=1'; 4908 var url = this.env.comm_path + '&_action=' + action + '&' + querystring; 4916 url += '&_remote=1&_action=' + action + (querystring ? '&' : '') + querystring; 4909 4917 4910 4918 // send request … … 4916 4924 this.http_post = function(action, postdata, lock) 4917 4925 { 4918 var url = this.env.comm_path+'&_action=' + action; 4926 var url = this.env.comm_path; 4927 4928 // overwrite task name 4929 if (action.match(/([a-z]+)\/([a-z-_]+)/)) { 4930 action = RegExp.$2; 4931 url = url.replace(/\_task=[a-z]+/, '_task='+RegExp.$1); 4932 } 4933 4934 url += '&_action=' + action; 4919 4935 4920 4936 if (postdata && typeof(postdata) == 'object') { -
trunk/roundcubemail/program/steps/mail/func.inc
r3969 r3971 172 172 $a_show_cols[$f] = 'to'; 173 173 174 // make sure 'threads' column is present 174 // make sure 'threads' and 'subject' columns are present 175 if (!in_array('subject', $a_show_cols)) 176 array_unshift($a_show_cols, 'subject'); 175 177 if (!in_array('threads', $a_show_cols)) 176 178 array_unshift($a_show_cols, 'threads'); … … 224 226 /** 225 227 * return javascript commands to add rows to the message list 226 * or to replace the whole list (IE only) 227 */ 228 function rcmail_js_message_list($a_headers, $insert_top=FALSE, $head_replace=FALSE) 228 */ 229 function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null) 229 230 { 230 231 global $CONFIG, $IMAP, $RCMAIL, $OUTPUT; 231 232 232 if (!empty($_SESSION['list_attrib']['columns'])) 233 $a_show_cols = $_SESSION['list_attrib']['columns']; 234 else 235 $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject'); 233 if (empty($a_show_cols)) { 234 if (!empty($_SESSION['list_attrib']['columns'])) 235 $a_show_cols = $_SESSION['list_attrib']['columns']; 236 else 237 $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject'); 238 } 239 else { 240 if (!is_array($a_show_cols)) 241 $a_show_cols = preg_split('/[\s,;]+/', strip_quotes($a_show_cols)); 242 $head_replace = true; 243 } 236 244 237 245 $mbox = $IMAP->get_mailbox_name(); 238 246 $delim = $IMAP->get_hierarchy_delimiter(); 247 248 // make sure 'threads' and 'subject' columns are present 249 if (!in_array('subject', $a_show_cols)) 250 array_unshift($a_show_cols, 'subject'); 251 if (!in_array('threads', $a_show_cols)) 252 array_unshift($a_show_cols, 'threads'); 253 254 $_SESSION['list_attrib']['columns'] = $a_show_cols; 239 255 240 256 // show 'to' instead of 'from' in sent/draft messages … … 243 259 $a_show_cols[$f] = 'to'; 244 260 245 // make sure 'threads' column is present 246 if (!in_array('threads', $a_show_cols)) 247 array_unshift($a_show_cols, 'threads'); 261 // Make sure there are no duplicated columns (#1486999) 262 $a_show_cols = array_unique($a_show_cols); 248 263 249 264 // Plugins may set header's list_cols/list_flags and other rcube_mail_header variables -
trunk/roundcubemail/program/steps/mail/list.inc
r3780 r3971 49 49 } 50 50 51 if ($save_arr) 51 if ($save_arr) 52 52 $RCMAIL->user->save_prefs($save_arr); 53 53 … … 89 89 90 90 // add message rows 91 rcmail_js_message_list($a_headers, FALSE, (bool)$cols);91 rcmail_js_message_list($a_headers, FALSE, $cols); 92 92 if (isset($a_headers) && count($a_headers)) 93 93 {
Note: See TracChangeset
for help on using the changeset viewer.
