some changes to files view

This commit is contained in:
rlx 2011-06-04 02:32:42 +00:00
parent 62df91961e
commit f601f0862f

View file

@ -154,8 +154,50 @@ Ox.FilesView = function(options, self) {
select: selectFiles select: selectFiles
}); });
self.$instancesList = Ox.Element() self.$instancesList = Ox.TextList({
.html('No files selected'); columns: [
{
align: 'left',
id: 'user',
operator: '+',
title: 'User',
visible: true,
width: 120
},
{
align: 'left',
id: 'volume',
operator: '+',
title: 'Volume',
visible: true,
width: 120
},
{
align: 'left',
id: 'folder',
operator: '+',
title: 'Folder',
visible: true,
width: 180
},
{
align: 'left',
id: 'name',
operator: '+',
title: 'Name',
visible: true,
width: 360
},
],
columnsMovable: true,
columnsRemovable: true,
columnsResizable: true,
columnsVisible: true,
id: 'files',
items: [],
scrollbarVisible: true,
sort: [{key: 'user', operator: '+'}]
});
self.$movieLabel = Ox.Label({ self.$movieLabel = Ox.Label({
textAlign: 'center', textAlign: 'center',
@ -234,7 +276,7 @@ Ox.FilesView = function(options, self) {
.css({margin: '8px'}); .css({margin: '8px'});
self.$clearButton = Ox.Button({ self.$clearButton = Ox.Button({
title: 'Clear', title: 'Clear Form',
width: 116 width: 116
}) })
.css({margin: '0 4px 4px 8px'}) .css({margin: '0 4px 4px 8px'})
@ -248,7 +290,7 @@ Ox.FilesView = function(options, self) {
self.$moveButton = Ox.Button({ self.$moveButton = Ox.Button({
disabled: true, disabled: true,
title: 'Move', title: 'Move Files',
width: 116 width: 116
}) })
.css({margin: '0 4px 4px 4px'}); .css({margin: '0 4px 4px 4px'});
@ -293,7 +335,12 @@ Ox.FilesView = function(options, self) {
} }
function selectFiles(data) { function selectFiles(data) {
Ox.print('........', JSON.stringify(self.$filesList.value(data.ids[0], 'instances')))
self.selected = data.ids; self.selected = data.ids;
self.$instancesList.options({
items: data.ids.length == 1
? self.$filesList.value(data.ids[0], 'instances') : []
});
updateForm(); updateForm();
} }