Permalink
Browse files

feat(pager): add pager to datatable

  • Loading branch information...
VMBindraban
VMBindraban committed Jun 9, 2016
1 parent da354f8 commit ea8ae126d1026d95e57cbce60f3637df9cf5328b
@@ -15,8 +15,9 @@ System.config({
map: {
"aurelia-event-aggregator": "npm:aurelia-event-aggregator@1.0.0-beta.1.2.1",
"aurelia-framework": "npm:aurelia-framework@1.0.0-beta.1.0.5",
"aurelia-framework": "npm:aurelia-framework@1.0.0-beta.1.2.5",
"aurelia-orm": "npm:aurelia-orm@3.0.0-rc3",
"aurelia-pager": "npm:aurelia-pager@0.0.2",
"aurelia-polyfills": "npm:aurelia-polyfills@1.0.0-beta.1.1.4",
"aurelia-router": "npm:aurelia-router@1.0.0-beta.1",
"aurelia-view-manager": "npm:aurelia-view-manager@0.0.4",
@@ -42,14 +43,14 @@ System.config({
},
"github:spoonx/aurelia-api@1.1.0": {
"aurelia-fetch-client": "npm:aurelia-fetch-client@1.0.0-beta.1.2.5",
"aurelia-framework": "npm:aurelia-framework@1.0.0-beta.1.0.5",
"aurelia-framework": "npm:aurelia-framework@1.0.0-beta.1.2.5",
"extend": "npm:extend@3.0.0",
"querystring": "github:jspm/nodelibs-querystring@0.1.0"
},
"github:spoonx/aurelia-orm@1.2.0": {
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-beta.1.2.3",
"aurelia-fetch-client": "npm:aurelia-fetch-client@1.0.0-beta.1.2.5",
"aurelia-framework": "npm:aurelia-framework@1.0.0-beta.1.0.5",
"aurelia-framework": "npm:aurelia-framework@1.0.0-beta.1.2.5",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1.2.1",
"aurelia-validation": "npm:aurelia-validation@0.6.6",
"spoonx/aurelia-api": "github:spoonx/aurelia-api@1.1.0"
@@ -63,12 +64,6 @@ System.config({
"extend": "npm:extend@3.0.0",
"qs": "npm:qs@6.2.0"
},
"npm:aurelia-binding@1.0.0-beta.1.3.5": {
"aurelia-logging": "npm:aurelia-logging@1.0.0-beta.1.2.1",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1.2.1",
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.2.2",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-beta.1.2.1"
},
"npm:aurelia-binding@1.0.0-beta.1.3.6": {
"aurelia-logging": "npm:aurelia-logging@1.0.0-beta.1.2.1",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1.2.1",
@@ -86,17 +81,16 @@ System.config({
"npm:aurelia-event-aggregator@1.0.0-beta.1.2.1": {
"aurelia-logging": "npm:aurelia-logging@1.0.0-beta.1.2.1"
},
"npm:aurelia-framework@1.0.0-beta.1.0.5": {
"aurelia-binding": "npm:aurelia-binding@1.0.0-beta.1.3.5",
"npm:aurelia-framework@1.0.0-beta.1.2.5": {
"aurelia-binding": "npm:aurelia-binding@1.0.0-beta.1.3.6",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-beta.1.2.3",
"aurelia-loader": "npm:aurelia-loader@1.0.0-beta.1.2.0",
"aurelia-logging": "npm:aurelia-logging@1.0.0-beta.1.2.1",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1.2.1",
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.2.2",
"aurelia-path": "npm:aurelia-path@1.0.0-beta.1.2.2",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-beta.1.2.1",
"aurelia-templating": "npm:aurelia-templating@1.0.0-beta.1.2.6",
"core-js": "npm:core-js@1.2.6"
"aurelia-templating": "npm:aurelia-templating@1.0.0-beta.1.2.7"
},
"npm:aurelia-loader@1.0.0-beta.1.2.0": {
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1.2.1",
@@ -115,6 +109,10 @@ System.config({
"extend": "npm:extend@3.0.0",
"typer": "npm:typer@1.1.0"
},
"npm:aurelia-pager@0.0.2": {
"aurelia-framework": "npm:aurelia-framework@1.0.0-beta.1.2.5",
"aurelia-view-manager": "npm:aurelia-view-manager@0.0.4"
},
"npm:aurelia-polyfills@1.0.0-beta.1.1.4": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.2.2"
},
@@ -134,16 +132,6 @@ System.config({
"npm:aurelia-task-queue@1.0.0-beta.1.2.1": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.2.2"
},
"npm:aurelia-templating@1.0.0-beta.1.2.6": {
"aurelia-binding": "npm:aurelia-binding@1.0.0-beta.1.3.5",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-beta.1.2.3",
"aurelia-loader": "npm:aurelia-loader@1.0.0-beta.1.2.0",
"aurelia-logging": "npm:aurelia-logging@1.0.0-beta.1.2.1",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.1.2.1",
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.2.2",
"aurelia-path": "npm:aurelia-path@1.0.0-beta.1.2.2",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-beta.1.2.1"
},
"npm:aurelia-templating@1.0.0-beta.1.2.7": {
"aurelia-binding": "npm:aurelia-binding@1.0.0-beta.1.3.6",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-beta.1.2.3",

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,54 @@
<template>
<require from="../columns-filter"></require>
<!-- Search bar -->
<div if.bind="searchable !== null" class="row">
<div class="col-xs-2">
<select value.bind="defaultColumn" class="form-control" id="columnSelect">
<option model.bind="columnLabel.column" repeat.for="columnLabel of columnLabels | columnsFilter">${columnLabel.label}</option>
</select>
</div>
<div class="col-xs-10">
<input class="form-control" type="text" id="search" placeholder="search" value.bind="search" keyup.delegate="doSearch(search) & debounce:500">
</div>
</div>
<br/>
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<!-- Labels -->
<th click.delegate="doSort(columnLabel)" repeat.for="columnLabel of columnLabels">
<span if.bind="sortable === null || isObject(columnLabel.column)" t="${columnLabel.label}"></span>
<a if.bind="sortable !== null && !isObject(columnLabel.column)">${columnLabel.label} <i class="${sortingCriteria[columnLabel.column] ? (sortingCriteria[columnLabel.column] === 'desc' ? 'fa fa-caret-down' : 'fa fa-caret-up') : 'fa fa-sort'}"></i></a>
</th>
<!-- Actions -->
<th if.bind="destroy != null || update != null" t="Actions"></th>
</tr>
</thead>
<tbody>
<tr repeat.for="row of data">
<!-- Columns -->
<td repeat.for="columnLabel of columnLabels">
<a click.delegate="selected(row)">${displayValue(row, columnLabel.column)}</a>
</td>
<!-- Actions -->
<td style="white-space: nowrap; width: 1px;" if.bind="destroy !== null || update !== null">
<button if.bind="update !== null" class="btn btn-sm btn-white" click.delegate="doUpdate(row)">
<i class="fa fa-pencil"></i>
</button>
<button if.bind="destroy !== null" class="btn btn-sm btn-danger" click.delegate="doDelete(row)">
<i class="fa fa-trash"></i>
</button>
</td>
</tr>
</tbody>
</table>
<pager resource.bind="repository" criteria.bind="criteriaPager" page.bind="page" limit.bind="limit"></pager>
</template>
Oops, something went wrong.

0 comments on commit ea8ae12

Please sign in to comment.