OVH checkbox table
Example
angular.module("app", ["ovh-angular-checkbox-table"]);
<table class="table table-pretty table-hover table-striped">
<thead>
<tr>
<th class="text-center" style="width: 35px;">
<input type="checkbox"
data-ovh-checkbox-table
data-ovh-checkbox-table-ids-all="table.myAllIds_canBeFiltered"
data-ovh-checkbox-table-ids-page="table.myIdsOnCurrentPage"
data-ovh-checkbox-table-ids-selected="table.myIdsSelectedByCheckbox"
data-ovh-checkbox-table-id="id" />
</th>
<th>
name
</th>
</tr>
</thead>
<tbody data-ng-hide="table.myAllIds_CAN_NOT_BE_Filtered">
<tr data-ng-repeat="myData in table.myIdsOnCurrentPage">
<td>
<input type="checkbox" data-ng-model="table.myIdsSelectedByCheckbox[myData.id]"
name="{{::'prefix_' + myData.id}}" id="{{::'prefix_' + myData.id}}">
</td>
<td data-title="name" class="word-break">
<label for="{{::'prefix_' + myData.id}}"
data-ng-bind="::myData.name">
</label>
</td>
</tr>
</tbody>
</table>
Installation
Bower
bower install --save ovh-angular-checkbox-table
NPM
npm install --save ovh-angular-checkbox-table
Get the sources
git clone https://github.com/ovh-ux/ovh-angular-checkbox-table.git
cd ovh-angular-checkbox-table
npm install && bower install
You've developed a new cool feature ? Fixed an annoying bug ? We'd be happy
to hear from you !
Have a look in CONTRIBUTING.md
Run the tests
npm test
Please note :
-
ovh-checkbox-table : directive
-
ovh-checkbox-table-ids-all="table.myAllIds_canBeFiltered" : array (string, int UNIQUE) of ids. Can be filtred
-
ovh-checkbox-table-ids-page="table.myIdsOnCurrentPage" : array (object) ids detail
-
ovh-checkbox-table-ids-selected="table.myIdsSelectedByCheckbox" : array (object<id, true>) of selected line by checkbox
-
ovh-checkbox-table-id="id" : (string) unique key of ids detail
-
data-ng-model="table.myIdsSelectedByCheckbox[myData.id]"
Related links
License
See https://github.com/ovh-ux/ovh-angular-q-allSettled/blob/master/LICENSE