move reloadMetadata from doubleclick on title or director to doubleclick on metadata
This commit is contained in:
parent
7edf7ac0db
commit
c0e6e012b2
1 changed files with 12 additions and 13 deletions
|
@ -106,7 +106,9 @@ pandora.ui.infoView = function(data) {
|
||||||
})
|
})
|
||||||
.appendTo($reflection),
|
.appendTo($reflection),
|
||||||
|
|
||||||
$text = Ox.Element()
|
$text = Ox.Element({
|
||||||
|
tooltip: canEdit && !isEditable ? 'Doubleclick to reload metadata' : ''
|
||||||
|
})
|
||||||
.css({
|
.css({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
left: margin + (iconSize == 256 ? 256 : iconWidth) + margin + 'px',
|
left: margin + (iconSize == 256 ? 256 : iconWidth) + margin + 'px',
|
||||||
|
@ -114,6 +116,9 @@ pandora.ui.infoView = function(data) {
|
||||||
right: margin + statisticsWidth + margin + 'px',
|
right: margin + statisticsWidth + margin + 'px',
|
||||||
//background: 'green'
|
//background: 'green'
|
||||||
})
|
})
|
||||||
|
.bindEvent(canEdit && !isEditable ? {
|
||||||
|
doubleclick: reloadMetadata
|
||||||
|
} : {})
|
||||||
.appendTo($data.$element),
|
.appendTo($data.$element),
|
||||||
|
|
||||||
$statistics = $('<div>')
|
$statistics = $('<div>')
|
||||||
|
@ -141,8 +146,7 @@ pandora.ui.infoView = function(data) {
|
||||||
format: function(value) {
|
format: function(value) {
|
||||||
return formatTitle(value);
|
return formatTitle(value);
|
||||||
},
|
},
|
||||||
tooltip: isEditable ? 'Doubleclick to edit'
|
tooltip: isEditable ? 'Doubleclick to edit' : '',
|
||||||
: canEdit ? 'Doubleclick to reload metadata' : '',
|
|
||||||
value: data.title
|
value: data.title
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
|
@ -152,13 +156,11 @@ pandora.ui.infoView = function(data) {
|
||||||
MozUserSelect: 'text',
|
MozUserSelect: 'text',
|
||||||
WebkitUserSelect: 'text'
|
WebkitUserSelect: 'text'
|
||||||
})
|
})
|
||||||
.bindEvent(Ox.extend({
|
.bindEvent({
|
||||||
submit: function(event) {
|
submit: function(event) {
|
||||||
editMetadata('title', event.value);
|
editMetadata('title', event.value);
|
||||||
}
|
}
|
||||||
}, !isEditable && canEdit ? {
|
})
|
||||||
doubleclick: reloadMetadata
|
|
||||||
} : {}))
|
|
||||||
.appendTo($text)
|
.appendTo($text)
|
||||||
)
|
)
|
||||||
.appendTo($text);
|
.appendTo($text);
|
||||||
|
@ -179,8 +181,7 @@ pandora.ui.infoView = function(data) {
|
||||||
? formatValue(value.split(', '), 'name')
|
? formatValue(value.split(', '), 'name')
|
||||||
: formatLight('Unknown Director');
|
: formatLight('Unknown Director');
|
||||||
},
|
},
|
||||||
tooltip: isEditable ? 'Doubleclick to edit'
|
tooltip: isEditable ? 'Doubleclick to edit' : '',
|
||||||
: canEdit ? 'Doubleclick to reload metadata' : '',
|
|
||||||
value: data.director ? data.director.join(', ') : 'Unknown Director'
|
value: data.director ? data.director.join(', ') : 'Unknown Director'
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
|
@ -190,13 +191,11 @@ pandora.ui.infoView = function(data) {
|
||||||
MozUserSelect: 'text',
|
MozUserSelect: 'text',
|
||||||
WebkitUserSelect: 'text'
|
WebkitUserSelect: 'text'
|
||||||
})
|
})
|
||||||
.bindEvent(Ox.extend({
|
.bindEvent({
|
||||||
submit: function(event) {
|
submit: function(event) {
|
||||||
editMetadata('director', event.value);
|
editMetadata('director', event.value);
|
||||||
}
|
}
|
||||||
}, !isEditable && canEdit ? {
|
})
|
||||||
doubleclick: reloadMetadata
|
|
||||||
} : {}))
|
|
||||||
)
|
)
|
||||||
.appendTo($text);
|
.appendTo($text);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue