From 800725d54c8896100a8793357664c7f7ccb9f4ba Mon Sep 17 00:00:00 2001 From: j Date: Mon, 24 Aug 2020 01:05:42 +0200 Subject: [PATCH] add more collumn state --- static/js/collection.js | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/static/js/collection.js b/static/js/collection.js index 51017b503..a6f6f70ac 100644 --- a/static/js/collection.js +++ b/static/js/collection.js @@ -13,20 +13,6 @@ pandora.ui.collection = function() { if (view == 'list') { that = Ox.TableList({ - draggable: true, - keys: keys, - items: function(data, callback) { - pandora.api.findDocuments(Ox.extend(data, { - query: ui.findDocuments - }), callback); - return Ox.clone(data, true); - }, - selected: ui.collectionSelection, - sort: ui.collectionSort.concat([ - {key: 'extension', operator: '+'}, - {key: 'title', operator: '+'} - ]), - unique: 'id', columns: pandora.site.documentSortKeys.filter(function(key) { return !key.capability || pandora.hasCapability(key.capability); @@ -54,7 +40,24 @@ pandora.ui.collection = function() { }; }), columnsVisible: true, + columnsMovable: true, + columnsRemovable: true, + columnsResizable: true, + columnsVisible: true, + draggable: true, + items: function(data, callback) { + pandora.api.findDocuments(Ox.extend(data, { + query: ui.findDocuments + }), callback); + return Ox.clone(data, true); + }, scrollbarVisible: true, + selected: ui.collectionSelection, + sort: ui.collectionSort.concat([ + {key: 'extension', operator: '+'}, + {key: 'title', operator: '+'} + ]), + unique: 'id', }) .bindEvent({ columnchange: function(data) {