var tb = table.tBodies[0], tr = Array.prototype.slice.call(tb.rows, 0), i;
reverse = -((+reverse) || -1);
tr = tr.sort(function (a, b) {
- var val;
- var val_a = a.cells[col].textContent.trim();
- var val_b = b.cells[col].textContent.trim();
+ var val, val_a, val_b, el_a, el_b;
+ el_a = a.cells[col].childNodes[1];
+ el_b = b.cells[col].childNodes[1];
+ if (el_a && el_b && el_a.nodeType === 1 && el_b.nodeType === 1 && el_a.hasAttribute('rel') && el_b.hasAttribute('rel')) {
+ val_a = el_a.getAttribute('rel');
+ val_b = el_b.getAttribute('rel');
+ } else {
+ val_a = a.cells[col].textContent.trim();
+ val_b = b.cells[col].textContent.trim();
+ }
if (!isNaN(parseFloat(val_a)) && isFinite(val_a) && !isNaN(parseFloat(val_b)) && isFinite(val_b)) {
val = val_a - val_b
} else {
</com:TActiveTemplateColumn>
<com:TActiveTemplateColumn HeaderText="<%[ File Retention ]%>" SortExpression="fileretention">
<prop:ItemTemplate>
- <%=(integer)($this->getParent()->Data['fileretention'] / 3600 / 24)%> <%=$this->getParent()->Data['fileretention'] < 172800 ? Prado::localize('day') : Prado::localize('days')%>
+ <div rel="<%=$this->getParent()->Data['fileretention']%>"><%=(integer)($this->getParent()->Data['fileretention'] / 3600 / 24)%> <%=$this->getParent()->Data['fileretention'] < 172800 ? Prado::localize('day') : Prado::localize('days')%></div>
</prop:ItemTemplate>
</com:TActiveTemplateColumn>
<com:TActiveTemplateColumn HeaderText="<%[ Job Retention ]%>" SortExpression="jobretention">
</com:TActiveTemplateColumn>
<com:TActiveTemplateColumn HeaderText="<%[ Size ]%>" SortExpression="jobbytes">
<prop:ItemTemplate>
- <div class="size"><%=$this->getParent()->Data['jobbytes']%></div>
+ <div class="size" rel="<%=$this->getParent()->Data['jobbytes']%>"><%=$this->getParent()->Data['jobbytes']%></div>
</prop:ItemTemplate>
</com:TActiveTemplateColumn>
<com:TActiveBoundColumn SortExpression="jobfiles" HeaderText="<%[ Files ]%>" DataField="jobfiles" />
/>
<com:TActiveTemplateColumn HeaderText="Vol. retention" SortExpression="volretention">
<prop:ItemTemplate>
- <%=(integer)($this->getParent()->Data['volretention'] / 3600 / 24)%> <%=$this->getParent()->Data['volretention'] < 172800 ? 'day' : 'days'%>
+ <div rel="<%=$this->getParent()->Data['volretention']%>"><%=(integer)($this->getParent()->Data['volretention'] / 3600 / 24)%> <%=$this->getParent()->Data['volretention'] < 172800 ? 'day' : 'days'%>
</prop:ItemTemplate>
</com:TActiveTemplateColumn>
<com:TActiveTemplateColumn HeaderText="AutoPrune" SortExpression="autoprune" ItemStyle.HorizontalAlign="Center">