fix #2590 (layout issue with document thumbnail image)
This commit is contained in:
parent
c1066ad7f1
commit
4c59d41496
1 changed files with 26 additions and 17 deletions
|
@ -777,8 +777,8 @@ pandora.ui.documentsPanel = function(options) {
|
||||||
function renderPreview() {
|
function renderPreview() {
|
||||||
var selected = $list.options('selected')[0],
|
var selected = $list.options('selected')[0],
|
||||||
size = getPreviewSize(),
|
size = getPreviewSize(),
|
||||||
src = '/documents/' + selected + '/256p.jpg';
|
src = '/documents/' + selected + '/256p.jpg',
|
||||||
return Ox.ImageElement({
|
$element = Ox.ImageElement({
|
||||||
height: size.height,
|
height: size.height,
|
||||||
src: src,
|
src: src,
|
||||||
// fixme: this tends to stick around after menu click
|
// fixme: this tends to stick around after menu click
|
||||||
|
@ -789,11 +789,20 @@ pandora.ui.documentsPanel = function(options) {
|
||||||
.css({
|
.css({
|
||||||
borderRadius: '8px',
|
borderRadius: '8px',
|
||||||
margin: size.margin,
|
margin: size.margin,
|
||||||
cursor: 'pointer'
|
|
||||||
})
|
})
|
||||||
.on({
|
.on({
|
||||||
click: openDocuments
|
click: function(e) {
|
||||||
|
if ($(e.target).is('img')) {
|
||||||
|
openDocuments();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.bindEvent({
|
||||||
|
load: function() {
|
||||||
|
$($element.children()[0]).css({cursor: 'pointer'});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
return $element;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resizeItem() {
|
function resizeItem() {
|
||||||
|
|
Loading…
Reference in a new issue