Upgrade to PSR12 coding standard (#20121)

This commit is contained in:
Razvan Grigore
2024-03-19 16:21:27 +02:00
committed by GitHub
parent b0aa6ab852
commit e2a167028b
521 changed files with 1055 additions and 2409 deletions

View File

@ -198,7 +198,7 @@
$grid.find(checkAllInput + (all ? ":not(:checked)" : ":checked")).prop('checked', all).change();
};
initEventHandler($grid, 'checkRow', 'click.yiiGridView', "#" + id + " " + inputs, handler);
if($grid.find(inputs).length) {
if ($grid.find(inputs).length) {
handler(); // Ensure "check all" checkbox is checked on page load if all data row checkboxes are initially checked.
}
},
@ -245,7 +245,8 @@
* @param {string} selector jQuery selector
* @param {function} callback The actual function to be executed with this event
*/
function initEventHandler($gridView, type, event, selector, callback) {
function initEventHandler($gridView, type, event, selector, callback)
{
var id = $gridView.attr('id');
var prevHandler = gridEventHandlers[id];
if (prevHandler !== undefined && prevHandler[type] !== undefined) {