add Public list, peers can add items to that list

This commit is contained in:
j 2019-01-17 23:49:23 +05:30
commit f05a212a82
8 changed files with 55 additions and 13 deletions

View file

@ -229,8 +229,8 @@ oml.ui.folders = function() {
);
}
},
'delete': function() {
!index && oml.ui.deleteListDialog().open();
'delete': function(data) {
!index && !Ox.contains(data.ids, ':Public') && oml.ui.deleteListDialog().open();
},
key_control_d: function() {
oml.addList(ui._list);

View file

@ -334,6 +334,10 @@ oml.enableDragAndDrop = function($list, canMove) {
data.type == 'library'
&& drag.source.user != ''
&& data.user == ''
) || (
data.type == 'static'
&& data.name == 'Public'
&& drag.source.user == ''
),
selected: data.id == ui._list
}, data);
@ -503,7 +507,7 @@ oml.enableDragAndDrop = function($list, canMove) {
Ox._(itemText[0] == '"' ? '' : 'These ') + itemText,
targetText
]);
} else if (drag.target.user != '') {
} else if (drag.target.user != '' && drag.target.name != 'Public') {
text = Ox._(
'You can only {0} books<br>to your own {1}.',
[actionText, drag.target.type == 'library' ? 'library' : 'lists']