some fixed for text lists with column titles that are images
This commit is contained in:
parent
72676ed2bb
commit
0840d0b436
3 changed files with 23 additions and 16 deletions
|
@ -348,17 +348,19 @@ Ox.TextList = function(options, self) {
|
||||||
})
|
})
|
||||||
.html(column.title)
|
.html(column.title)
|
||||||
.appendTo(self.$heads[i]);
|
.appendTo(self.$heads[i]);
|
||||||
self.$orderButtons[i] = Ox.Button({
|
if (column.operator) {
|
||||||
style: 'symbol',
|
self.$orderButtons[i] = Ox.Button({
|
||||||
title: column.operator == '+' ? 'up' : 'down',
|
style: 'symbol',
|
||||||
type: 'image'
|
title: column.operator == '+' ? 'up' : 'down',
|
||||||
})
|
type: 'image'
|
||||||
.addClass('OxOrder')
|
})
|
||||||
.css({marginTop: (column.operator == '+' ? 1 : -1) + 'px'})
|
.addClass('OxOrder')
|
||||||
.click(function() {
|
.css({marginTop: (column.operator == '+' ? 1 : -1) + 'px'})
|
||||||
$(this).parent().trigger('click');
|
.click(function() {
|
||||||
})
|
$(this).parent().trigger('click');
|
||||||
.appendTo(self.$heads[i]);
|
})
|
||||||
|
.appendTo(self.$heads[i]);
|
||||||
|
}
|
||||||
$resize = Ox.Element()
|
$resize = Ox.Element()
|
||||||
.addClass('OxResize')
|
.addClass('OxResize')
|
||||||
.appendTo(that.$head.$content.$element);
|
.appendTo(that.$head.$content.$element);
|
||||||
|
@ -366,7 +368,7 @@ Ox.TextList = function(options, self) {
|
||||||
$('<div>').addClass('OxCenter').appendTo($resize);
|
$('<div>').addClass('OxCenter').appendTo($resize);
|
||||||
$('<div>').appendTo($resize);
|
$('<div>').appendTo($resize);
|
||||||
// if columns are resizable, bind click and drag events
|
// if columns are resizable, bind click and drag events
|
||||||
if (self.options.columnsResizable) {
|
if (self.options.columnsResizable && column.resizable !== false) {
|
||||||
$resize.addClass('OxResizable')
|
$resize.addClass('OxResizable')
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
doubleclick: function(data) {
|
doubleclick: function(data) {
|
||||||
|
|
|
@ -134,7 +134,8 @@ Ox.Menu = function(options, self) {
|
||||||
checked: self.optionGroups[item.options('group')].checked().map(function(v) {
|
checked: self.optionGroups[item.options('group')].checked().map(function(v) {
|
||||||
return {
|
return {
|
||||||
id: that.items[v].options('id'),
|
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', {
|
menu.triggerEvent('change', {
|
||||||
checked: item.options('checked'),
|
checked: item.options('checked'),
|
||||||
id: item.options('id'),
|
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 {
|
} else {
|
||||||
|
@ -423,7 +425,8 @@ Ox.Menu = function(options, self) {
|
||||||
///* disabled
|
///* disabled
|
||||||
that.triggerEvent('select', {
|
that.triggerEvent('select', {
|
||||||
id: item.options('id'),
|
id: item.options('id'),
|
||||||
title: Ox.stripTags(item.options('title')[0])
|
title: Ox.isString(item.options('title')[0])
|
||||||
|
? Ox.stripTags(item.options('title')[0]) : ''
|
||||||
});
|
});
|
||||||
//*/
|
//*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,9 @@ Ox.MenuItem = function(options, self) {
|
||||||
that.$title = $('<td>', {
|
that.$title = $('<td>', {
|
||||||
'class': 'OxCell OxTitle',
|
'class': 'OxCell OxTitle',
|
||||||
css: self.options.maxWidth ? {maxWidth: self.options.maxWidth} : {},
|
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(
|
.append(
|
||||||
|
|
Loading…
Add table
Reference in a new issue