2014-02-10 08:28:35 +00:00
|
|
|
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
|
|
|
|
2011-12-18 09:30:35 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
pandora.ui.makeListPrivateDialog = function(name, subscribers, callback) {
|
|
|
|
|
2014-02-10 08:28:35 +00:00
|
|
|
var ui = pandora.user.ui,
|
|
|
|
folderItem = ui.section == 'item' ? 'List' : 'Edit',
|
|
|
|
that = pandora.ui.iconDialog({
|
2011-12-18 09:30:35 +00:00
|
|
|
buttons: [
|
|
|
|
Ox.Button({
|
|
|
|
id: 'keep',
|
2014-02-10 08:28:35 +00:00
|
|
|
title: Ox._('Keep {0} Public', [folderItem])
|
2011-12-18 09:30:35 +00:00
|
|
|
}).bindEvent({
|
|
|
|
click: function() {
|
|
|
|
that.close();
|
|
|
|
callback(false);
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
Ox.Button({
|
|
|
|
id: 'make',
|
2014-02-10 08:28:35 +00:00
|
|
|
title: Ox._('Make {0} Private', [folderItem])
|
2011-12-18 09:30:35 +00:00
|
|
|
}).bindEvent({
|
|
|
|
click: function() {
|
|
|
|
that.close();
|
|
|
|
callback(true);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
],
|
2014-02-10 08:28:35 +00:00
|
|
|
content: Ox._('Are you sure you want to make the {0} "{1}" private and lose its {2}?', [
|
|
|
|
folderItem.toLowerCase(),
|
|
|
|
name,
|
|
|
|
subscribers == 1 ? Ox._('subscriber') : Ox._('{0} subscribers', [subscribers])
|
|
|
|
]),
|
2013-08-08 13:04:51 +00:00
|
|
|
keys: {enter: 'make', escape: 'keep'},
|
2014-02-10 08:28:35 +00:00
|
|
|
title: Ox._('Make {0} Private', [folderItem])
|
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
|
|
|
};
|