openmedialibrary/static/js/deleteListDialog.js

41 lines
1.1 KiB
JavaScript
Raw Normal View History

2014-05-12 23:43:27 +00:00
'use strict';
oml.ui.deleteListDialog = function() {
var ui = oml.user.ui,
that = oml.ui.confirmDialog({
buttons: [
Ox.Button({
2016-01-13 08:20:03 +00:00
style: 'squared',
2014-05-12 23:43:27 +00:00
title: Ox._('No, Keep List')
}),
Ox.Button({
2016-01-13 08:20:03 +00:00
style: 'squared',
2014-05-12 23:43:27 +00:00
title: Ox._('Yes, Delete List')
})
],
content: Ox._('Are you sure you want to delete this list?'),
title: Ox._('Delete List')
}, function() {
oml.api.removeList({
id: ui._list
}, function() {
2014-05-17 14:42:46 +00:00
oml.$ui.folders.updateOwnLists(function() {
2014-05-14 09:57:11 +00:00
oml.UI.set({
find: {
conditions: [{
key: 'list',
operator: '==',
value: ':'
}],
operator: '&'
}
});
2014-05-12 23:43:27 +00:00
});
});
});
return that;
};