Merge "[Launch Instance Fix] Add Sorting To Table in Select Source"

This commit is contained in:
Jenkins
2015-03-19 11:01:34 +00:00
committed by Gerrit Code Review
2 changed files with 26 additions and 18 deletions

View File

@@ -234,20 +234,28 @@
</tr>
<tr>
<th class="expander"></th>
<th ng-class="tableHeadCells[0].classList"
ng-style="tableHeadCells[0].style">
<th ng-attr-st-sort-default="{$ tableHeadCells[0].sortDefault $}"
ng-class="tableHeadCells[0].classList"
ng-style="tableHeadCells[0].style"
st-sort="{$ tableHeadCells[0].sortable && tableBodyCells[0].key $}">
{$ tableHeadCells[0].text $}
</th>
<th ng-class="tableHeadCells[1].classList"
ng-style="tableHeadCells[1].style">
<th ng-attr-st-sort-default="{$ tableHeadCells[1].sortDefault $}"
ng-class="tableHeadCells[1].classList"
ng-style="tableHeadCells[1].style"
st-sort="{$ tableHeadCells[1].sortable && tableBodyCells[1].key $}">
{$ tableHeadCells[1].text $}
</th>
<th ng-class="tableHeadCells[2].classList"
ng-style="tableHeadCells[2].style">
<th ng-attr-st-sort-default="{$ tableHeadCells[2].sortDefault $}"
ng-class="tableHeadCells[2].classList"
ng-style="tableHeadCells[2].style"
st-sort="{$ tableHeadCells[2].sortable && tableBodyCells[2].key $}">
{$ tableHeadCells[2].text $}
</th>
<th ng-class="tableHeadCells[3].classList"
ng-style="tableHeadCells[3].style">
<th ng-attr-st-sort-default="{$ tableHeadCells[3].sortDefault $}"
ng-class="tableHeadCells[3].classList"
ng-style="tableHeadCells[3].style"
st-sort="{$ tableHeadCells[3].sortable && tableBodyCells[3].key $}">
{$ tableHeadCells[3].text $}
</th>
<th class="action"></th>

View File

@@ -91,25 +91,25 @@
var tableHeadCellsMap = {
image: [
{ text: gettext('Name'), style: { width: '25%' } },
{ text: gettext('Updated'), style: { width: '20%' } },
{ text: gettext('Size'), style: { width: '15%' }, classList: ['number'] },
{ text: gettext('Type') }
{ text: gettext('Name'), style: { width: '25%' }, sortable: true, sortDefault: true },
{ text: gettext('Updated'), style: { width: '20%' }, sortable: true },
{ text: gettext('Size'), style: { width: '15%' }, classList: ['number'], sortable: true },
{ text: gettext('Type'), sortable: true }
],
volume: [
{ text: gettext('Name'), style: { width: '25%' } },
{ text: gettext('Name'), style: { width: '25%' }, sortable: true, sortDefault: true },
{ text: gettext('Type'), style: { width: '20%' } },
{ text: gettext('Size'), classList: ['number'] }
{ text: gettext('Size'), classList: ['number'], sortable: true }
],
snapshot: [
{ text: gettext('Name'), style: { width: '25%' } },
{ text: gettext('Name'), style: { width: '25%' }, sortable: true, sortDefault: true },
{ text: gettext('Type'), style: { width: '20%' } },
{ text: gettext('Size'), classList: ['number'] }
{ text: gettext('Size'), classList: ['number'], sortable: true }
],
volume_snapshot: [
{ text: gettext('Name'), style: { width: '25%' } },
{ text: gettext('Name'), style: { width: '25%' }, sortable: true, sortDefault: true },
{ text: gettext('Type'), style: { width: '20%' } },
{ text: gettext('Size'), classList: ['number'] }
{ text: gettext('Size'), classList: ['number'], sortable: true }
]
};