diff --git a/static/js/folders.js b/static/js/folders.js index 402c92f..706bcf1 100644 --- a/static/js/folders.js +++ b/static/js/folders.js @@ -217,8 +217,17 @@ oml.ui.folders = function() { sortable: !index }) .bindEvent({ - add: function() { - !index && oml.addList(); + add: function(data) { + var keys = data.keys || '', + listData = oml.getListData(); + if (listData.user === '' && ( + keys != 'shift' || ui.listSelection + )) { + oml.addList( + Ox.contains(keys, 'alt'), + Ox.contains(keys, 'shift') + ); + } }, 'delete': function() { !index && oml.ui.deleteListDialog().open(); diff --git a/static/js/list.js b/static/js/list.js index 4782963..942b92f 100644 --- a/static/js/list.js +++ b/static/js/list.js @@ -6,6 +6,17 @@ oml.ui.list = function() { that = oml.ui[ui.listView + 'View']() .bindEvent({ + add: function(data) { + var keys = data.keys || ''; + if (!index && ( + keys != 'shift' || ui.listSelection + )) { + oml.addList( + Ox.contains(keys, 'alt'), + Ox.contains(keys, 'shift') + ); + } + }, closepreview: function() { oml.$ui.previewButton.options({value: false}); oml.$ui.previewDialog.close();