From bf9f14cf039b4d636a68dd3dc0f78889855dbde7 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Thu, 3 Nov 2011 12:57:46 +0000 Subject: [PATCH] add titleImage option to TextList columns --- source/Ox.UI/js/List/Ox.TextList.js | 11 ++++++++++- source/Ox.UI/js/Map/Ox.ListMap.js | 9 ++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/source/Ox.UI/js/List/Ox.TextList.js b/source/Ox.UI/js/List/Ox.TextList.js index 4d9c557f..f291fa02 100644 --- a/source/Ox.UI/js/List/Ox.TextList.js +++ b/source/Ox.UI/js/List/Ox.TextList.js @@ -16,6 +16,7 @@ Ox.TextList TextList Object map function that maps values to sort values operator default sort operator title ... + titleImage ... unique If true, this column acts as unique id visible ... width ... @@ -346,8 +347,16 @@ Ox.TextList = function(options, self) { width: self.columnWidths[i] - 9 + 'px', textAlign: column.align }) - .html(column.title) .appendTo(self.$heads[i]); + if (column.titleImage) { + self.$titles[i].append( + $('').attr({ + src: Ox.UI.getImageURL('symbol' + Ox.toTitleCase(column.titleImage)) + }) + ) + } else { + self.$titles[i].html(column.title); + } if (column.operator) { self.$orderButtons[i] = Ox.Button({ style: 'symbol', diff --git a/source/Ox.UI/js/Map/Ox.ListMap.js b/source/Ox.UI/js/Map/Ox.ListMap.js index a2b97c79..b57af967 100644 --- a/source/Ox.UI/js/Map/Ox.ListMap.js +++ b/source/Ox.UI/js/Map/Ox.ListMap.js @@ -69,13 +69,8 @@ Ox.ListMap = function(options, self) { }, id: 'countryCode', resizable: false, // fixme: implement - /* - // fixme: why does this not work? it does in folderBrowserList - title: $('').attr({ - src: Ox.UI.getImageURL('symbolFlag') - }), - */ - title: '\u2691', + title: 'Flag', + titleImage: 'flag', visible: true, width: 16 },