Changeset 1617 in subversion
- Timestamp:
- Jul 31, 2008 11:23:06 AM (5 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 4 edited
-
config/main.inc.php.dist (modified) (1 diff)
-
program/include/rcmail.php (modified) (1 diff)
-
program/js/app.js (modified) (10 diffs)
-
program/steps/mail/move_del.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/config/main.inc.php.dist
r1584 r1617 176 176 // the message for deletion rather than deleting it immediately. Setting this to 177 177 // false causes deleted messages to be permanantly removed if there is no Trash folder 178 $rcmail_config['flag_for_deletion'] = TRUE;178 $rcmail_config['flag_for_deletion'] = FALSE; 179 179 180 180 // Behavior if a received message requests a message delivery notification (read receipt) -
trunk/roundcubemail/program/include/rcmail.php
r1613 r1617 244 244 $this->output = new rcube_template($this->task, $framed); 245 245 246 foreach (array('flag_for_deletion' ) as $js_config_var) {246 foreach (array('flag_for_deletion','read_when_deleted') as $js_config_var) { 247 247 $this->output->set_env($js_config_var, $this->config->get($js_config_var)); 248 248 } -
trunk/roundcubemail/program/js/app.js
r1611 r1617 1283 1283 { 1284 1284 if (window.frames[this.env.contentframe].location.href.indexOf(this.env.blankpage)<0) 1285 window.frames[this.env.contentframe].location.href = this.env.blankpage;1286 }1285 window.frames[this.env.contentframe].location.href = this.env.blankpage; 1286 } 1287 1287 else if (!bw.safari) 1288 1288 frm.style.display = show ? 'block' : 'none'; … … 1507 1507 // @private 1508 1508 this._with_selected_messages = function(action, lock, add_url, remove) 1509 {1509 { 1510 1510 var a_uids = new Array(); 1511 1511 … … 1513 1513 a_uids[0] = this.env.uid; 1514 1514 else 1515 {1515 { 1516 1516 var selection = this.message_list.get_selection(); 1517 1517 var rows = this.message_list.rows; … … 1522 1522 a_uids[a_uids.length] = id; 1523 1523 1524 if (remove)1524 if (remove) 1525 1525 this.message_list.remove_row(id, (n == selection.length-1)); 1526 1526 else 1527 {1528 rows[id].deleted = true;1527 { 1528 rows[id].deleted = true; 1529 1529 1530 1530 if (rows[id].classname.indexOf('deleted')<0) 1531 {1531 { 1532 1532 rows[id].classname += ' deleted'; 1533 1533 this.set_classname(rows[id].obj, 'deleted', true); 1534 } 1534 } 1535 if (this.env.read_when_deleted) 1536 { 1537 rows[id].classname = rows[id].classname.replace(/\s*unread/, ''); 1538 this.set_classname(rows[id].obj, 'unread', false); 1539 } 1535 1540 1536 if (rows[id].icon && this.env.deletedicon)1541 if (rows[id].icon && this.env.deletedicon) 1537 1542 rows[id].icon.src = this.env.deletedicon; 1538 }1539 }1540 }1543 } 1544 } 1545 } 1541 1546 1542 1547 // also send search request to get the right messages … … 1546 1551 // send request to server 1547 1552 this.http_post(action, '_uid='+a_uids.join(',')+'&_mbox='+urlencode(this.env.mailbox)+add_url, lock); 1548 };1553 }; 1549 1554 1550 1555 … … 1575 1580 id = a_uids[n]; 1576 1581 if ((flag=='read' && this.message_list.rows[id].unread) 1577 || (flag=='unread' && !this.message_list.rows[id].unread)1578 || (flag=='delete' && !this.message_list.rows[id].deleted)1579 || (flag=='undelete' && this.message_list.rows[id].deleted)1580 || (flag=='flagged' && !this.message_list.rows[id].flagged)1581 || (flag=='unflagged' && this.message_list.rows[id].flagged))1582 {1583 r_uids[r_uids.length] = id;1584 }1582 || (flag=='unread' && !this.message_list.rows[id].unread) 1583 || (flag=='delete' && !this.message_list.rows[id].deleted) 1584 || (flag=='undelete' && this.message_list.rows[id].deleted) 1585 || (flag=='flagged' && !this.message_list.rows[id].flagged) 1586 || (flag=='unflagged' && this.message_list.rows[id].flagged)) 1587 { 1588 r_uids[r_uids.length] = id; 1589 } 1585 1590 } 1586 1591 … … 1637 1642 1638 1643 if (rows[uid].icon && icn_src 1639 && !(rows[uid].replied && this.env.repliedicon)1644 && !(rows[uid].replied && this.env.repliedicon) 1640 1645 && !(rows[uid].deleted && this.env.deletedicon)) 1641 1646 rows[uid].icon.src = icn_src; … … 1658 1663 1659 1664 if (rows[uid].replied && parent.rcmail.env.repliedicon) 1660 icn_src = parent.rcmail.env.repliedicon;1665 icn_src = parent.rcmail.env.repliedicon; 1661 1666 else if (rows[uid].deleted && parent.rcmail.env.deletedicon) 1662 icn_src = parent.rcmail.env.deletedicon;1667 icn_src = parent.rcmail.env.deletedicon; 1663 1668 else if (parent.rcmail.env.messageicon) 1664 1669 icn_src = parent.rcmail.env.messageicon; 1665 1670 1666 if (rows[uid].icon && icn_src)1671 if (rows[uid].icon && icn_src) 1667 1672 rows[uid].icon.src = icn_src; 1668 1673 } … … 1780 1785 1781 1786 if (rows[uid].classname.indexOf('deleted')<0) 1782 {1787 { 1783 1788 rows[uid].classname += ' deleted'; 1784 1789 this.set_classname(rows[uid].obj, 'deleted', true); 1785 1790 } 1786 1787 if (rows[uid].icon && this.env.deletedicon) 1791 if (this.env.read_when_deleted) 1792 { 1793 rows[uid].classname = rows[uid].classname.replace(/\s*unread/, ''); 1794 this.set_classname(rows[uid].obj, 'unread', false); 1795 } 1796 1797 if (rows[uid].icon && this.env.deletedicon) 1788 1798 rows[uid].icon.src = this.env.deletedicon; 1789 1799 1790 if (rows[uid].unread)1791 r_uids[r_uids.length] = uid;1800 if (rows[uid].unread) 1801 r_uids[r_uids.length] = uid; 1792 1802 } 1793 1803 } … … 1818 1828 { 1819 1829 rows[uid].unread = false; 1820 rows[uid].read = true;1830 rows[uid].read = true; 1821 1831 1822 1832 rows[uid].classname = rows[uid].classname.replace(/\s*unread/, ''); -
trunk/roundcubemail/program/steps/mail/move_del.inc
r1359 r1617 30 30 $moved = $IMAP->move_message($uids, $target, get_input_value('_mbox', RCUBE_INPUT_POST)); 31 31 32 if (!$moved) { 32 if ($moved) { 33 // flag old messages as read because rcube_imap will not send expunge command after moving 34 if ($CONFIG['read_when_deleted']) 35 $IMAP->set_flag($uids, 'SEEN'); 36 } 37 else { 33 38 // send error message 34 39 $OUTPUT->command('list_mailbox');
Note: See TracChangeset
for help on using the changeset viewer.
