forked from 0x2620/pandora
add tooltip when country and year are editable
This commit is contained in:
parent
6707406294
commit
27b11d0ce9
2 changed files with 16 additions and 0 deletions
|
@ -7,6 +7,19 @@ pandora.ui.folderBrowserList = function(id) {
|
||||||
that = Ox.TextList({
|
that = Ox.TextList({
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
clickable: true,
|
||||||
|
format: function(value) {
|
||||||
|
return $('<img>').attr({
|
||||||
|
src: '/list/' + value + '/icon16.jpg'
|
||||||
|
}).css({
|
||||||
|
width: '14px',
|
||||||
|
height: '14px',
|
||||||
|
borderRadius: '4px',
|
||||||
|
margin: '0 0 0 -3px'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// FIXME: why does the above only work with clickable: true ??
|
||||||
|
/*
|
||||||
format: function() {
|
format: function() {
|
||||||
return $('<img>').attr({
|
return $('<img>').attr({
|
||||||
src: Ox.UI.getImageURL('symbolIcon')
|
src: Ox.UI.getImageURL('symbolIcon')
|
||||||
|
@ -16,6 +29,7 @@ pandora.ui.folderBrowserList = function(id) {
|
||||||
padding: '3px'
|
padding: '3px'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
id: 'id',
|
id: 'id',
|
||||||
operator: '+',
|
operator: '+',
|
||||||
title: $('<img>').attr({
|
title: $('<img>').attr({
|
||||||
|
|
|
@ -197,11 +197,13 @@ pandora.ui.infoView = function(data) {
|
||||||
.html(formatKey(key).replace('</span>', ' </span>'))
|
.html(formatKey(key).replace('</span>', ' </span>'))
|
||||||
.appendTo($div);
|
.appendTo($div);
|
||||||
Ox.Editable({
|
Ox.Editable({
|
||||||
|
clickLink: clickLink,
|
||||||
format: function(value) {
|
format: function(value) {
|
||||||
return value
|
return value
|
||||||
? formatValue(value.split(', '), key)
|
? formatValue(value.split(', '), key)
|
||||||
: formatLight('unknown');
|
: formatLight('unknown');
|
||||||
},
|
},
|
||||||
|
tooltip: 'Doubleclick to edit',
|
||||||
value: key == 'country'
|
value: key == 'country'
|
||||||
? (data[key] ? data[key].join(', ') : [''])
|
? (data[key] ? data[key].join(', ') : [''])
|
||||||
: data[key] || ''
|
: data[key] || ''
|
||||||
|
|
Loading…
Reference in a new issue