Aleksander Machniak
2015-07-31 3d0747957ea8ad1d416aca4c175b0f523d1c5a08
program/js/list.js
@@ -151,8 +151,13 @@
    this.rows[uid] = {uid:uid, id:row.id, obj:row};
    // set eventhandlers to table row (only left-button-clicks in mouseup)
    row.onmousedown = function(e){ return self.drag_row(e, this.uid); };
    row.onmouseup = function(e){ if (e.which == 1) return self.click_row(e, this.uid); };
    $(row).mousedown(function(e) { return self.drag_row(e, this.uid); })
      .mouseup(function(e) {
        if (e.which == 1 && !self.drag_active)
          return self.click_row(e, this.uid);
        else
          return true;
      });
    if (bw.touch && row.addEventListener) {
      row.addEventListener('touchstart', function(e) {
@@ -243,9 +248,10 @@
    $(window).resize(function() { me.resize(); });
    $(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');
      me.fixed_header.css({
        marginLeft: -w.scrollLeft() + 'px',
        marginTop: -w.scrollTop() + 'px'
      });
    });
  }
  else {
@@ -559,6 +565,10 @@
 */
click_row: function(e, id)
{
  // sanity check
  if (!id || !this.rows[id])
    return false;
  // don't do anything (another action processed before)
  if (!this.is_event_target(e))
    return true;