clickHandler: function(e)
{
- switch (e.element().readAttribute('id')) {
- case 'changefolder':
- case 'resetbut':
- this.folderChange(e, true);
- break;
+ if (e.isRightClick()) {
+ return;
+ }
+
+ var elt = e.element();
+
+ while (Object.isElement(elt)) {
+ switch (elt.readAttribute('id')) {
+ case 'changefolder':
+ case 'resetbut':
+ this.folderChange(e, true);
+ break;
+ }
+
+ elt = elt.up();
}
}
clickHandler: function(e)
{
+ if (e.isRightClick()) {
+ return;
+ }
+
var elt = e.element(), name;
- if (elt.hasClassName('button')) {
- name = elt.readAttribute('name');
- switch (name) {
- case 'btn_add_attachment':
- case 'btn_redirect':
- case 'btn_save_draft':
- case 'btn_send_message':
- this.uniqSubmit(name.substring(4), e);
- break;
-
- case 'btn_cancel_compose':
- this.confirmCancel(e);
- break;
+ while (Object.isElement(elt)) {
+ if (elt.hasClassName('button')) {
+ name = elt.readAttribute('name');
+ switch (name) {
+ case 'btn_add_attachment':
+ case 'btn_redirect':
+ case 'btn_save_draft':
+ case 'btn_send_message':
+ this.uniqSubmit(name.substring(4), e);
+ break;
+
+ case 'btn_cancel_compose':
+ this.confirmCancel(e);
+ break;
+ }
}
+
+ elt = elt.up();
}
},
_clickHandler: function(e)
{
- var id = e.element().readAttribute('id');
+ if (e.isRightClick()) {
+ return;
+ }
- switch (id) {
- case 'btn_add_to':
- case 'btn_add_cc':
- case 'btn_add_bcc':
- this.addAddress(id.substring(8));
- break;
+ var elt = e.element(), id;
- case 'btn_update':
- this.updateMessage();
- break;
+ while (Object.isElement(elt)) {
+ id = elt.readAttribute('id');
- case 'btn_delete':
- this.removeAddress();
- break;
+ switch (id) {
+ case 'btn_add_to':
+ case 'btn_add_cc':
+ case 'btn_add_bcc':
+ this.addAddress(id.substring(8));
+ break;
- case 'btn_cancel':
- window.close();
- break;
+ case 'btn_update':
+ this.updateMessage();
+ break;
+
+ case 'btn_delete':
+ this.removeAddress();
+ break;
+
+ case 'btn_cancel':
+ window.close();
+ break;
+ }
+
+ elt = elt.up();
}
},
_clickHandler: function(e)
{
- switch (e.element().readAttribute('id')) {
- case 'btn_delete':
- $('actionID').setValue('fetchmail_prefs_delete');
- break;
+ if (e.isRightClick()) {
+ return;
+ }
- case 'btn_create':
- $('actionID').setValue('fetchmail_create');
- this._accountSubmit(true);
- break;
+ var elt = e.element();
- case 'btn_return':
- document.location.href = this.prefsurl;
- break;
+ while (Object.isElement(elt)) {
+ switch (elt.readAttribute('id')) {
+ case 'btn_delete':
+ $('actionID').setValue('fetchmail_prefs_delete');
+ break;
- case 'btn_save':
- $('actionID').setValue('fetchmail_prefs_save');
- break;
+ case 'btn_create':
+ $('actionID').setValue('fetchmail_create');
+ this._accountSubmit(true);
+ break;
- case 'btn_select':
- document.location.href = this.fetchurl;
- break;
+ case 'btn_return':
+ document.location.href = this.prefsurl;
+ break;
+
+ case 'btn_save':
+ $('actionID').setValue('fetchmail_prefs_save');
+ break;
+
+ case 'btn_select':
+ document.location.href = this.fetchurl;
+ break;
+ }
+
+ elt = elt.up();
}
}
clickHandler: function(e)
{
- switch (e.element().readAttribute('id')) {
- case 'btn_import':
- this.submitAction('import_mbox');
- break;
+ if (e.isRightClick()) {
+ return;
+ }
- case 'btn_return':
- document.location.href = this.folders_url;
- break;
+ var elt = e.element();
- case 'checkAll0':
- case 'checkAll1':
- this.toggleSelection();
- break;
+ while (Object.isElement(elt)) {
+ switch (elt.readAttribute('id')) {
+ case 'btn_import':
+ this.submitAction('import_mbox');
+ break;
+
+ case 'btn_return':
+ document.location.href = this.folders_url;
+ break;
+
+ case 'checkAll0':
+ case 'checkAll1':
+ this.toggleSelection();
+ break;
+ }
+
+ elt = elt.up();
}
}
_clickHandler: function(e)
{
- switch (e.element().readAttribute('id')) {
- case 'btn_login':
- this._reload();
- break;
+ if (e.isRightClick()) {
+ return;
+ }
- case 'loginButton':
- this.submit();
- break;
+ var elt = e.element();
+
+ while (Object.isElement(elt)) {
+ switch (elt.readAttribute('id')) {
+ case 'btn_login':
+ this._reload();
+ break;
+
+ case 'loginButton':
+ this.submit();
+ break;
+ }
+
+ elt = elt.up();
}
}
clickHandler: function(e)
{
- var elt = e.element(),
+ if (e.isRightClick()) {
+ return;
+ }
+
+ var elt = e.element(), id;
+
+ while (Object.isElement(elt)) {
id = elt.readAttribute('id');
- if (elt.match('.msgactions A.widget')) {
- if (elt.hasClassName('moveAction')) {
- this._transfer('move_messages');
- } else if (elt.hasClassName('copyAction')) {
- this._transfer('copy_messages');
- } else if (elt.hasClassName('permdeleteAction')) {
- if (confirm(IMP.text.mailbox_delete)) {
+ if (elt.match('.msgactions A.widget')) {
+ if (elt.hasClassName('moveAction')) {
+ this._transfer('move_messages');
+ } else if (elt.hasClassName('copyAction')) {
+ this._transfer('copy_messages');
+ } else if (elt.hasClassName('permdeleteAction')) {
+ if (confirm(IMP.text.mailbox_delete)) {
+ this.submit('delete_messages');
+ }
+ } else if (elt.hasClassName('deleteAction')) {
this.submit('delete_messages');
+ } else if (elt.hasClassName('undeleteAction')) {
+ this.submit('undelete_messages');
+ } else if (elt.hasClassName('blacklistAction')) {
+ this.submit('blacklist');
+ } else if (elt.hasClassName('whitelistAction')) {
+ this.submit('whitelist');
+ } else if (elt.hasClassName('forwardAction')) {
+ this.submit('fwd_digest');
+ } else if (elt.hasClassName('spamAction')) {
+ this.submit('spam_report');
+ } else if (elt.hasClassName('notspamAction')) {
+ this.submit('notspam_report');
+ } else if (elt.hasClassName('viewAction')) {
+ this.submit('view_messages');
+ } else if (elt.hasClassName('hideAction') || elt.hasClassName('purgeAction')) {
+ return;
}
- } else if (elt.hasClassName('deleteAction')) {
- this.submit('delete_messages');
- } else if (elt.hasClassName('undeleteAction')) {
- this.submit('undelete_messages');
- } else if (elt.hasClassName('blacklistAction')) {
- this.submit('blacklist');
- } else if (elt.hasClassName('whitelistAction')) {
- this.submit('whitelist');
- } else if (elt.hasClassName('forwardAction')) {
- this.submit('fwd_digest');
- } else if (elt.hasClassName('spamAction')) {
- this.submit('spam_report');
- } else if (elt.hasClassName('notspamAction')) {
- this.submit('notspam_report');
- } else if (elt.hasClassName('viewAction')) {
- this.submit('view_messages');
- } else if (elt.hasClassName('hideAction') || elt.hasClassName('purgeAction')) {
- return;
+
+ e.stop();
+ return;
}
- e.stop();
- return;
- }
+ if (!id) {
+ return;
+ }
- if (!id) {
- return;
- }
+ switch (id) {
+ case 'checkheader':
+ case 'checkAll':
+ if (id == 'checkheader') {
+ $('checkAll').checked = !$('checkAll').checked;
+ }
+ this.makeSelection(-1);
+ return;
+ }
- switch (id) {
- case 'checkheader':
- case 'checkAll':
- if (id == 'checkheader') {
- $('checkAll').checked = !$('checkAll').checked;
+ if (id.startsWith('check') && elt.hasClassName('checkbox')) {
+ this.selectRange(e);
+ } else if (!this.sortlimit &&
+ elt.match('TH') &&
+ elt.up('TABLE.messageList')) {
+ document.location.href = elt.down('A').href;
}
- this.makeSelection(-1);
- return;
- }
- if (id.startsWith('check') && elt.hasClassName('checkbox')) {
- this.selectRange(e);
- } else if (!this.sortlimit &&
- elt.match('TH') &&
- elt.up('TABLE.messageList')) {
- document.location.href = elt.down('A').href;
+ elt = elt.up();
}
},
clickHandler: function(e)
{
+ if (e.isRightClick()) {
+ return;
+ }
+
var elt = e.element();
- if (elt.hasClassName('searchSubmit')) {
- this._formCheck();
- } else if (elt.hasClassName('searchReset')) {
- this._reset();
- } else if (elt.hasClassName('searchDelete')) {
- this._deleteField(elt.readAttribute('fid'));
- } else {
- switch (elt.readAttribute('id')) {
- case 'link_sel_all':
- this._toggleAll(true);
- break;
-
- case 'link_sel_none':
- this._toggleAll(false);
- break;
-
- case 'link_sub':
- this._showSubscribed(this.inverse_sub);
- break;
-
- case 'search_match_and':
- case 'search_match_or':
- if ($('field_1')) {
- $('search').submit();
+ while (Object.isElement(elt)) {
+ if (elt.hasClassName('searchSubmit')) {
+ this._formCheck();
+ } else if (elt.hasClassName('searchReset')) {
+ this._reset();
+ } else if (elt.hasClassName('searchDelete')) {
+ this._deleteField(elt.readAttribute('fid'));
+ } else {
+ switch (elt.readAttribute('id')) {
+ case 'link_sel_all':
+ this._toggleAll(true);
+ break;
+
+ case 'link_sel_none':
+ this._toggleAll(false);
+ break;
+
+ case 'link_sub':
+ this._showSubscribed(this.inverse_sub);
+ break;
+
+ case 'search_match_and':
+ case 'search_match_or':
+ if ($('field_1')) {
+ $('search').submit();
+ }
+ break;
}
- break;
}
+
+ elt = elt.up();
}
}