Skip to content

Commit

Permalink
firstPage() and lastPage() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Hector Romero committed Nov 4, 2016
1 parent 5b48a54 commit 5d4a4b5
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 10 deletions.
4 changes: 2 additions & 2 deletions dist/amd/au-table-pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ul class="pagination">

<li class-name.bind="currentPage === 1 ? 'disabled' : ''" if.bind="boundaryLinks">
<a aria-label="Previous" click.delegate="selectPage(1)">
<a aria-label="Previous" click.delegate="firstPage()">
<span aria-hidden="true" innerhtml.bind="firstText"></span>
</a>
</li>
Expand All @@ -26,7 +26,7 @@
</li>

<li class-name.bind="currentPage === totalPages ? 'disabled' : ''" if.bind="boundaryLinks">
<a aria-label="Previous" click.delegate="selectPage(totalPages)">
<a aria-label="Previous" click.delegate="lastPage()">
<span aria-hidden="true" innerhtml.bind="lastText"></span>
</a>
</li>
Expand Down
8 changes: 8 additions & 0 deletions dist/amd/au-table-pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ define(['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
}
};

AutPaginationCustomElement.prototype.firstPage = function firstPage() {
this.currentPage = 1;
};

AutPaginationCustomElement.prototype.lastPage = function lastPage() {
this.currentPage = this.totalPages;
};

return AutPaginationCustomElement;
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'currentPage', [_dec], {
enumerable: true,
Expand Down
4 changes: 2 additions & 2 deletions dist/commonjs/au-table-pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ul class="pagination">

<li class-name.bind="currentPage === 1 ? 'disabled' : ''" if.bind="boundaryLinks">
<a aria-label="Previous" click.delegate="selectPage(1)">
<a aria-label="Previous" click.delegate="firstPage()">
<span aria-hidden="true" innerhtml.bind="firstText"></span>
</a>
</li>
Expand All @@ -26,7 +26,7 @@
</li>

<li class-name.bind="currentPage === totalPages ? 'disabled' : ''" if.bind="boundaryLinks">
<a aria-label="Previous" click.delegate="selectPage(totalPages)">
<a aria-label="Previous" click.delegate="lastPage()">
<span aria-hidden="true" innerhtml.bind="lastText"></span>
</a>
</li>
Expand Down
8 changes: 8 additions & 0 deletions dist/commonjs/au-table-pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ var AutPaginationCustomElement = exports.AutPaginationCustomElement = (_dec = (0
}
};

AutPaginationCustomElement.prototype.firstPage = function firstPage() {
this.currentPage = 1;
};

AutPaginationCustomElement.prototype.lastPage = function lastPage() {
this.currentPage = this.totalPages;
};

return AutPaginationCustomElement;
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'currentPage', [_dec], {
enumerable: true,
Expand Down
4 changes: 2 additions & 2 deletions dist/es2015/au-table-pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ul class="pagination">

<li class-name.bind="currentPage === 1 ? 'disabled' : ''" if.bind="boundaryLinks">
<a aria-label="Previous" click.delegate="selectPage(1)">
<a aria-label="Previous" click.delegate="firstPage()">
<span aria-hidden="true" innerhtml.bind="firstText"></span>
</a>
</li>
Expand All @@ -26,7 +26,7 @@
</li>

<li class-name.bind="currentPage === totalPages ? 'disabled' : ''" if.bind="boundaryLinks">
<a aria-label="Previous" click.delegate="selectPage(totalPages)">
<a aria-label="Previous" click.delegate="lastPage()">
<span aria-hidden="true" innerhtml.bind="lastText"></span>
</a>
</li>
Expand Down
8 changes: 8 additions & 0 deletions dist/es2015/au-table-pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ export let AutPaginationCustomElement = (_dec = bindable({defaultBindingMode: bi
this.currentPage--;
}
}

firstPage() {
this.currentPage = 1;
}

lastPage() {
this.currentPage = this.totalPages;
}
}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'currentPage', [_dec], {
enumerable: true,
initializer: null
Expand Down
4 changes: 2 additions & 2 deletions dist/system/au-table-pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ul class="pagination">

<li class-name.bind="currentPage === 1 ? 'disabled' : ''" if.bind="boundaryLinks">
<a aria-label="Previous" click.delegate="selectPage(1)">
<a aria-label="Previous" click.delegate="firstPage()">
<span aria-hidden="true" innerhtml.bind="firstText"></span>
</a>
</li>
Expand All @@ -26,7 +26,7 @@
</li>

<li class-name.bind="currentPage === totalPages ? 'disabled' : ''" if.bind="boundaryLinks">
<a aria-label="Previous" click.delegate="selectPage(totalPages)">
<a aria-label="Previous" click.delegate="lastPage()">
<span aria-hidden="true" innerhtml.bind="lastText"></span>
</a>
</li>
Expand Down
8 changes: 8 additions & 0 deletions dist/system/au-table-pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,14 @@ System.register(['aurelia-framework'], function (_export, _context) {
}
};

AutPaginationCustomElement.prototype.firstPage = function firstPage() {
this.currentPage = 1;
};

AutPaginationCustomElement.prototype.lastPage = function lastPage() {
this.currentPage = this.totalPages;
};

return AutPaginationCustomElement;
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'currentPage', [_dec], {
enumerable: true,
Expand Down
4 changes: 2 additions & 2 deletions src/au-table-pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ul class="pagination">

<li class-name.bind="currentPage === 1 ? 'disabled' : ''" if.bind="boundaryLinks">
<a aria-label="Previous" click.delegate="selectPage(1)">
<a aria-label="Previous" click.delegate="firstPage()">
<span aria-hidden="true" innerhtml.bind="firstText"></span>
</a>
</li>
Expand All @@ -26,7 +26,7 @@
</li>

<li class-name.bind="currentPage === totalPages ? 'disabled' : ''" if.bind="boundaryLinks">
<a aria-label="Previous" click.delegate="selectPage(totalPages)">
<a aria-label="Previous" click.delegate="lastPage()">
<span aria-hidden="true" innerhtml.bind="lastText"></span>
</a>
</li>
Expand Down
8 changes: 8 additions & 0 deletions src/au-table-pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,12 @@ export class AutPaginationCustomElement {
this.currentPage--;
}
}

firstPage() {
this.currentPage = 1;
}

lastPage() {
this.currentPage = this.totalPages;
}
}

0 comments on commit 5d4a4b5

Please sign in to comment.