| | |
| | | |
| | | |
| | | /** |
| | | * Invert selection |
| | | */ |
| | | invert_selection: function() |
| | | { |
| | | if (!this.rows || !this.rows.length) |
| | | return false; |
| | | |
| | | // remember old selection |
| | | var select_before = this.selection.join(','); |
| | | |
| | | for (var n in this.rows) |
| | | this.highlight_row(n, true); |
| | | |
| | | // trigger event if selection changed |
| | | if (this.selection.join(',') != select_before) |
| | | this.triggerEvent('select'); |
| | | |
| | | this.focus(); |
| | | |
| | | return true; |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * Unselect selected row(s) |
| | | */ |
| | | clear_selection: function(id) |
| | |
| | | { |
| | | var pos = rcube_event.get_mouse_pos(e); |
| | | this.draglayer.css({ left:(pos.x+20)+'px', top:(pos.y-5 + (bw.ie ? document.documentElement.scrollTop : 0))+'px' }); |
| | | this.triggerEvent('dragmove', e); |
| | | this.triggerEvent('dragmove', e?e:window.event); |
| | | } |
| | | |
| | | this.drag_start = false; |