-
-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #25: Row highlight option for checkbox column
- Loading branch information
Showing
5 changed files
with
74 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/*! | ||
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2013 | ||
* @version 1.0.0 | ||
* | ||
* Client actions for yii2-grid | ||
* | ||
* Author: Kartik Visweswaran | ||
* Copyright: 2013, Kartik Visweswaran, Krajee.com | ||
* For more JQuery plugins visit http://plugins.krajee.com | ||
* For more Yii related demos visit http://demos.krajee.com | ||
*/ | ||
|
||
function selectRow($grid, css) { | ||
$grid.find(".kv-row-select input").on('change', function () { | ||
$(this).parents("tr:first").toggleClass(css); | ||
}); | ||
$grid.find(".kv-all-select input").on('change', function () { | ||
if ($(this).is(':checked')) { | ||
$grid.find(".kv-row-select").parents("tr").addClass(css); | ||
} | ||
else { | ||
$grid.find(".kv-row-select").parents("tr").removeClass(css); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/*! | ||
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2013 | ||
* @version 1.0.0 | ||
* | ||
* Tabular form script | ||
* | ||
* Author: Kartik Visweswaran | ||
* Copyright: 2013, Kartik Visweswaran, Krajee.com | ||
* For more JQuery plugins visit http://plugins.krajee.com | ||
* For more Yii related demos visit http://demos.krajee.com | ||
*/function selectRow(e,t){e.find(".kv-row-select input").on("change",function(){$(this).parents("tr:first").toggleClass(t)});e.find(".kv-all-select input").on("change",function(){if($(this).is(":checked")){e.find(".kv-row-select").parents("tr").addClass(t)}else{e.find(".kv-row-select").parents("tr").removeClass(t)}})} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters