Permalink
Browse files

Added an option to turn off row selection inspired by

  • Loading branch information...
bjorkegeek committed Jul 11, 2012
1 parent 54b9446 commit 57521b07feadab0e62335c3f04cd5b3d8211ecff
Showing with 13 additions and 2 deletions.
  1. +5 −1 js/flexigrid.js
  2. +8 −1 js/flexigrid.pack.js
View
@@ -52,7 +52,8 @@
onChangeSort: false,
onSuccess: false,
onError: false,
- onSubmit: false //using a custom populate function
+ onSubmit: false, //using a custom populate function
+ disableSelect: false //disables row selection
}, p);
$(t).show() //show if hidden
.attr({
@@ -683,6 +684,7 @@
addRowProp: function () {
$('tbody tr', g.bDiv).each(function () {
$(this).click(function (e) {
+ if (p.disableSelect) return true;
var obj = (e.target || e.srcElement);
if (obj.href || obj.type) return true;
$(this).toggleClass('trSelected');
@@ -691,6 +693,7 @@
$(this).toggleClass('trSelected');
}
}).mousedown(function (e) {
+ if (p.disableSelect) return true;
if (e.shiftKey) {
$(this).toggleClass('trSelected');
g.multisel = true;
@@ -704,6 +707,7 @@
this.focus();
}
}).mouseup(function () {
+ if (p.disableSelect) return true;
if (g.multisel && ! e.ctrlKey) {
g.multisel = false;
$(g.gDiv).noSelect(false);
Oops, something went wrong.

1 comment on commit 57521b0

@bjorkegeek

This comment has been minimized.

Show comment
Hide comment
@bjorkegeek

bjorkegeek Jul 11, 2012

Owner

Generated flexigrid.pack.js using UglifyJS, couldn't find which minifier was originally used.

Owner

bjorkegeek commented on 57521b0 Jul 11, 2012

Generated flexigrid.pack.js using UglifyJS, couldn't find which minifier was originally used.

Please sign in to comment.