some bugfixes
This commit is contained in:
parent
85f85f7250
commit
7439ca7d07
1 changed files with 21 additions and 14 deletions
|
@ -432,7 +432,7 @@ requires
|
|||
}
|
||||
},
|
||||
focused: function() {
|
||||
return stack[stack.length - 1];
|
||||
return stack.length ? stack[stack.length - 1] : null;
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
@ -597,7 +597,8 @@ requires
|
|||
}
|
||||
});
|
||||
function keypress(event) {
|
||||
var key,
|
||||
var focused = Ox.Focus.focused(),
|
||||
key,
|
||||
keys = [],
|
||||
//ret = true,
|
||||
time;
|
||||
|
@ -620,7 +621,7 @@ requires
|
|||
buffer += key == 'SPACE' ? ' ' : key;
|
||||
bufferTime = time;
|
||||
}
|
||||
$elements[Ox.Focus.focused()].trigger('ox_key_' + key);
|
||||
focused && $elements[focused].trigger('ox_key_' + key);
|
||||
//return false;
|
||||
/*
|
||||
$.each(stack, function(i, v) {
|
||||
|
@ -1061,7 +1062,7 @@ requires
|
|||
return ret;
|
||||
};
|
||||
|
||||
that.remove = function() {
|
||||
that.remove = function() { // fixme: clashes with jquery, should be removeElement
|
||||
//self.options && Ox.Event.unbind(self.options.id); // there are optionless elements, like the dialog layer
|
||||
//that.loseFocus();
|
||||
that.$element.remove();
|
||||
|
@ -1453,7 +1454,7 @@ requires
|
|||
clientXY: self.options.orientation == 'horizontal' ? 'clientY' : 'clientX',
|
||||
dimensions: oxui.getDimensions(self.options.orientation), // fixme: should orientation be the opposite orientation here?
|
||||
edges: oxui.getEdges(self.options.orientation),
|
||||
ids: $.map(self.options.elements, function(element) {
|
||||
ids: $.map(self.options.elements, function(element) { // fixme: needed?
|
||||
return element.options('id');
|
||||
}),
|
||||
leftOrTop: self.options.edge == 'left' || self.options.edge == 'top',
|
||||
|
@ -1478,17 +1479,21 @@ requires
|
|||
if (self.options.size != size) {
|
||||
that.css(self.edges[self.leftOrTop ? 2 : 3], self.options.size + 'px');
|
||||
if (self.leftOrTop) {
|
||||
self.options.elements[0].css(self.dimensions[1], self.options.size + 'px');
|
||||
self.options.elements[1].css(self.edges[2], (self.options.size + 1) + 'px');
|
||||
Ox.Event.trigger(self.ids[0], 'resize', self.options.size);
|
||||
Ox.Event.trigger(self.ids[1], 'resize', self.options.elements[1][self.dimensions[1]]());
|
||||
self.options.elements[0]
|
||||
.css(self.dimensions[1], self.options.size + 'px')
|
||||
.triggerEvent('resize', self.options.size);
|
||||
self.options.elements[1]
|
||||
.css(self.edges[2], (self.options.size + 1) + 'px')
|
||||
.triggerEvent('resize', self.options.elements[1][self.dimensions[1]]());
|
||||
self.options.parent.updateSize(self.ids[0], self.options.size);
|
||||
} else {
|
||||
self.options.elements[1].css(self.dimensions[1], self.options.size + 'px');
|
||||
self.options.elements[0].css(self.edges[3], (self.options.size + 1) + 'px');
|
||||
Ox.Event.trigger(self.ids[0], 'resize', self.options.elements[0][self.dimensions[1]]());
|
||||
Ox.Event.trigger(self.ids[1], 'resize', self.options.size);
|
||||
self.options.parent.updateSize(self.ids[1], self.options.size);
|
||||
self.options.elements[0]
|
||||
.css(self.edges[3], (self.options.size + 1) + 'px')
|
||||
.triggerEvent('resize', self.options.elements[0][self.dimensions[1]]());
|
||||
self.options.elements[1]
|
||||
.css(self.dimensions[1], self.options.size + 'px')
|
||||
.triggerEvent('resize', self.options.size);
|
||||
self.options.parent.updateSize(self.ids[1], self.options.size); // fixme: listen to event instead?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4324,6 +4329,8 @@ requires
|
|||
hide: hideMenu
|
||||
});
|
||||
|
||||
self.options.type == 'image' && self.$menu.addClass('OxRight');
|
||||
|
||||
function clickMenu(event, data) {
|
||||
Ox.print('%% clickMenu')
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue