Wrong sorting by columns Modified and Version in the main view
This commit is contained in:
parent
76c620ec51
commit
b30d895656
@ -227,5 +227,10 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
def available_custom_fields
|
||||
DmsfFileRevisionCustomField.all
|
||||
end
|
||||
|
||||
def iversion
|
||||
parts = self.version.split '.'
|
||||
parts.size == 2 ? parts[0].to_i * 1000 + parts[1].to_i : 0
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -104,3 +104,5 @@
|
||||
</td>
|
||||
<td class="hidden">0</td>
|
||||
<td class="hidden">0</td>
|
||||
<td class="hidden"><%= subfolder.updated_at.to_i %></td>
|
||||
<td class="hidden">0</td>
|
||||
|
||||
@ -178,4 +178,6 @@
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="hidden">1</td>
|
||||
<td class="hidden"><%= file.last_revision.size %></td>
|
||||
<td class="hidden"><%= file.last_revision.size %></td>
|
||||
<td class="hidden"><%= file.last_revision.updated_at.to_i %></td>
|
||||
<td class="hidden"><%= file.last_revision.iversion %></td>
|
||||
@ -134,6 +134,8 @@
|
||||
<th></th>
|
||||
<th class="hidden"></th>
|
||||
<th class="hidden"></th>
|
||||
<th class="hidden"></th>
|
||||
<th class="hidden"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -242,7 +244,9 @@
|
||||
'aoColumnDefs': [
|
||||
{ 'bSearchable': false, 'aTargets': [0, 7, 8, 9] },
|
||||
{ 'bSortable': false, 'aTargets': [0, 7, 8] },
|
||||
{ 'iDataSort': 9, 'aTargets': [ 2 ] }
|
||||
{ 'iDataSort': 9, 'aTargets': [ 2 ] },
|
||||
{ 'iDataSort': 10, 'aTargets': [ 3 ] },
|
||||
{ 'iDataSort': 11, 'aTargets': [ 4 ] }
|
||||
],
|
||||
'fnInitComplete': function() {
|
||||
jQuery('div.controls').prependTo(jQuery('#browser_wrapper div.fg-toolbar')[0]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user