| | |
| | | |
| | | var me = this; |
| | | $(window).resize(function(){ me.resize() }); |
| | | $(window).scroll(function(){ me.fixed_header.css({ 'marginLeft': (-$(window).scrollLeft()) + 'px' }) }); |
| | | $(window).scroll(function(){ |
| | | var w = $(window); |
| | | me.fixed_header.css('marginLeft', (-w.scrollLeft()) + 'px'); |
| | | if (!bw.webkit) |
| | | me.fixed_header.css('marginTop', (-w.scrollTop()) + 'px'); |
| | | }); |
| | | } |
| | | else { |
| | | $(this.fixed_header).find('thead').replaceWith(clone); |
| | |
| | | |
| | | // Un-focus already focused elements (#1487123, #1487316, #1488600, #1488620) |
| | | // It looks that window.focus() does the job for all browsers, but not Firefox (#1489058) |
| | | $(':focus:not(body)').blur(); |
| | | $('iframe,:focus:not(body)').blur(); |
| | | window.focus(); |
| | | |
| | | if (e || (e = window.event)) |
| | |
| | | /** |
| | | * Unselect selected row(s) |
| | | */ |
| | | clear_selection: function(id) |
| | | clear_selection: function(id, no_event) |
| | | { |
| | | var n, num_select = this.selection.length; |
| | | |
| | |
| | | this.selection = []; |
| | | } |
| | | |
| | | if (num_select && !this.selection.length) |
| | | if (num_select && !this.selection.length && !no_event) |
| | | this.triggerEvent('select'); |
| | | }, |
| | | |
| | |
| | | |
| | | if (!multiple) { |
| | | if (this.selection.length > 1 || !this.in_selection(id)) { |
| | | this.clear_selection(); |
| | | this.clear_selection(null, true); |
| | | this.selection[0] = id; |
| | | $(this.rows[id].obj).addClass('selected'); |
| | | } |
| | |
| | | |
| | | var uid = RegExp.$1, row = self.rows[uid]; |
| | | |
| | | if ($.inArray(uid, selection) > -1) |
| | | if (!row || $.inArray(uid, selection) > -1) |
| | | return; |
| | | |
| | | selection.push(uid); |