pandora/static/js/pandora/makeListPrivateDialog.js

36 lines
1.1 KiB
JavaScript
Raw Normal View History

2011-12-18 09:30:35 +00:00
'use strict';
pandora.ui.makeListPrivateDialog = function(name, subscribers, callback) {
2013-03-03 05:34:44 +00:00
var that = pandora.ui.iconDialog({
2011-12-18 09:30:35 +00:00
buttons: [
Ox.Button({
id: 'keep',
title: 'Keep List Public'
}).bindEvent({
click: function() {
that.close();
callback(false);
}
}),
Ox.Button({
id: 'make',
title: 'Make List Private'
}).bindEvent({
click: function() {
that.close();
callback(true);
}
})
],
keys: {enter: 'make', escape: 'keep'},
2013-03-03 05:34:44 +00:00
text: 'Are you sure you want to make the list "'
+ name + '" private and lose its '
+ (subscribers == 1 ? 'subscriber' : subscribers + ' subscribers')
+ '?',
title: 'Make List Private'
});
2011-12-18 09:30:35 +00:00
return that;
};