Skip to content

Commit 0c213f3

Browse files
authored
Merge pull request #122 from mayur-ownerrez/master
Don't Select Disabled
2 parents fc68024 + 799cf2d commit 0c213f3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Griddly.NetCore.Razor/wwwroot/js/griddly.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1087,10 +1087,10 @@
10871087

10881088
$(this.$element).on("click", "thead tr.columnHeaders th.select", $.proxy(function (event)
10891089
{
1090-
if (this.$element.find("input[name=_rowselect]:not(:checked)").length == 0)
1091-
this.$element.find("input[name=_rowselect]").prop("checked", false).each(function () { setRowSelect($(this), true); });
1090+
if (this.$element.find("input[name=_rowselect]:not(:checked):not(:disabled)").length == 0)
1091+
this.$element.find("input[name=_rowselect]:not(:disabled)").prop("checked", false).each(function () { setRowSelect($(this), true); });
10921092
else
1093-
this.$element.find("input[name=_rowselect]").prop("checked", true).each(function () { setRowSelect($(this), true); });
1093+
this.$element.find("input[name=_rowselect]:not(:disabled)").prop("checked", true).each(function () { setRowSelect($(this), true); });
10941094

10951095
onRowChange();
10961096
}, this));

Griddly/Scripts/griddly.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1087,10 +1087,10 @@
10871087

10881088
$(this.$element).on("click", "thead tr.columnHeaders th.select", $.proxy(function (event)
10891089
{
1090-
if (this.$element.find("input[name=_rowselect]:not(:checked)").length == 0)
1091-
this.$element.find("input[name=_rowselect]").prop("checked", false).each(function () { setRowSelect($(this), true); });
1090+
if (this.$element.find("input[name=_rowselect]:not(:checked):not(:disabled)").length == 0)
1091+
this.$element.find("input[name=_rowselect]:not(:disabled)").prop("checked", false).each(function () { setRowSelect($(this), true); });
10921092
else
1093-
this.$element.find("input[name=_rowselect]").prop("checked", true).each(function () { setRowSelect($(this), true); });
1093+
this.$element.find("input[name=_rowselect]:not(:disabled)").prop("checked", true).each(function () { setRowSelect($(this), true); });
10941094

10951095
onRowChange();
10961096
}, this));

0 commit comments

Comments
 (0)