more...
This commit is contained in:
parent
2ee2bc178a
commit
10d2f35b7b
20 changed files with 1334 additions and 629 deletions
|
|
@ -9,8 +9,8 @@ oml.ui.browser = function() {
|
|||
defaultRatio: oml.config.coverRatio,
|
||||
draggable: true,
|
||||
item: function(data, sort, size) {
|
||||
var color = oml.getFileTypeColor(data).map(function(rgb) {
|
||||
return rgb.concat(0.8)
|
||||
var color = oml.getFileInfoColor(ui.fileInfo, data).map(function(rgb) {
|
||||
return rgb.concat(0.8);
|
||||
}),
|
||||
ratio = data.coverRatio || oml.config.coverRatio,
|
||||
width = Math.round(ratio >= 1 ? size : size * ratio),
|
||||
|
|
@ -28,12 +28,14 @@ oml.ui.browser = function() {
|
|||
height: Math.round(size / 12.8) + 'px',
|
||||
borderWidth: Math.round(size / 64) + 'px 0',
|
||||
borderStyle: 'solid',
|
||||
borderColor: 'rgba(' + color[1].join(', ') + ')',
|
||||
borderColor: 'rgba(' + color[2].join(', ') + ')',
|
||||
margin: Math.round(size / 18) + 'px ' + Math.round(width / 3) + 'px',
|
||||
fontSize: Math.round(size / 16) + 'px',
|
||||
textAlign: 'center',
|
||||
color: 'rgba(' + color[1].join(', ') + ')',
|
||||
backgroundColor: 'rgba(' + color[0].join(', ') + ')',
|
||||
color: 'rgba(' + color[2].join(', ') + ')',
|
||||
backgroundImage: '-webkit-linear-gradient(top, ' + color.slice(0, 2).map(function(rgba) {
|
||||
return 'rgba(' + rgba.join(', ') + ')';
|
||||
}).join(', ') + ')',
|
||||
WebkitTransform: 'rotate(45deg)'
|
||||
})
|
||||
.html(
|
||||
|
|
@ -55,8 +57,8 @@ oml.ui.browser = function() {
|
|||
}), callback);
|
||||
},
|
||||
keys: [
|
||||
'author', 'coverRatio', 'extension',
|
||||
'id', 'size', 'textsize', 'title'
|
||||
'author', 'coverRatio', 'extension', 'id',
|
||||
'mediastate', 'size', 'textsize', 'title'
|
||||
],
|
||||
max: 1,
|
||||
min: 1,
|
||||
|
|
@ -101,6 +103,8 @@ oml.ui.browser = function() {
|
|||
}
|
||||
});
|
||||
|
||||
oml.enableDragAndDrop(that);
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue