Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
feat(project): translate columns, search and actions
Browse files Browse the repository at this point in the history
  • Loading branch information
VMBindraban committed Jun 21, 2016
1 parent aff38cc commit e9f668b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/bootstrap/datatable.html
Expand Up @@ -4,10 +4,12 @@
<!-- Search bar -->
<div if.bind="searchable !== null" class="row">
<div class="col-xs-2">
<select value.bind="searchColumn" class="form-control" id="columnSelect" title="Search">
<option model.bind="columnLabel.column" repeat.for="columnLabel of columnLabels | columnsFilter">
${columnLabel.label}
</option>
<select value.bind="searchColumn" class="form-control" id="columnSelect">
<option
model.bind="columnLabel.column"
repeat.for="columnLabel of columnLabels | columnsFilter"
t="${columnLabel.label}"
></option>
</select>
</div>

Expand All @@ -16,7 +18,7 @@
class="form-control"
type="text"
id="search"
placeholder="search"
t="[placeholder]Search"

This comment has been minimized.

Copy link
@doktordirk

doktordirk Jun 22, 2016

Contributor

that makes i18n a dependecy, which currently it isn.t. shouldn.t the other line stay?

This comment has been minimized.

Copy link
@VMBindraban

VMBindraban Jun 22, 2016

Member

Good point. I will first check if the i18n placeholder overrides the default placeholder.

value.bind="search"
keyup.delegate="doSearch() & debounce:500">
</div>
Expand All @@ -29,11 +31,11 @@
<!-- Labels -->
<th click.delegate="doSort(columnLabel)" repeat.for="columnLabel of columnLabels">
<!-- Just show the label -->
<span if.bind="sortable === null || columnLabel.nested" t="${columnLabel.label}">${columnLabel.label}</span>
<span if.bind="sortable === null || columnLabel.nested" t="${columnLabel.label}"></span>

<!-- Show label and make it sortable (click) -->
<a if.bind="sortable !== null && !columnLabel.nested">
${columnLabel.label}
<span t="${columnLabel.label}"></span>
<i class="fa fa-${criteria.sort[columnLabel.column] ? (criteria.sort[columnLabel.column] === 'desc' ? 'caret-down' : 'caret-up') : 'sort'}">
</i>
</a>
Expand Down

0 comments on commit e9f668b

Please sign in to comment.