Skip to content

Commit e6b80c4

Browse files
add more ellipsis for pillbox
1 parent d96f7a6 commit e6b80c4

File tree

4 files changed

+9
-34
lines changed

4 files changed

+9
-34
lines changed

client/less/ui/text.less

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ small {
7878
.name {
7979
display: block;
8080
color: @grey-1;
81-
padding: .2rem 1.5rem;
81+
padding: 0 1.5rem;
8282
text-transform: uppercase;
8383
font-weight: 400;
8484
line-height: 1.9;
@@ -95,11 +95,15 @@ small {
9595
.delete-pill {
9696
position: absolute;
9797
top: 50%;
98-
right: 0;
99-
margin-top: -1.5rem;
100-
height: 3rem;
98+
right: .1rem;
99+
margin-top: -1.2rem;
100+
height: 2.4rem;
101101
cursor: pointer;
102102
display: inline-block;
103+
104+
.ui-icon {
105+
width: 2.4rem;
106+
}
103107
}
104108
}
105109
}

client/www/scripts/modules/styleguide/styleguide.directives.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ Styleguide.directive('slStyleguideModuleText', [
3333
$scope.pills1 = ['Pill 1', 'Pill 2', 'Pill 3'];
3434
$scope.pills2 = ['Pill 1', 'Pill 2', 'Pill 3'];
3535
$scope.pills3 = ['Pill 1', 'Pill 2', 'Pill 3'];
36-
$scope.pills4 = ['Pill 1', 'Pill 2', 'Pill 3'];
37-
$scope.pills5 = ['Pill 1', 'Pill 2', 'Pill 3'];
3836
$scope.clickedCrumb = null;
3937
$scope.activeTab = null;
4038

@@ -53,12 +51,6 @@ Styleguide.directive('slStyleguideModuleText', [
5351
$scope.onClickCrumb = function(i, crumb, len){
5452
$scope.clickedCrumb = crumb;
5553
};
56-
57-
$scope.deletePill = function(pill){
58-
var idx = _.findIndex($scope.pills4, pill);
59-
60-
$scope.pills4.splice(idx, 1);
61-
};
6254
}
6355
};
6456
}

client/www/scripts/modules/styleguide/templates/styleguide.module.text.html

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ <h5>Close link</h5>
6565
<a href="javascript:void(0)" class="ui-close">x</a>
6666
</li>
6767
<li>
68-
6968
<h5>Pillbox directive (with delete icon)</h5>
7069
<sl-ui-pillbox list="pills1" has-delete="true"></sl-ui-pillbox>
7170

@@ -74,22 +73,6 @@ <h5>Pillbox directive (with more elipsis)</h5>
7473

7574
<h5>Pillbox directive (read only)</h5>
7675
<sl-ui-pillbox list="pills3"></sl-ui-pillbox>
77-
78-
<h5>Pillbox manual implementation (with delete icon)</h5>
79-
<div class="pillbox">
80-
<div ng-repeat="pill in pills4" class="pill has-delete">
81-
<span class="name">{{pill}}</span>
82-
<span class="delete-pill" ng-click="deletePill(pill)">
83-
<ui-icon name="circle-x" classes="dark-circle-x"></ui-icon>
84-
</span>
85-
</div>
86-
</div>
87-
<h5>Pillbox manual implementation</h5>
88-
<div class="pillbox">
89-
<div ng-repeat="pill in pills5" class="pill">
90-
<span class="name">{{pill}}</span>
91-
</div>
92-
</div>
9376
</li>
9477
<li>
9578
<h4 class="module-subheading">SVG Icons (.small, .medium, .large)</h4>
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
<span class="pillbox {{classes}}">
2-
<span ng-repeat="item in list" class="pill" ng-class="{'has-delete': hasDelete, 'has-more': showMore }">
2+
<span ng-repeat="item in list | limitTo: showMore ? 1 : list.length" class="pill" ng-class="{'has-delete': hasDelete, 'has-more': showMore }">
33
<span class="name">
44
{{item}}
55
</span>
66
<span ng-show="showMore" class="more">...</span>
77
<span ng-show="hasDelete" class="delete-pill" ng-click="deletePill(item)">
88
<ui-icon name="circle-x" classes="dark-circle-x"></ui-icon>
99
</span>
10-
<!--<button ng-show="scopes.length > 0" class="scopes-pill" dropdown-toggle>{{scopes[0]}}<span ng-show="scopes.length > 1">...</span></button>-->
11-
<!--<ul class="dropdown-menu">-->
12-
<!--<li ng-repeat="tScope in scopes track by $index">{{tScope}}</li>-->
13-
<!--</ul>-->
1410
</span>
1511
</span>

0 commit comments

Comments
 (0)