Skip to content

Commit d70583f

Browse files
authored
Media Grid View improvements (#11518)
* Add last Updated text under general * Map missing fallback text values and refactor <i> to <umb-icon> directive * fix icon styling
1 parent a209156 commit d70583f

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

src/Umbraco.Web.UI.Client/src/less/components/umb-table.less

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ input.umb-table__input {
5555
color: @ui-disabled-type;
5656
}
5757

58+
.umb-table-head__icon {
59+
position: relative;
60+
top: 2px;
61+
}
62+
5863
.umb-table-head__link {
5964
background: transparent;
6065
border: 0 none;
@@ -111,7 +116,7 @@ input.umb-table__input {
111116
.umb-table-body .umb-table-row.-selectable {
112117
cursor: pointer;
113118
}
114-
.umb-table-row.-selected,
119+
.umb-table-row.-selected,
115120
.umb-table-body .umb-table-row.-selectable:hover {
116121
&::before {
117122
content: "";
@@ -226,7 +231,7 @@ input.umb-table__input {
226231
&.umb-table-body__checkicon {
227232
display: inline-block;
228233
}
229-
}
234+
}
230235
}
231236

232237
// Table Row Styles
@@ -309,8 +314,8 @@ input.umb-table__input {
309314

310315
.umb-table__loading-overlay {
311316
position: absolute;
312-
width: 100%;
313-
height: 100%;
317+
width: 100%;
318+
height: 100%;
314319
background-color: rgba(255, 255, 255, 0.7);
315320
z-index: 1;
316321
}
@@ -330,7 +335,7 @@ input.umb-table__input {
330335
}
331336

332337
.umb-table--condensed {
333-
338+
334339
.umb-table-cell:first-of-type:not(.not-fixed) {
335340
padding-top: 10px;
336341
padding-bottom: 10px;

src/Umbraco.Web.UI.Client/src/views/components/umb-media-grid.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,20 @@
6060
ng-click="vm.selectAll($event)"
6161
ng-checked="vm.isSelectedAll()">
6262
</div>
63-
<div class="umb-table-cell umb-table__name">
63+
<div class="umb-table-cell umb-table__name">
6464
<button type="button"
6565
class="umb-table-head__link sortable"
6666
ng-click="setSort('name')">
6767
<localize key="general_name">Name</localize>
68-
<i class="umb-table-head__icon icon" aria-hidden="true" ng-class="{'icon-navigation-up': isSortDirection('name', 'asc'), 'icon-navigation-down': isSortDirection('name', 'desc')}"></i>
68+
<umb-icon ng-attr-icon="{{isSortDirection('name', 'asc') && 'icon-navigation-up' || isSortDirection('name', 'desc') && 'icon-navigation-down'}}" class="umb-table-head__icon"></umb-icon>
6969
</button>
7070
</div>
7171
<div class="umb-table-cell">
7272
<button type="button"
7373
class="umb-table-head__link sortable"
7474
ng-click="setSort('updateDate')">
75-
Last Updated
76-
<i class="umb-table-head__icon icon" aria-hidden="true" ng-class="{'icon-navigation-up': isSortDirection('updateDate', 'asc'), 'icon-navigation-down': isSortDirection('updateDate', 'desc')}"></i>
75+
<localize key="general_lastUpdated">Last Updated</localize>
76+
<umb-icon ng-attr-icon="{{isSortDirection('updateDate', 'asc') && 'icon-navigation-up' || isSortDirection('updateDate', 'desc') && 'icon-navigation-down'}}" class="umb-table-head__icon"></umb-icon>
7777
</button>
7878
</div>
7979

@@ -90,7 +90,7 @@
9090
ng-show="item.isFolder"
9191
ng-class="{'-locked': item.selected || !item.file || !item.thumbnail}"
9292
ng-click="clickItemName(item, $event, $index)">
93-
</umb-icon>
93+
</umb-icon>
9494
<span data-src="{{item.value.src}}" class="item-name">{{item.name}}</span>
9595
</div>
9696
<div class="umb-table-cell">
@@ -101,4 +101,3 @@
101101
</div>
102102
</div>
103103
</div>
104-

src/Umbraco.Web.UI/Umbraco/config/lang/en.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@
806806
<key alias="avatar">Avatar for</key>
807807
<key alias="header">Header</key>
808808
<key alias="systemField">system field</key>
809+
<key alias="lastUpdated">Last Updated</key>
809810
</area>
810811
<area alias="colors">
811812
<key alias="blue">Blue</key>

src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@
815815
<key alias="avatar">Avatar for</key>
816816
<key alias="header">Header</key>
817817
<key alias="systemField">system field</key>
818+
<key alias="lastUpdated">Last Updated</key>
818819
</area>
819820
<area alias="colors">
820821
<key alias="blue">Blue</key>

0 commit comments

Comments
 (0)