var url = DIMP.conf.URI_MESSAGE;
url += (url.include('?') ? '&' : '?') +
$H({ folder: r.view,
- uid: Number(r.imapuid) }).toQueryString();
+ uid: r.imapuid }).toQueryString();
DimpCore.popupWindow(url, 'msgview' + r.view + r.imapuid);
},
}
}
- this.viewport.loadView(f, { search: (this.uid ? { imapuid: Number(this.uid) } : null), background: opts.background});
+ this.viewport.loadView(f, { search: (this.uid ? { imapuid: this.uid } : null), background: opts.background});
if (need_delete) {
this.viewport.deleteView(need_delete);
// 'noload' = (boolean) If true, don't load the mailbox
quicksearchClear: function(noload)
{
- var f = this.folder;
+ var f = this.folder,
+ qs = $('qsearch');
- if (!$('qsearch').hasClassName('qsearchFocus')) {
+ if (!qs) {
+ return;
+ }
+
+ if (!qs.hasClassName('qsearchFocus')) {
this._setQsearchText(true);
}
if (this.isSearch()) {
this.resetSelected();
- $('qsearch', 'qsearch_icon', 'qsearch_input').invoke('show');
+ $(qs, 'qsearch_icon', 'qsearch_input').invoke('show');
if (!noload) {
this.loadMailbox(this.search ? this.search.mbox : 'INBOX');
}
_folderLoadCallback: function(r, callback)
{
+ var nf = $('normalfolders');
+
if (r.response.expand) {
this.expandfolder = true;
}
$('foldersLoading').hide();
$('foldersSidebar').show();
- if ($('normalfolders').getStyle('max-height') !== null) {
+ if (nf && nf.getStyle('max-height') !== null) {
this._sizeFolderlist();
}
_sizeFolderlist: function()
{
var nf = $('normalfolders');
- nf.setStyle({ height: (document.viewport.getHeight() - nf.cumulativeOffset()[1]) + 'px' });
+ if (nf) {
+ nf.setStyle({ height: (document.viewport.getHeight() - nf.cumulativeOffset()[1]) + 'px' });
+ }
},
toggleSubscribed: function()
return;
}
- var u = o.value.numericSort(),
+ var u = (DIMP.conf.pop3 ? o.value : o.value.numericSort()),
first = u.shift(),
last = first,
out = [];
u.each(function(k) {
- if (last + 1 == k) {
+ if (!DIMP.conf.pop3 && (last + 1 == k)) {
last = k;
} else {
out.push(first + (last == first ? '' : (':' + last)));
uidstr.split(',').each(function(e) {
var r = e.split(':');
if (r.size() == 1) {
- uids.push(Number(e));
+ uids.push(DIMP.conf.pop3 ? e : Number(e));
} else {
+ // POP3 will never exist in range here.
uids = uids.concat($A($R(Number(r[0]), Number(r[1]))));
}
});
$args = array(
'mailbox' => $mbox,
'preview' => true,
- 'uid' => intval($idx)
+ 'uid' => $idx
);
$result = new stdClass;
$result->preview = new stdClass;
$result = $this->showPreview();
$new_indices_list = $new_indices->getSingle();
- $result->newuid = intval($new_indices_list[1]);
+ $result->newuid = $new_indices_list[1];
$old_indices_list = $indices->getSingle();
$result->oldmbox = $old_indices_list[0];
- $result->olduid = intval($old_indices_list[1]);
+ $result->olduid = $old_indices_list[1];
$result->ViewPort = $this->_viewPortData(true);
return $result;
while (list(,$ob) = each($overview['overview'])) {
/* Initialize the header fields. */
$msg = array(
- 'imapuid' => intval($ob['uid']),
+ 'imapuid' => (($_SESSION['imp']['protocol'] == 'pop') ? $ob['uid'] : intval($ob['uid'])),
'view' => $ob['mailbox'],
);
$result = array(
'js' => array(),
'mailbox' => $mailbox,
- 'uid' => intval($uid)
+ 'uid' => $uid
);
/* Set the current time zone. */
</ul>
</div>
<?php endif; ?>
+<?php if ($_SESSION['imp']['protocol'] != 'pop'): ?>
<div class="sepfull"></div>
<ul class="folderlist" id="normalfolders">
<li class="folder" id="folderopts">
<a title="<?php echo _("Move to Base Level") ?>"><?php echo _("Move to Base Level") ?></a>
</li>
</ul>
+<?php endif; ?>
</div>
</div>
'login_view' => $GLOBALS['prefs']->getValue('dimp_login_view'),
'mbox_expand' => intval($GLOBALS['prefs']->getValue('nav_expanded') == 2),
'name' => $GLOBALS['registry']->get('name', 'imp'),
+ 'pop3' => intval((isset($_SESSION['imp']) && ($_SESSION['imp']['protocol'] == 'pop'))),
'popup_height' => 610,
'popup_width' => 820,
'preview_pref' => ($GLOBALS['prefs']->getValue('dimp_show_preview') ? $GLOBALS['prefs']->getValue('dimp_show_preview') : 'horiz'),
#logo, #dimpbarActions, #serviceActions, #foldersSidebar, #normalfolders {
overflow-x: hidden;
}
+#applicationfolders {
+ overflow: hidden;
+}
#folderopts a {
display: inline !important;