some fixed for text lists with column titles that are images

This commit is contained in:
rlx 2011-11-02 19:47:19 +00:00
parent 72676ed2bb
commit 0840d0b436
3 changed files with 23 additions and 16 deletions

View file

@ -348,6 +348,7 @@ Ox.TextList = function(options, self) {
})
.html(column.title)
.appendTo(self.$heads[i]);
if (column.operator) {
self.$orderButtons[i] = Ox.Button({
style: 'symbol',
title: column.operator == '+' ? 'up' : 'down',
@ -359,6 +360,7 @@ Ox.TextList = function(options, self) {
$(this).parent().trigger('click');
})
.appendTo(self.$heads[i]);
}
$resize = Ox.Element()
.addClass('OxResize')
.appendTo(that.$head.$content.$element);
@ -366,7 +368,7 @@ Ox.TextList = function(options, self) {
$('<div>').addClass('OxCenter').appendTo($resize);
$('<div>').appendTo($resize);
// if columns are resizable, bind click and drag events
if (self.options.columnsResizable) {
if (self.options.columnsResizable && column.resizable !== false) {
$resize.addClass('OxResizable')
.bindEvent({
doubleclick: function(data) {

View file

@ -134,7 +134,8 @@ Ox.Menu = function(options, self) {
checked: self.optionGroups[item.options('group')].checked().map(function(v) {
return {
id: that.items[v].options('id'),
title: Ox.stripTags(that.items[v].options('title')[0])
title: Ox.isString(that.items[v].options('title')[0])
? Ox.stripTags(that.items[v].options('title')[0]) : ''
};
})
});
@ -144,7 +145,8 @@ Ox.Menu = function(options, self) {
menu.triggerEvent('change', {
checked: item.options('checked'),
id: item.options('id'),
title: Ox.stripTags(item.options('title')[0])
title: Ox.isString(item.options('title')[0])
? Ox.stripTags(item.options('title')[0]) : ''
});
}
} else {
@ -423,7 +425,8 @@ Ox.Menu = function(options, self) {
///* disabled
that.triggerEvent('select', {
id: item.options('id'),
title: Ox.stripTags(item.options('title')[0])
title: Ox.isString(item.options('title')[0])
? Ox.stripTags(item.options('title')[0]) : ''
});
//*/
}

View file

@ -72,7 +72,9 @@ Ox.MenuItem = function(options, self) {
that.$title = $('<td>', {
'class': 'OxCell OxTitle',
css: self.options.maxWidth ? {maxWidth: self.options.maxWidth} : {},
html: self.options.title[0]
html: Ox.isString(self.options.title[0])
? self.options.title[0]
: $('<div>').html(self.options.title[0]).html()
})
)
.append(