Changeset 3142 in subversion
- Timestamp:
- Nov 30, 2009 3:55:57 AM (3 years ago)
- Location:
- branches/devel-threads
- Files:
-
- 11 edited
-
THREADS (modified) (3 diffs)
-
program/include/rcube_imap.php (modified) (1 diff)
-
program/js/app.js (modified) (15 diffs)
-
program/js/common.js (modified) (1 diff)
-
program/js/list.js (modified) (12 diffs)
-
program/steps/mail/check_recent.inc (modified) (1 diff)
-
program/steps/mail/func.inc (modified) (5 diffs)
-
program/steps/mail/list.inc (modified) (1 diff)
-
program/steps/mail/mark.inc (modified) (3 diffs)
-
program/steps/mail/move_del.inc (modified) (1 diff)
-
skins/default/functions.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/devel-threads/THREADS
r3136 r3142 10 10 supported by server and implement REFS sorting in Roundcube 11 11 - use underlined subject for root with unread children (icon is still supported) 12 - on deleting messages the whole list isn't refreshed 12 13 13 14 CHANGES IN RELATION TO TRUNK (for pasting into CHANGELOG after merge) … … 20 21 TODO (must have): 21 22 - threads caching, 22 - after message delete we shouldn't reload the whole list, only the thread23 in which the message was24 23 - "Expand All Unread" button 25 24 TODO (other): … … 38 37 TODO (by the way): 39 38 - use jQuery.inArray instead of find_in_array() (common.js) 39 - use only one function (js) to generate messages list 40 40 41 41 KNOWN ISSUES: 42 - after message(s) deletion the whole list is reloaded (see TODO), 43 - the same with a new message (check_recent) 42 - on new message (check_recent) the whole list is reloaded 44 43 - css issues on IE6-7 44 -
branches/devel-threads/program/include/rcube_imap.php
r3129 r3142 757 757 758 758 return $this->_fetch_thread_headers($mailbox, $thread_tree, $msg_depth, $has_children, 759 $msg_index, $page, $ lice);759 $msg_index, $page, $slice); 760 760 } 761 761 -
branches/devel-threads/program/js/app.js
r3136 r3142 176 176 this.set_message_coltypes(this.env.coltypes); 177 177 this.message_list.init(); 178 this.enable_command('toggle_status', 'toggle_flag', true);178 this.enable_command('toggle_status', 'toggle_flag', 'menu-open', true); 179 179 180 180 if (this.gui_objects.mailcontframe) … … 483 483 else if (this.env.permaurl) 484 484 parent.location.href = this.env.permaurl; 485 break; 486 487 case 'menu-open': 488 this.triggerEvent('menu-open', {props:props}); 489 return false; 485 490 break; 486 491 … … 647 652 // mail task 648 653 if (this.task=='mail') 649 { 650 if (this.delete_messages() && this.env.threading) 651 { 652 // It is very hard to re-thread message list if some messages were removed from 653 // the middle of a thread (we need to fully implement RFC5256 algorythm, because 654 // we are a "disconnected client" if we re-threading without a servers help) 655 // Reload message list 656 this.list_mailbox(this.env.mailbox, this.env.current_page); 657 } 658 } 654 this.delete_messages(); 659 655 // addressbook task 660 656 else if (this.task=='addressbook') … … 665 661 break; 666 662 667 668 663 // mail task commands 669 664 case 'move': 670 665 case 'moveto': 671 666 if (this.task == 'mail') 672 {673 667 this.move_messages(props); 674 if (this.env.threading)675 {676 // The same as for 'delete'677 this.list_mailbox(this.env.mailbox, this.env.current_page);678 }679 }680 668 else if (this.task == 'addressbook' && this.drag_active) 681 669 this.copy_contact(null, props); … … 1563 1551 if (this.env.threading) 1564 1552 { 1565 // XXX: This assumes that div width is hardcoded to 15px, 1566 // Chris did it a bit differently in an original patch, he was adding so much divs as depth is 1567 // I replaced logic in list.js:drag_mouse_move() so subject text is picked defferently, so 1568 // either method of could be used (that was only the one problem I noted with these added divs). 1569 // The same is true for an offline list (program/steps/mail/func.inc:rcmail_message_list()). 1570 // Bubble 1553 // This assumes that div width is hardcoded to 15px, 1571 1554 var width = message.depth * 15; 1572 1555 if (width) … … 1880 1863 } 1881 1864 1882 this.expunge_mailbox = function(mbox)1883 {1884 var lock = false;1885 var add_url = '';1886 1887 // lock interface if it's the active mailbox1888 if (mbox == this.env.mailbox)1889 {1890 lock = true;1891 this.set_busy(true, 'loading');1892 add_url = '&_reload=1';1893 }1894 1895 // send request to server1896 var url = '_mbox='+urlencode(mbox);1897 this.http_post('expunge', url+add_url, lock);1898 };1899 1900 this.purge_mailbox = function(mbox)1901 {1902 var lock = false;1903 var add_url = '';1904 1905 if (!confirm(this.get_label('purgefolderconfirm')))1906 return false;1907 1908 // lock interface if it's the active mailbox1909 if (mbox == this.env.mailbox)1910 {1911 lock = true;1912 this.set_busy(true, 'loading');1913 add_url = '&_reload=1';1914 }1915 1916 // send request to server1917 var url = '_mbox='+urlencode(mbox);1918 this.http_post('purge', url+add_url, lock);1919 return true;1920 };1921 1922 // test if purge command is allowed1923 this.purge_mailbox_test = function()1924 {1925 return (this.env.messagecount && (this.env.mailbox == this.env.trash_mailbox || this.env.mailbox == this.env.junk_mailbox1926 || this.env.mailbox.match('^' + RegExp.escape(this.env.trash_mailbox) + RegExp.escape(this.env.delimiter))1927 || this.env.mailbox.match('^' + RegExp.escape(this.env.junk_mailbox) + RegExp.escape(this.env.delimiter))));1928 };1929 1930 1865 // update parent in a thread 1931 1866 this.update_thread_root = function(uid, flag) … … 1965 1900 } 1966 1901 1902 // update thread indicators for all messages in a thread below the specified message 1903 // return number of removed/added root level messages 1904 this.update_thread = function (uid) 1905 { 1906 if (!this.env.threading) 1907 return 0; 1908 1909 var rows = this.message_list.rows; 1910 var row = rows[uid] 1911 var depth = rows[uid].depth; 1912 var r, parent, count = 0; 1913 var roots = new Array(); 1914 1915 if (!row.depth) // root message: decrease roots count 1916 count--; 1917 else if (row.unread) { 1918 // update unread_children for thread root 1919 var parent = this.find_thread_root(uid); 1920 rows[parent].unread_children--; 1921 this.set_unread_children(parent); 1922 } 1923 1924 parent = row.parent_uid; 1925 1926 // childrens 1927 row = row.obj.nextSibling; 1928 while (row) { 1929 if (row.nodeType == 1 && (r = rows[row.uid])) { 1930 if (!r.depth || r.depth <= depth) 1931 break; 1932 1933 r.depth--; // move left 1934 $('#rcmtab'+r.uid).width(r.depth * 15); 1935 if (!r.depth) { // a new root 1936 count++; // increase roots count 1937 r.parent_uid = 0; 1938 if (r.has_children) { 1939 // replace 'leaf' with 'collapsed' 1940 $('#rcmrow'+r.uid+' '+'.leaf:first') 1941 .attr('id', 'rcmexpando' + r.uid) 1942 .attr('class', (r.obj.style.display != 'none' ? 'expanded' : 'collapsed')) 1943 .bind('mousedown', {uid:r.uid, p:this}, 1944 function(e) { return e.data.p.expand_message_row(e, e.data.uid); }); 1945 1946 r.unread_children = 0; 1947 roots[roots.length] = r; 1948 } 1949 // show if it was hidden 1950 if (r.obj.style.display == 'none') 1951 $(r.obj).show(); 1952 } 1953 else { 1954 if (r.depth == depth) 1955 r.parent_uid = parent; 1956 if (r.unread && roots.length) { 1957 roots[roots.length-1].unread_children++; 1958 } 1959 } 1960 } 1961 row = row.nextSibling; 1962 } 1963 1964 // update unread_children for roots 1965 for (var i=0; i<roots.length; i++) 1966 this.set_unread_children(roots[i].uid); 1967 1968 return count; 1969 }; 1970 1971 this.delete_excessive_thread_rows = function() 1972 { 1973 var rows = this.message_list.rows; 1974 var tbody = this.message_list.list.tBodies[0]; 1975 var row = tbody.firstChild; 1976 var cnt = this.env.pagesize + 1; 1977 1978 while (row) { 1979 if (row.nodeType == 1 && (r = rows[row.uid])) { 1980 if (!r.depth && cnt) 1981 cnt--; 1982 1983 if (!cnt) 1984 this.message_list.remove_row(row.uid); 1985 } 1986 row = row.nextSibling; 1987 } 1988 } 1989 1967 1990 // set message icon 1968 1991 this.set_message_icon = function(uid) … … 2037 2060 2038 2061 var rowobj = $(rows[uid].obj); 2039 if (rows[uid].unread && rows[uid].classname.indexOf('unread')<0) 2040 { 2041 rows[uid].classname += ' unread'; 2062 2063 if (rows[uid].unread && !rowobj.hasClass('unread')) 2042 2064 rowobj.addClass('unread'); 2043 } 2044 else if (!rows[uid].unread && rows[uid].classname.indexOf('unread')>=0) 2045 { 2046 rows[uid].classname = rows[uid].classname.replace(/\s*unread/, ''); 2065 else if (!rows[uid].unread && rowobj.hasClass('unread')) 2047 2066 rowobj.removeClass('unread'); 2048 } 2049 2050 if (rows[uid].deleted && rows[uid].classname.indexOf('deleted')<0) 2051 { 2052 rows[uid].classname += ' deleted'; 2067 2068 if (rows[uid].deleted && !rowobj.hasClass('deleted')) 2053 2069 rowobj.addClass('deleted'); 2054 } 2055 else if (!rows[uid].deleted && rows[uid].classname.indexOf('deleted')>=0) 2056 { 2057 rows[uid].classname = rows[uid].classname.replace(/\s*deleted/, ''); 2070 else if (!rows[uid].deleted && rowobj.hasClass('deleted')) 2058 2071 rowobj.removeClass('deleted'); 2059 } 2060 2061 if (rows[uid].flagged && rows[uid].classname.indexOf('flagged')<0) 2062 { 2063 rows[uid].classname += ' flagged'; 2072 2073 if (rows[uid].flagged && !rowobj.hasClass('flagged')) 2064 2074 rowobj.addClass('flagged'); 2065 } 2066 else if (!rows[uid].flagged && rows[uid].classname.indexOf('flagged')>=0) 2067 { 2068 rows[uid].classname = rows[uid].classname.replace(/\s*flagged/, ''); 2075 else if (!rows[uid].flagged && rowobj.hasClass('flagged')) 2069 2076 rowobj.removeClass('flagged'); 2070 }2071 2077 2072 2078 this.set_unread_children(uid); … … 2156 2162 }; 2157 2163 2158 // Send a specifc request with UIDs of all selected messages2164 // Send a specifc moveto/delete request with UIDs of all selected messages 2159 2165 // @private 2160 this._with_selected_messages = function(action, lock, add_url , remove)2166 this._with_selected_messages = function(action, lock, add_url) 2161 2167 { 2162 2168 var a_uids = new Array(); 2169 var count = 0; 2163 2170 2164 2171 if (this.env.uid) … … 2167 2174 { 2168 2175 var selection = this.message_list.get_selection(); 2169 var rows = this.message_list.rows;2170 2176 var id; 2171 2177 for (var n=0; n<selection.length; n++) { 2172 2178 id = selection[n]; 2173 2179 a_uids[a_uids.length] = id; 2180 count += this.update_thread(id); 2174 2181 this.message_list.remove_row(id, (this.env.display_next && n == selection.length-1)); 2175 2182 } … … 2185 2192 if (this.env.display_next && this.env.next_uid) 2186 2193 add_url += '&_next_uid='+this.env.next_uid; 2194 2195 if (count < 0) 2196 add_url += '&_count='+(count*-1); 2197 else if (count > 0) 2198 // remove threads from the end of the list 2199 this.delete_excessive_thread_rows(); 2187 2200 2188 2201 // send request to server … … 2320 2333 var r_uids = new Array(); 2321 2334 var rows = this.message_list ? this.message_list.rows : new Array(); 2322 2335 var count = 0; 2336 2323 2337 for (var i=0; i<a_uids.length; i++) 2324 2338 { … … 2329 2343 r_uids[r_uids.length] = uid; 2330 2344 2331 if (this.env.skip_deleted) 2345 if (this.env.skip_deleted) { 2346 count += this.update_thread(uid); 2332 2347 this.message_list.remove_row(uid, (this.env.display_next && i == this.message_list.selection.length-1)); 2348 } 2333 2349 else 2334 2350 this.set_message(uid, 'deleted', true); … … 2337 2353 2338 2354 // make sure there are no selected rows 2339 if (this.env.skip_deleted && !this.env.display_next && this.message_list) 2355 if (this.env.skip_deleted && this.message_list) { 2356 if(!this.env.display_next) 2340 2357 this.message_list.clear_selection(); 2358 if (count < 0) 2359 add_url += '&_count='+(count*-1); 2360 else if (count > 0) 2361 // remove threads from the end of the list 2362 this.delete_excessive_thread_rows(); 2363 } 2341 2364 2342 2365 add_url = '&_from='+(this.env.action ? this.env.action : ''); … … 2374 2397 this.set_message(uid, 'unread', false); 2375 2398 } 2399 }; 2400 2401 2402 /*********************************************************/ 2403 /********* mailbox folders methods *********/ 2404 /*********************************************************/ 2405 2406 this.expunge_mailbox = function(mbox) 2407 { 2408 var lock = false; 2409 var add_url = ''; 2410 2411 // lock interface if it's the active mailbox 2412 if (mbox == this.env.mailbox) 2413 { 2414 lock = true; 2415 this.set_busy(true, 'loading'); 2416 add_url = '&_reload=1'; 2417 } 2418 2419 // send request to server 2420 var url = '_mbox='+urlencode(mbox); 2421 this.http_post('expunge', url+add_url, lock); 2422 }; 2423 2424 this.purge_mailbox = function(mbox) 2425 { 2426 var lock = false; 2427 var add_url = ''; 2428 2429 if (!confirm(this.get_label('purgefolderconfirm'))) 2430 return false; 2431 2432 // lock interface if it's the active mailbox 2433 if (mbox == this.env.mailbox) 2434 { 2435 lock = true; 2436 this.set_busy(true, 'loading'); 2437 add_url = '&_reload=1'; 2438 } 2439 2440 // send request to server 2441 var url = '_mbox='+urlencode(mbox); 2442 this.http_post('purge', url+add_url, lock); 2443 return true; 2444 }; 2445 2446 // test if purge command is allowed 2447 this.purge_mailbox_test = function() 2448 { 2449 return (this.env.messagecount && (this.env.mailbox == this.env.trash_mailbox || this.env.mailbox == this.env.junk_mailbox 2450 || this.env.mailbox.match('^' + RegExp.escape(this.env.trash_mailbox) + RegExp.escape(this.env.delimiter)) 2451 || this.env.mailbox.match('^' + RegExp.escape(this.env.junk_mailbox) + RegExp.escape(this.env.delimiter)))); 2376 2452 }; 2377 2453 -
branches/devel-threads/program/js/common.js
r2971 r3142 293 293 else if (typeof e == 'object') 294 294 e.event = evt; 295 295 296 296 if (this._events && this._events[evt] && !this._event_exec) { 297 297 this._event_exec = true; -
branches/devel-threads/program/js/list.js
r3136 r3142 110 110 var uid = RegExp.$1; 111 111 row.uid = uid; 112 this.rows[uid] = {uid:uid, id:row.id, obj:row , classname:row.className};112 this.rows[uid] = {uid:uid, id:row.id, obj:row}; 113 113 114 114 // set eventhandlers to table row … … 326 326 var evtarget = rcube_event.get_target(e); 327 327 var mod_key = rcube_event.get_modifier(e); 328 328 329 // Don't select this message 329 330 this.dont_select = true; 330 331 // Don't treat double click on the expando as double click on the message. 331 332 row.clicked = 0; 332 if (row.expanded) 333 {333 334 if (row.expanded) { 334 335 evtarget.className = "collapsed"; 335 336 if (mod_key == CONTROL_KEY || this.multiexpand) … … 338 339 this.collapse(row); 339 340 } 340 else 341 { 341 else { 342 342 evtarget.className = "expanded"; 343 343 if (mod_key == CONTROL_KEY || this.multiexpand) … … 355 355 var r; 356 356 357 while (new_row) 358 { 359 if (new_row.nodeType == 1) 360 { 357 while (new_row) { 358 if (new_row.nodeType == 1) { 361 359 var r = this.rows[new_row.uid]; 362 360 if (r && r.depth <= depth) … … 370 368 }, 371 369 372 373 370 expand: function(row) 374 371 { … … 376 373 var last_expanded_parent_depth; 377 374 378 if (row) 379 { 375 if (row) { 380 376 row.expanded = true; 381 377 depth = row.depth; 382 378 new_row = row.obj.nextSibling; 383 379 } 384 else 385 { 380 else { 386 381 var tbody = this.list.tBodies[0]; 387 382 new_row = tbody.firstChild; … … 390 385 } 391 386 392 while (new_row) 393 { 394 if (new_row.nodeType == 1) 395 { 387 while (new_row) { 388 if (new_row.nodeType == 1) { 396 389 var r = this.rows[new_row.uid]; 397 if (r) 398 { 399 if (row && r.depth <= depth) 390 if (r) { 391 if (row && (!r.depth || r.depth <= depth)) 400 392 break; 401 if (r.parent_uid) 402 {393 394 if (r.parent_uid) { 403 395 var p = this.rows[r.parent_uid]; 404 if (p && p.expanded) 405 { 406 if ((row && p == row) || last_expanded_parent_depth >= p.depth - 1) 407 { 396 if (p && p.expanded) { 397 if ((row && p == row) || last_expanded_parent_depth >= p.depth - 1) { 408 398 last_expanded_parent_depth = p.depth; 409 399 $(new_row).show(); … … 429 419 var r; 430 420 431 if (row) 432 { 421 if (row) { 433 422 row.expanded = false; 434 423 depth = row.depth; … … 438 427 return false; 439 428 } 440 else 441 { 429 else { 442 430 var tbody = this.list.tBodies[0]; 443 431 new_row = tbody.firstChild; … … 446 434 447 435 while (new_row) { 448 if (new_row.nodeType == 1) 449 { 436 if (new_row.nodeType == 1) { 450 437 var r = this.rows[new_row.uid]; 451 if (row && r.depth <= depth) 452 break; 453 if (row || r.depth) 454 new_row.style.display = 'none'; 455 if (r.has_children) { 456 r.expanded = false; 457 var expando = document.getElementById('rcmexpando' + r.uid); 458 if (expando) 459 expando.className = 'collapsed'; 438 if (r) { 439 if (row && (!r.depth || r.depth <= depth)) 440 break; 441 442 if (row || r.depth) 443 new_row.style.display = 'none'; 444 if (r.has_children) { 445 r.expanded = false; 446 var expando = document.getElementById('rcmexpando' + r.uid); 447 if (expando) 448 expando.className = 'collapsed'; 449 } 460 450 } 461 451 } … … 471 461 var r; 472 462 473 if (row) 474 { 463 if (row) { 475 464 row.expanded = true; 476 465 depth = row.depth; 477 466 new_row = row.obj.nextSibling; 478 467 } 479 else 480 { 468 else { 481 469 var tbody = this.list.tBodies[0]; 482 470 new_row = tbody.firstChild; … … 484 472 } 485 473 486 while (new_row) 487 { 488 if (new_row.nodeType == 1) 489 { 474 while (new_row) { 475 if (new_row.nodeType == 1) { 490 476 var r = this.rows[new_row.uid]; 491 if (row && r.depth <= depth) 492 break; 493 $(new_row).show(); 494 if (r.has_children) 495 { 496 r.expanded = true; 497 var expando = document.getElementById('rcmexpando' + r.uid); 498 if (expando) 499 expando.className = 'expanded'; 477 if (r) { 478 if (row && r.depth <= depth) 479 break; 480 481 $(new_row).show(); 482 if (r.has_children) { 483 r.expanded = true; 484 var expando = document.getElementById('rcmexpando' + r.uid); 485 if (expando) 486 expando.className = 'expanded'; 487 } 500 488 } 501 489 } -
branches/devel-threads/program/steps/mail/check_recent.inc
r3106 r3142 38 38 39 39 $OUTPUT->set_env('messagecount', $all_count); 40 $OUTPUT->set_env('pagesize', $IMAP->page_size);41 40 $OUTPUT->set_env('pagecount', ceil($all_count/$IMAP->page_size)); 42 41 $OUTPUT->command('set_unread_count', $mbox_name, $unread_count, ($mbox_name == 'INBOX')); -
branches/devel-threads/program/steps/mail/func.inc
r3137 r3142 94 94 } 95 95 96 // set current mailbox in client environment96 // set current mailbox and some other vars in client environment 97 97 $OUTPUT->set_env('mailbox', $mbox_name); 98 $OUTPUT->set_env('pagesize', $IMAP->page_size); 98 99 $OUTPUT->set_env('quota', $IMAP->get_capability('quota')); 99 100 $OUTPUT->set_env('delimiter', $IMAP->get_hierarchy_delimiter()); … … 142 143 143 144 // get message headers 144 $a_headers = $IMAP->list_headers('', '', $ sort_col, $sort_order);145 $a_headers = $IMAP->list_headers('', '', $_SESSION['sort_col'], $_SESSION['sort_order']); 145 146 146 147 // add id to message list table if not specified … … 368 369 $a_show_cols[$f] = 'to'; 369 370 370 $browser = new rcube_browser;371 372 371 $thead = $head_replace ? rcmail_message_list_head($_SESSION['list_attrib'], $a_show_cols) : NULL; 373 372 374 373 $OUTPUT->command('set_message_coltypes', $a_show_cols, $thead); 374 375 if (empty($a_headers)) 376 return; 375 377 376 378 // remove 'attachment' and 'flag' columns, we don't need them here … … 379 381 if(($key = array_search('flag', $a_show_cols)) !== FALSE) 380 382 unset($a_show_cols[$key]); 383 384 $browser = new rcube_browser; 381 385 382 386 if ($browser->ie && $replace) … … 504 508 // list options menu link 505 509 if ($col == 'subject' && !empty($attrib['optionsmenuicon'])) { 506 $list_menu = sprintf('<a href="#"><img src="%s%s" id="%s" align="absmiddle" style="%s" title="%s" alt="" /></a>', 510 $list_menu = sprintf('<a href="#" onclick="%s"><img src="%s%s" id="%s" align="absmiddle" style="%s" title="%s" alt="" /></a>', 511 'return '.JS_OBJECT_NAME.'.command(\'menu-open\', \'messagelistmenu\')', 507 512 $skin_path, 508 513 $attrib['optionsmenuicon'], -
branches/devel-threads/program/steps/mail/list.inc
r3129 r3142 83 83 84 84 // add message rows 85 rcmail_js_message_list($a_headers, FALSE, TRUE, (bool) $cols); 85 86 if (isset($a_headers) && count($a_headers)) 86 87 { 87 rcmail_js_message_list($a_headers, FALSE, TRUE, (bool) $cols);88 88 if ($search_request) 89 89 $OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $count)); -
branches/devel-threads/program/steps/mail/mark.inc
r2960 r3142 37 37 if ($flag == 'DELETED' && $CONFIG['skip_deleted'] && $_POST['_from'] != 'show') { 38 38 // count messages before changing anything 39 $old_count = $IMAP->messagecount( );39 $old_count = $IMAP->messagecount(NULL, $IMAP->threading ? 'THREADS' : 'ALL'); 40 40 $old_pages = ceil($old_count / $IMAP->page_size); 41 41 $count = sizeof(explode(',', $uids)); … … 76 76 } 77 77 78 $msg_count = $IMAP->messagecount( );78 $msg_count = $IMAP->messagecount(NULL, $IMAP->threading ? 'THREADS' : 'ALL'); 79 79 $pages = ceil($msg_count / $IMAP->page_size); 80 80 $nextpage_count = $old_count - $IMAP->page_size * $IMAP->list_page; … … 103 103 $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count)); 104 104 105 if ($IMAP->threading) 106 $count = get_input_value('_count', RCUBE_INPUT_POST); 107 105 108 // add new rows from next page (if any) 106 if ( ($jump_back || $nextpage_count > 0)) {109 if ($count && ($jump_back || $nextpage_count > 0)) { 107 110 $sort_col = isset($_SESSION['sort_col']) ? $_SESSION['sort_col'] : $CONFIG['message_sort_col']; 108 111 $sort_order = isset($_SESSION['sort_order']) ? $_SESSION['sort_order'] : $CONFIG['message_sort_order']; -
branches/devel-threads/program/steps/mail/move_del.inc
r3106 r3142 117 117 $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count)); 118 118 119 if ($IMAP->threading) 120 $count = get_input_value('_count', RCUBE_INPUT_POST); 121 119 122 // add new rows from next page (if any) 120 if ($addrows && ($jump_back || $nextpage_count > 0)) {123 if ($addrows && $count && ($jump_back || $nextpage_count > 0)) { 121 124 $sort_col = isset($_SESSION['sort_col']) ? $_SESSION['sort_col'] : $CONFIG['message_sort_col']; 122 125 $sort_order = isset($_SESSION['sort_order']) ? $_SESSION['sort_order'] : $CONFIG['message_sort_order']; 123 126 124 127 $a_headers = $IMAP->list_headers($mbox, NULL, $sort_col, $sort_order, $count); 125 if ($_SESSION['threads'])126 // TODO: count number of roots deleted and slice that many roots from the end of $a_headers127 $OUTPUT->command('message_list.clear');128 else129 $a_headers = array_slice($a_headers, -$count, $count);130 128 131 129 rcmail_js_message_list($a_headers, false, false); -
branches/devel-threads/skins/default/functions.js
r3124 r3142 126 126 this.messagemenu = $('#messagemenu'); 127 127 this.listmenu = $('#listmenu'); 128 this.add_listmenulink();129 128 } 130 129 131 130 rcube_mail_ui.prototype = { 132 133 add_listmenulink: function()134 {135 var ref = rcube_find_object('listmenulink');136 if (ref)137 ref.onclick = function () { rcmail_ui.show_listmenu() };138 },139 131 140 132 show_markmenu: function(show) … … 223 215 }, 224 216 217 listmenu_open: function(e) 218 { 219 this.show_listmenu(true); 220 }, 221 225 222 save_listmenu: function() 226 223 { … … 287 284 rcube_event.add_listener({ object:rcmail_ui, method:'body_mouseup', event:'mouseup' }); 288 285 rcube_event.add_listener({ object:rcmail_ui, method:'body_keypress', event:'keypress' }); 289 rc ube_event.add_listener({ object:rcmail_ui, method:'add_listmenulink', event:'listupdate' });290 } 286 rcmail.addEventListener('menu-open', 'listmenu_open', rcmail_ui); 287 }
Note: See TracChangeset
for help on using the changeset viewer.
