Skip to content

Commit

Permalink
fix(RTL): Put filter cancel on left for RTL
Browse files Browse the repository at this point in the history
Filter cancel button was on the right in RTL grids, overlaying text.

Fixes #2058
  • Loading branch information
c0bra committed Nov 14, 2014
1 parent 1aa6727 commit 0885e50
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/less/header.less
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
bottom: 0;
right: 0;

[class^="ui-grid-icon"].right {
[class^="ui-grid-icon"] {
position: absolute;
top: 50%;
line-height: 32px;
Expand All @@ -158,6 +158,17 @@
}
}

// Position filter-cancel button on the left for rtl grids
.ui-grid[dir="rtl"] .ui-grid-filter-container .ui-grid-filter-button {
right: initial;
left: 0;

[class^="ui-grid-icon"].right {
right: initial;
left: 10px;
}
}

input[type="text"].ui-grid-filter-input {
padding: 0;
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/templates/ui-grid/uiGridHeaderCell.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<input type="text" class="ui-grid-filter-input" ng-model="colFilter.term" ng-click="$event.stopPropagation()" ng-attr-placeholder="{{colFilter.placeholder || ''}}" />

<div class="ui-grid-filter-button" ng-click="colFilter.term = null">
<i class="ui-grid-icon-cancel right" ng-show="!!colFilter.term">&nbsp;</i> <!-- use !! because angular interprets 'f' as false -->
<i class="ui-grid-icon-cancel" ng-show="!!colFilter.term">&nbsp;</i> <!-- use !! because angular interprets 'f' as false -->
</div>
</div>
</div>

0 comments on commit 0885e50

Please sign in to comment.