Commit dab2b03f by Alexander Makarov

Fixes #5863: Selecting all individual `yii\grid\CheckboxColumn` checkboxes in…

Fixes #5863: Selecting all individual `yii\grid\CheckboxColumn` checkboxes in grid view wasn't resulting in "all" checkbox selected
parent 6dce8919
......@@ -20,6 +20,7 @@ Yii Framework 2 Change Log
- Bug #5768: When setting `data-confirm` attribute to a submit button, clicking on the button would not trigger form submission (qiangxue)
- Bug #5780: `QueryBuilder::batchInsert()` may cause "undefined index" error (qiangxue)
- Bug #5833: The `message` command fails with a FK constraint error when trying to update messages (qiangxue)
- Bug #5863: Selecting all individual `yii\grid\CheckboxColumn` checkboxes in grid view wasn't resulting in "all" checkbox selected (samdark)
- Bug #5893: `yii\helpers\ArrayHelper::toArray()` now applies `$properties` parameter for converting descending objects in recursive calls (otsec)
- Bug #5925: `ArrayHelper::htmlEncode()` does not work properly when the value being encoded is a nested array (tebazil)
- Bug: Gii console command help information does not contain global options (qiangxue)
......
......@@ -122,8 +122,9 @@
if (!options.multiple) {
return;
}
var inputs = "#" + id + " input[name='" + options.checkAll + "']";
$(document).off('click.yiiGridView', inputs).on('click.yiiGridView', inputs, function () {
var checkAll = "#" + id + " input[name='" + options.checkAll + "']";
var inputs = "#" + id + " input[name='" + options.name + "']";
$(document).off('click.yiiGridView', checkAll).on('click.yiiGridView', checkAll, function () {
$grid.find("input[name='" + options.name + "']:enabled").prop('checked', this.checked);
});
$(document).off('click.yiiGridView', inputs + ":enabled").on('click.yiiGridView', inputs + ":enabled", function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment