changed: in 'showtickets' winix function

now tickets are sorted by the sort_index and then by date
changed: html in 'sort' winix function (added items' subjects to the item lists)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@931 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2013-07-08 14:42:14 +00:00
parent 26715bdd4c
commit b7f3f84080
4 changed files with 10 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010-2012, Tomasz Sowa
* Copyright (c) 2010-2013, Tomasz Sowa
* All rights reserved.
*
*/
@@ -55,7 +55,11 @@ bool ShowTickets::Sort::operator()(const Item * item1, const Item * item2)
}
else
{
// sorting by date
// sorting by sort_index and if equal then by date
if( item1->sort_index != item2->sort_index )
return item1->sort_index < item2->sort_index;
return item1->date_creation > item2->date_creation;
}
}
@@ -77,6 +81,7 @@ void ShowTickets::ReadFiles(long dir_id)
iq.sel_privileges = true;
iq.sel_date = true;
iq.sel_meta = true;
iq.sel_sort_index = true;
iq.WhereParentId(dir_id);
iq.WhereType(Item::file);
iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);