From fcc98384e73920500e349918ec7d721bfd65d079 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 9 Sep 2011 16:37:07 +0000 Subject: [PATCH] add flags --- pandora/0xdb.json | 1 + static/js/pandora/ui/group.js | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/pandora/0xdb.json b/pandora/0xdb.json index 3153311a..ef09b9b5 100644 --- a/pandora/0xdb.json +++ b/pandora/0xdb.json @@ -566,6 +566,7 @@ "section": "items", "showAnnotations": true, "showControls": true, + "showFlags": true, "showGroups": true, "showHome": true, "showInfo": true, diff --git a/static/js/pandora/ui/group.js b/static/js/pandora/ui/group.js index b78f19eb..98c1c3f6 100644 --- a/static/js/pandora/ui/group.js +++ b/static/js/pandora/ui/group.js @@ -9,6 +9,35 @@ pandora.ui.group = function(id) { { align: 'left', id: 'name', + format: function(value) { + return ['country', 'language'].indexOf(id) > -1 + ? $('
') + .append( + $('') + .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( + $('
') + .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' ? '-' : '+', title: title, unique: true,