#17843 Made check-all feature work if there are mulitple instances of it in one page

This commit is contained in:
NogginBox
2013-08-07 11:58:49 +01:00
committed by Sebastien Ros
parent 1f9f39e8ba
commit 725fc84ccd
12 changed files with 13 additions and 13 deletions

View File

@@ -51,7 +51,7 @@
<table class="items">
<thead>
<tr>
<th scope="col" class="checkbox"><input type="checkbox" id="checkAll"/></th>
<th scope="col" class="checkbox"><input type="checkbox" class="check-all"/></th>
<th scope="col">@T("Alias")</th>
<th scope="col">@T("Route")</th>
<th scope="col">&nbsp;</th>

View File

@@ -52,7 +52,7 @@
</colgroup>
<thead>
<tr>
<th scope="col"><input type="checkbox" id="checkAll"/></th>
<th scope="col"><input type="checkbox" class="check-all"/></th>
<th scope="col">@T("Status")</th>
<th scope="col">@T("Author")</th>
<th scope="col">@T("Comment")</th>

View File

@@ -44,7 +44,7 @@
</colgroup>
<thead>
<tr>
<th scope="col"><input type="checkbox" id="checkAll"/></th>
<th scope="col"><input type="checkbox" class="check-all"/></th>
<th scope="col">@T("Status")</th>
<th scope="col">@T("Author")</th>
<th scope="col">@T("Comment")</th>

View File

@@ -46,7 +46,7 @@
<table class="items">
<thead>
<tr>
<th scope="col"><input type="checkbox" id="checkAll"/></th>
<th scope="col"><input type="checkbox" class="check-all"/></th>
<th scope="col">@T("Title")</th>
<th scope="col">@T("Content Type")</th>
<th scope="col">&nbsp;</th>

View File

@@ -26,7 +26,7 @@
</colgroup>
<thead>
<tr>
<th scope="col"><input type="checkbox" id="checkAll"/></th>
<th scope="col"><input type="checkbox" class="check-all"/></th>
<th scope="col">@T("Name")</th>
<th scope="col"></th>
</tr>

View File

@@ -48,7 +48,7 @@
<table class="items">
<thead>
<tr>
<th scope="col"><input type="checkbox" id="checkAll"/></th>
<th scope="col"><input type="checkbox" class="check-all"/></th>
<th scope="col">@T("Name")</th>
<th scope="col">@T("Creation")</th>
<th scope="col">&nbsp;</th>

View File

@@ -28,7 +28,7 @@
<col id="Edit" />
</colgroup>
<thead>
<th scope="col"><input type="checkbox" id="checkAll"/></th>
<th scope="col"><input type="checkbox" class="check-all"/></th>
<th scope="col">@T("Name")</th>
<th scope="col"></th>
</thead>

View File

@@ -24,7 +24,7 @@
</colgroup>
<thead>
<tr>
<th scope="col"><input type="checkbox" id="checkAll"/></th>
<th scope="col"><input type="checkbox" class="check-all"/></th>
<th scope="col">@T("Name")</th>
<th scope="col"></th>
</tr>

View File

@@ -44,7 +44,7 @@
<table class="items">
<thead>
<tr>
<th scope="col"><input type="checkbox" id="checkAll"/></th>
<th scope="col"><input type="checkbox" class="check-all"/></th>
<th scope="col">@T("Name")</th>
<th scope="col">@T("Email")</th>
<th scope="col">@T("Actions")</th>

View File

@@ -43,7 +43,7 @@
<table class="items">
<thead>
<tr>
<th scope="col" class="checkbox"><input type="checkbox" id="checkAll"/></th>
<th scope="col" class="checkbox"><input type="checkbox" class="check-all"/></th>
<th scope="col">@T("Name")</th>
<th scope="col">&nbsp;</th>
<th scope="col" class="actions">&nbsp;</th>

View File

@@ -7,7 +7,7 @@
<table class="items">
<thead>
<tr>
<th scope="col" class="checkbox"><input type="checkbox" id="checkAll"/></th>
<th scope="col" class="checkbox"><input type="checkbox" class="check-all"/></th>
<th scope="col">@T("Worfklow Definition")</th>
<th scope="col">Blocking activities</th>
<th scope="col" class="actions">&nbsp;</th>

View File

@@ -71,8 +71,8 @@
return confirm(confirmRemoveMessage);
});
$("#checkAll").change(function () {
$("table.items :checkbox").prop('checked', $(this).prop("checked"));
$(".check-all").change(function () {
$(this).parents("table.items").find(":checkbox").prop('checked', $(this).prop("checked"));
});
})(jQuery);