even more lists stuff

This commit is contained in:
rlx 2011-01-14 09:54:28 +00:00
parent 8e93352c4c
commit ef514be445
2 changed files with 30 additions and 24 deletions

View file

@ -793,7 +793,6 @@ Lists
.OxTextList .OxBar .OxHead {
position: absolute;
left: 0;
right: 12px;
height: 16px;
overflow: hidden;
white-space: nowrap;
@ -1174,18 +1173,22 @@ Panels
margin: 1px 0 0 0;
font-weight: bold;
}
.OxCollapsePanel > .OxBar > .OxSelect {
position: absolute;
right: 0px;
.OxCollapsePanel > .OxBar > .OxExtras {
float: right;
}
.OxCollapsePanel > .OxBar > .OxExtras > .OxButton {
//position: absolute;
//right: 0px;
-moz-border-radius: 0;
-webkit-border-radius: 0;
}
.OxCollapsePanel > .OxBar > .OxExtras > .OxSelect {
//position: absolute;
//right: 0px;
width: 14px;
height: 16px;
padding-top: 1px;
border-width: 0 0 0 1px;
background: rgba(0, 0, 0, 0);
font-size: 11px;
text-align: center;
cursor: pointer;
overflow: hidden;
-moz-border-radius: 0;
-webkit-border-radius: 0;
}

View file

@ -2167,10 +2167,13 @@ requires
if (!self.options.selectable) {
that.triggerEvent('click', data);
} else {
//self.options.selected = !self.options.selected;
//that.toggleClass('OxSelected');
if (self.options.group) {
that.triggerEvent('select', data);
} else {
that.toggleSelected();
//that.triggerEvent('change', {selected: self.options.selected});
}
}
if (self.titles.length == 2) {
@ -2230,12 +2233,14 @@ requires
that.options({
enabled: !self.options.disabled
});
//self.options.disabled = !self.options.disabled;
}
that.toggleSelected = function() {
that.options({
selected: !self.options.selected
});
//self.options.selected = !self.options.selected;
}
that.toggleTitle = function() {
@ -7297,6 +7302,9 @@ requires
}).appendTo(that);
that.$head = new Ox.Container()
.addClass('OxHead')
.css({
right: self.options.scrollbarVisible ? oxui.scrollbarSize + 'px' : 0
})
.appendTo(that.$bar);
that.$head.$content.addClass('OxTitles');
constructHead();
@ -9420,12 +9428,13 @@ requires
that = new Ox.Panel({}, self)
.defaults({
collapsed: false,
menu: [],
extras: [],
size: 16,
title: ''
})
.options(options)
.addClass('OxCollapsePanel'),
// fixme: the following should all be self.foo
title = self.options.collapsed ?
[{id: 'expand', title: 'expand'}, {id: 'collapse', title: 'collapse'}] :
[{id: 'collapse', title: 'collapse'}, {id: 'expand', title: 'expand'}],
@ -9445,17 +9454,15 @@ requires
$title = new Ox.Element()
.addClass('OxTitle')
.html(self.options.title/*.toUpperCase()*/)
.appendTo($titlebar),
$extras;
if (self.options.extras.length) {
$extras = new Ox.Element()
.addClass('OxExtras')
.appendTo($titlebar);
if (self.options.menu.length) {
that.$menu = new Ox.Select({
items: self.options.menu,
max: 0,
min: 0,
selectable: false,
type: 'image'
})
.bindEvent({click: clickMenu})
.appendTo($titlebar)
self.options.extras.forEach(function($extra) {
$extra.appendTo($extras);
});
}
that.$content = new Ox.Element()
.addClass('OxContent')
@ -9467,10 +9474,6 @@ requires
marginTop: -that.$content.height() + 'px'
});
}
function clickMenu(event, data) {
// fixme: not the best event name
that.triggerEvent('click', data);
}
function dblclickTitlebar(e) {
if (!$(e.target).hasClass('OxButton')) {
$switch.trigger('click');