Changeset 1819 in subversion
- Timestamp:
- Sep 18, 2008 6:14:16 AM (5 years ago)
- Location:
- trunk/roundcubemail/program
- Files:
-
- 3 edited
-
js/app.js (modified) (1 diff)
-
js/list.js (modified) (3 diffs)
-
steps/mail/check_recent.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/js/app.js
r1813 r1819 3560 3560 3561 3561 this.message_list.insert_row(row, attop); 3562 3563 // remove 'old' row 3564 if (attop && this.env.pagesize && this.message_list.rowcount > this.env.pagesize) 3565 { 3566 var uid = this.message_list.get_last_row(); 3567 this.message_list.remove_row(uid); 3568 this.message_list.clear_selection(uid); 3569 } 3562 3570 }; 3563 3571 -
trunk/roundcubemail/program/js/list.js
r1763 r1819 291 291 292 292 /** 293 * get next and previousrows that are not hidden293 * get next/previous/last rows that are not hidden 294 294 */ 295 295 get_next_row: function() … … 319 319 }, 320 320 321 322 // selects or unselects the proper row depending on the modifier key pressed 321 get_last_row: function() 322 { 323 if (this.rowcount) 324 { 325 var rows = this.list.tBodies[0].rows; 326 327 for(var i=rows.length-1; i>=0; i--) 328 if(rows[i].id && String(rows[i].id).match(/rcmrow([a-z0-9\-_=]+)/i) && this.rows[RegExp.$1] != null) 329 return RegExp.$1; 330 } 331 332 return null; 333 }, 334 335 336 /** 337 * selects or unselects the proper row depending on the modifier key pressed 338 */ 323 339 select_row: function(id, mod_key, with_mouse) 324 340 { … … 483 499 484 500 /** 485 * Unselect all selected rows486 */ 487 clear_selection: function( )501 * Unselect selected row(s) 502 */ 503 clear_selection: function(id) 488 504 { 489 505 var num_select = this.selection.length; 490 for (var n=0; n<this.selection.length; n++) 491 if (this.rows[this.selection[n]]) 492 { 493 this.set_classname(this.rows[this.selection[n]].obj, 'selected', false); 494 this.set_classname(this.rows[this.selection[n]].obj, 'unfocused', false); 495 } 496 497 this.selection = new Array(); 498 499 if (num_select) 506 507 // one row 508 if (id) 509 { 510 for (var n=0; n<this.selection.length; n++) 511 if (this.selection[n] == id) 512 { 513 this.selection.splice(n,1); 514 break; 515 } 516 } 517 // all rows 518 else 519 { 520 for (var n=0; n<this.selection.length; n++) 521 if (this.rows[this.selection[n]]) 522 { 523 this.set_classname(this.rows[this.selection[n]].obj, 'selected', false); 524 this.set_classname(this.rows[this.selection[n]].obj, 'unfocused', false); 525 } 526 527 this.selection = new Array(); 528 } 529 530 if (num_select && !this.selection.length) 500 531 this.trigger_event('select'); 501 532 }, -
trunk/roundcubemail/program/steps/mail/check_recent.inc
r1285 r1819 36 36 37 37 $OUTPUT->set_env('messagecount', $IMAP->messagecount()); 38 $OUTPUT->set_env('pagesize', $IMAP->page_size); 39 $OUTPUT->set_env('pagecount', ceil($IMAP->messagecount()/$IMAP->page_size)); 38 40 $OUTPUT->command('set_unread_count', $mbox_name, $unread_count, ($mbox_name == 'INBOX')); 39 41 $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text());
Note: See TracChangeset
for help on using the changeset viewer.
