Skip to content

Commit

Permalink
Add IMP_Flist_Mbox.isContainer()
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jun 5, 2014
1 parent 746bb2b commit a661a13
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions imp/js/dimpbase.js
Expand Up @@ -3152,7 +3152,7 @@ var DimpBase = {
if (r.result) {
this.viewaction = function(e) {
DimpCore.doAction('deleteMailbox', {
container: ~~elt.element().hasClassName('imp-sidebar-container'),
container: ~~elt.isContainer(),
mbox: elt.value(),
subfolders: e.element().down('[name=delete_subfolders]').getValue()
});
Expand All @@ -3164,7 +3164,7 @@ var DimpBase = {
DimpCore.text.delete_mbox_subfolders.sub('%s', elt.fullMboxDisplay())
),
form_id: 'dimpbase_confirm',
text: elt.element().hasClassName('imp-sidebar-container') ? null : DimpCore.text.delete_mbox.sub('%s', elt.fullMboxDisplay())
text: elt.isContainer() ? null : DimpCore.text.delete_mbox.sub('%s', elt.fullMboxDisplay())
});
} else {
RedBox.close();
Expand Down Expand Up @@ -3216,7 +3216,7 @@ var DimpBase = {
DimpCore.text.subscribe_mbox_subfolders.sub('%s', elt.fullMboxDisplay())
),
form_id: 'dimpbase_confirm',
text: elt.element().hasClassName('imp-sidebar-container') ? null : DimpCore.text.subscribe_mbox.sub('%s', elt.fullMboxDisplay())
text: elt.isContainer() ? null : DimpCore.text.subscribe_mbox.sub('%s', elt.fullMboxDisplay())
});
break;

Expand Down Expand Up @@ -3249,7 +3249,7 @@ var DimpBase = {
DimpCore.text.unsubscribe_mbox_subfolders.sub('%s', elt.fullMboxDisplay())
),
form_id: 'dimpbase_confirm',
text: elt.element().hasClassName('imp-sidebar-container') ? null : DimpCore.text.unsubscribe_mbox.sub('%s', elt.fullMboxDisplay())
text: elt.isContainer() ? null : DimpCore.text.unsubscribe_mbox.sub('%s', elt.fullMboxDisplay())
});
break;
}
Expand Down Expand Up @@ -4341,6 +4341,11 @@ var IMP_Flist_Mbox = Class.create({
return !!this.dummy;
},

isContainer: function()
{
return this.elt.hasClassName('imp-sidebar-container');
},

fullMboxDisplay: function()
{
return this.elt.readAttribute('title').escapeHTML();
Expand Down

0 comments on commit a661a13

Please sign in to comment.