For now, always sort by date, and always displaye the most recent messages.
authorJan Schneider <jan@horde.org>
Mon, 22 Nov 2010 13:09:54 +0000 (14:09 +0100)
committerJan Schneider <jan@horde.org>
Mon, 22 Nov 2010 13:09:54 +0000 (14:09 +0100)
imp/js/mobile.js
imp/templates/mobile/javascript_defs.php

index 18245e6..e30b8ec 100644 (file)
@@ -36,7 +36,12 @@ var ImpMobile = {
         $.mobile.pageLoading();
         ImpMobile.doAction(
             'viewPort',
-            { view: mailbox, initial: 1, slice: '1', requestid: 1, after: 25 },
+            {
+                view: mailbox,
+                slice: '1:25',
+                requestid: 1,
+                sortby: IMP.conf.sort.date.v,
+            },
             ImpMobile.messagesLoaded);
     },
 
index f98b177..893be27 100644 (file)
@@ -44,6 +44,36 @@ $code['conf'] = array_filter(array(
     /* Needed to maintain flag ordering. */
     'flags_o' => array_keys($flags),
     'refresh_time' => intval($GLOBALS['prefs']->getValue('refresh_time')),
+    'sort' => array(
+        'sequence' => array(
+            't' => '',
+            'v' => Horde_Imap_Client::SORT_SEQUENCE
+        ),
+        'from' => array(
+            't' => _("From"),
+            'v' => Horde_Imap_Client::SORT_FROM
+        ),
+        'to' => array(
+            't' => _("To"),
+            'v' => Horde_Imap_Client::SORT_TO
+        ),
+        'subject' => array(
+            't' => _("Subject"),
+            'v' => Horde_Imap_Client::SORT_SUBJECT
+        ),
+        'thread' => array(
+            't' => _("Thread"),
+            'v' => Horde_Imap_Client::SORT_THREAD
+        ),
+        'date' => array(
+            't' => _("Date"),
+            'v' => IMP::IMAP_SORT_DATE
+        ),
+        'size' => array(
+            't' => _("Size"),
+            'v' => Horde_Imap_Client::SORT_SIZE
+        )
+    ),
 ));
 
 /* Gettext strings used in core javascript files. */