Changeset 84a3312 in github
- Timestamp:
- Mar 24, 2010 5:47:45 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- b488c1d
- Parents:
- 5799531
- Location:
- program/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
program/js/app.js
r519aeda r84a3312 2204 2204 // delete selected messages from the current mailbox 2205 2205 this.delete_messages = function() 2206 {2207 var selection = this.message_list ? this.message_list.get_selection() : new Array();2206 { 2207 var selection = this.message_list ? $.merge([], this.message_list.get_selection()) : new Array(); 2208 2208 2209 2209 // exit if no mailbox specified or if selection is empty 2210 2210 if (!this.env.uid && !selection.length) 2211 2211 return; 2212 2212 2213 // also select childs of collapsed rows 2214 for (var uid, i=0; i < selection.length; i++) { 2215 uid = selection[i]; 2216 if (this.message_list.rows[uid].has_children && !this.message_list.rows[uid].expanded) 2217 this.message_list.select_childs(uid); 2218 } 2219 2213 2220 // if config is set to flag for deletion 2214 2221 if (this.env.flag_for_deletion) { 2215 2222 this.mark_message('delete'); 2216 2223 return false; 2217 }2224 } 2218 2225 // if there isn't a defined trash mailbox or we are in it 2219 2226 else if (!this.env.trash_mailbox || this.env.mailbox == this.env.trash_mailbox) … … 2222 2229 else { 2223 2230 // if shift was pressed delete it immediately 2224 if (this.message_list && this.message_list.shiftkey) 2225 { 2231 if (this.message_list && this.message_list.shiftkey) { 2226 2232 if (confirm(this.get_label('deletemessagesconfirm'))) 2227 2233 this.permanently_remove_messages(); 2228 }2234 } 2229 2235 else 2230 2236 this.move_messages(this.env.trash_mailbox); 2231 }2237 } 2232 2238 2233 2239 return true; … … 2261 2267 id = selection[n]; 2262 2268 a_uids[a_uids.length] = id; 2263 count += this.update_thread(id);2269 count += this.update_thread(id); 2264 2270 this.message_list.remove_row(id, (this.env.display_next && n == selection.length-1)); 2265 2271 } -
program/js/list.js
r258dbd0 r84a3312 659 659 }, 660 660 661 /** 662 * Add all childs of the given row to selection 663 */ 664 select_childs: function(uid) 665 { 666 if (!this.rows[uid] || !this.rows[uid].has_children) 667 return; 668 669 var depth = this.rows[uid].depth; 670 var row = this.rows[uid].obj.nextSibling; 671 while (row) { 672 if (row.nodeType == 1) { 673 if ((r = this.rows[row.uid])) { 674 if (!r.depth || r.depth <= depth) 675 break; 676 if (!this.in_selection(r.uid)) 677 this.select_row(r.uid, CONTROL_KEY); 678 } 679 } 680 row = row.nextSibling; 681 } 682 }, 683 661 684 662 685 /** … … 1014 1037 for (var n=0; n < selection.length; n++) { 1015 1038 uid = selection[n]; 1016 if (this.rows[uid].has_children /*&& !this.rows[uid].expanded*/) { 1017 depth = this.rows[uid].depth; 1018 row = this.rows[uid].obj.nextSibling; 1019 while (row) { 1020 if (row.nodeType == 1) { 1021 if ((r = this.rows[row.uid])) { 1022 if (!r.depth || r.depth <= depth) 1023 break; 1024 if (!this.in_selection(r.uid)) 1025 this.select_row(r.uid, CONTROL_KEY); 1026 } 1027 } 1028 row = row.nextSibling; 1029 } 1030 } 1039 if (this.rows[uid].has_children && !this.rows[uid].expanded) 1040 this.select_childs(uid); 1031 1041 } 1032 1042
Note: See TracChangeset
for help on using the changeset viewer.
