fix a split panel bug
This commit is contained in:
parent
c123de8513
commit
5efe54c0e2
2 changed files with 2 additions and 4 deletions
|
@ -126,14 +126,11 @@ Ox.Menu = function(options, self) {
|
||||||
}
|
}
|
||||||
if (item.options('checked') !== null) {
|
if (item.options('checked') !== null) {
|
||||||
if (item.options('group')) {
|
if (item.options('group')) {
|
||||||
//Ox.print('has group', item.options('group'))
|
|
||||||
toggled = self.optionGroups[item.options('group')].toggle(position);
|
toggled = self.optionGroups[item.options('group')].toggle(position);
|
||||||
//Ox.print('toggled', toggled)
|
|
||||||
if (toggled.length) {
|
if (toggled.length) {
|
||||||
toggled.forEach(function(pos) {
|
toggled.forEach(function(pos) {
|
||||||
that.items[pos].toggleChecked();
|
that.items[pos].toggleChecked();
|
||||||
});
|
});
|
||||||
//Ox.print('--triggering change event--');
|
|
||||||
menu.triggerEvent('change', {
|
menu.triggerEvent('change', {
|
||||||
id: item.options('group'),
|
id: item.options('group'),
|
||||||
checked: $.map(self.optionGroups[item.options('group')].checked(), function(v, i) {
|
checked: $.map(self.optionGroups[item.options('group')].checked(), function(v, i) {
|
||||||
|
@ -297,6 +294,7 @@ Ox.Menu = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getItemPositionById(id) {
|
function getItemPositionById(id) {
|
||||||
|
// fixme: this exists in ox.js by now
|
||||||
var position;
|
var position;
|
||||||
Ox.forEach(that.items, function(item, i) {
|
Ox.forEach(that.items, function(item, i) {
|
||||||
if (item.options('id') == id) {
|
if (item.options('id') == id) {
|
||||||
|
|
|
@ -432,11 +432,11 @@ Ox.SplitPanel_ = function(options, self) {
|
||||||
element.collapsed = !element.collapsed;
|
element.collapsed = !element.collapsed;
|
||||||
css['margin' + Ox.toTitleCase(self.edges[0][index])] =
|
css['margin' + Ox.toTitleCase(self.edges[0][index])] =
|
||||||
element.collapsed ? -size : 0;
|
element.collapsed ? -size : 0;
|
||||||
Ox.print('css', css);
|
|
||||||
that.animate(css, 250, function() {
|
that.animate(css, 250, function() {
|
||||||
element.element.triggerEvent('toggle', {collapsed: element.collapsed});
|
element.element.triggerEvent('toggle', {collapsed: element.collapsed});
|
||||||
triggerEvents('resize', pos);
|
triggerEvents('resize', pos);
|
||||||
});
|
});
|
||||||
|
self.$resizebars[pos == 0 ? 0 : 1].options({collapsed: element.collapsed});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue