add flags

This commit is contained in:
rolux 2011-09-09 16:37:07 +00:00
parent 3154c18067
commit fcc98384e7
2 changed files with 30 additions and 0 deletions

View file

@ -566,6 +566,7 @@
"section": "items", "section": "items",
"showAnnotations": true, "showAnnotations": true,
"showControls": true, "showControls": true,
"showFlags": true,
"showGroups": true, "showGroups": true,
"showHome": true, "showHome": true,
"showInfo": true, "showInfo": true,

View file

@ -9,6 +9,35 @@ pandora.ui.group = function(id) {
{ {
align: 'left', align: 'left',
id: 'name', id: 'name',
format: function(value) {
return ['country', 'language'].indexOf(id) > -1
? $('<div>')
.append(
$('<img>')
.attr({src: Ox[
id == 'country' ? 'getImageByGeoname' : 'getImageByLanguage'
]('icon', 16, value)})
.css({
float: 'left',
width: '14px',
height: '14px',
margin: '0 3px 0 -2px',
borderRadius: '4px'
})
)
.append(
$('<div>')
.css({
float: 'left',
width: pandora.user.ui.groupsSizes[i] - 64 - Ox.UI.SCROLLBAR_SIZE,
//background: 'red',
textOverflow: 'ellipsis',
overflowX: 'hidden'
})
.html(value)
)
: value
},
operator: id == 'year' ? '-' : '+', operator: id == 'year' ? '-' : '+',
title: title, title: title,
unique: true, unique: true,