if (this.folderswitch) {
this.folderswitch = false;
- if (this.folder == DIMP.conf.spam_folder) {
- if (!DIMP.conf.spam_spamfolder &&
- DimpCore.buttons.indexOf('button_spam') != -1) {
+ if (this.folder == DIMP.conf.spam_mbox) {
+ if (!DIMP.conf.spam_spammbox && $('button_spam')) {
[ $('button_spam').up(), $('ctx_message_spam') ].invoke('hide');
}
- if (DimpCore.buttons.indexOf('button_ham') != -1) {
+ if ($('button_ham')) {
[ $('button_ham').up(), $('ctx_message_ham') ].invoke('show');
}
} else {
- if (DimpCore.buttons.indexOf('button_spam') != -1) {
+ if ($('button_spam')) {
[ $('button_spam').up(), $('ctx_message_spam') ].invoke('show');
}
- if (DimpCore.buttons.indexOf('button_ham') != -1) {
- if (DIMP.conf.ham_spamfolder) {
+ if ($('button_ham')) {
+ if (DIMP.conf.ham_spammbox) {
[ $('button_ham').up(), $('ctx_message_ham') ].invoke('hide');
} else {
[ $('button_ham').up(), $('ctx_message_ham') ].invoke('show');
toggleButtons: function()
{
var disable = (this.selectedCount() == 0);
- DimpCore.buttons.each(function(b) {
- var elt = $(b);
- if (elt) {
- [ elt.up() ].invoke(disable ? 'addClassName' : 'removeClassName', 'disabled');
- DimpCore.DMenu.disable(b + '_img', true, disable);
- }
+ $('dimpmain_folder_top').select('DIV.dimpActions A.noselectDisable').each(function(b) {
+ [ b.up() ].invoke(disable ? 'addClassName' : 'removeClassName', 'disabled');
+ DimpCore.DMenu.disable(b.readAttribute('id') + '_img', true, disable);
});
},
// onDoActionComplete
server_error: 0,
- buttons: [
- 'button_reply', 'button_forward', 'button_spam', 'button_ham',
- 'button_deleted'
- ],
-
doActionOpts: {
onException: function(r, e) { DimpCore.debug('onException', e); },
onFailure: function(t, o) { DimpCore.debug('onFailure', t); },
}
} catch (e) {}
- /* Remove unneeded buttons. */
- if (!DIMP.conf.spam_reporting) {
- this.buttons = this.buttons.without('button_spam');
- }
- if (!DIMP.conf.ham_reporting) {
- this.buttons = this.buttons.without('button_ham');
- }
-
/* Add Growler notifications. */
this.Growler = new Growler({
location: 'br',
'flags' => $flags,
- 'spam_folder' => IMP::folderPref($prefs->getValue('spam_folder'), true),
- 'spam_reporting' => intval(!empty($conf['spam']['reporting'])),
- 'spam_spamfolder' => intval(!empty($conf['spam']['spamfolder'])),
- 'ham_reporting' => intval(!empty($conf['notspam']['reporting'])),
- 'ham_spamfolder' => intval(!empty($conf['notspam']['spamfolder'])),
+ 'spam_mbox' => IMP::folderPref($prefs->getValue('spam_folder'), true),
+ 'spam_spammbox' => intval(!empty($conf['spam']['spamfolder'])),
+ 'ham_spammbox' => intval(!empty($conf['notspam']['spamfolder'])),
'refresh_time' => intval($prefs->getValue('refresh_time')),
'fixed_folders' => empty($conf['server']['fixed_folders'])
</form>
<?php echo IMP::img('close.png', '', array('id' => 'quicksearch_close', 'style' => 'display:none', 'title' => _("Clear Search")), $hordeimg) ?>
<span>
- <?php _createDA(_("Reply"), 'Reply', 'button_reply', '', $show_text) ?>
+ <?php _createDA(_("Reply"), 'Reply', 'button_reply', 'noselectDisable', $show_text) ?>
</span>
<span>
- <?php _createDA(_("Forward"), 'Forward', 'button_forward', '', $show_text) ?>
+ <?php _createDA(_("Forward"), 'Forward', 'button_forward', 'noselectDisable', $show_text) ?>
</span>
<?php if (!empty($conf['spam']['reporting'])): ?>
<span>
- <?php _createDA(_("Spam"), 'Spam', 'button_spam', '', $show_text) ?>
+ <?php _createDA(_("Spam"), 'Spam', 'button_spam', 'noselectDisable', $show_text) ?>
</span>
<?php endif; ?>
<?php if (!empty($conf['notspam']['reporting'])): ?>
<span style="display:none">
- <?php _createDA(_("Innocent"), 'Ham', 'button_ham', '', $show_text) ?>
+ <?php _createDA(_("Innocent"), 'Ham', 'button_ham', 'noselectDisable', $show_text) ?>
</span>
<?php endif; ?>
+ <span>
+ <?php _createDA(_("Delete"), 'Delete', 'button_deleted', 'noselectDisable', $show_text) ?>
+ </span>
<span id="button_compose">
<?php _createDA(_("Compose"), 'Compose', '', '', $show_text) ?>
</span>
<?php _createDA(_("Get Mail"), 'Checkmail', '', '', $show_text) ?>
</span>
<span>
- <?php _createDA(_("Delete"), 'Delete', 'button_deleted', '', $show_text) ?>
- </span>
- <span>
<?php _createDA(_("Other Actions"), 'Other', 'button_other', '', $show_text) ?>
</span>
</div>