pandora/static/js/pandora/makeListPrivateDialog.js

35 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',
2013-05-09 10:13:58 +00:00
title: Ox._('Keep List Public')
2011-12-18 09:30:35 +00:00
}).bindEvent({
click: function() {
that.close();
callback(false);
}
}),
Ox.Button({
id: 'make',
2013-05-09 10:13:58 +00:00
title: Ox._('Make List Private')
2011-12-18 09:30:35 +00:00
}).bindEvent({
click: function() {
that.close();
callback(true);
}
})
],
keys: {enter: 'make', escape: 'keep'},
2013-05-09 10:13:58 +00:00
text: Ox._('Are you sure you want to make the list "{0}" private and loose its {1}?',
[name, subscribers == 1 ? Ox._('subscriber') : Ox._('{0} subscribers', [subscribers])]),
title: Ox._('Make List Private')
2013-03-03 05:34:44 +00:00
});
2011-12-18 09:30:35 +00:00
return that;
2013-05-09 10:13:58 +00:00
};