Picker: use Ox.$; use on click, not click
This commit is contained in:
parent
fe5dc99d26
commit
e7f9279a9d
1 changed files with 8 additions and 5 deletions
|
@ -43,8 +43,7 @@ Ox.Picker = function(options, self) {
|
||||||
height: (self.options.elementHeight + 24) + 'px'
|
height: (self.options.elementHeight + 24) + 'px'
|
||||||
});
|
});
|
||||||
|
|
||||||
self.options.element
|
self.options.element.css({
|
||||||
.css({
|
|
||||||
width: self.options.elementWidth + 'px',
|
width: self.options.elementWidth + 'px',
|
||||||
height: self.options.elementHeight + 'px'
|
height: self.options.elementHeight + 'px'
|
||||||
})
|
})
|
||||||
|
@ -65,12 +64,16 @@ Ox.Picker = function(options, self) {
|
||||||
title: Ox._('Done'),
|
title: Ox._('Done'),
|
||||||
width: 48
|
width: 48
|
||||||
})
|
})
|
||||||
.click(hideMenu)
|
.bindEvent({
|
||||||
|
click: hideMenu
|
||||||
|
})
|
||||||
.appendTo(self.$bar);
|
.appendTo(self.$bar);
|
||||||
|
|
||||||
self.$layer = $('<div>')
|
self.$layer = Ox.$('<div>')
|
||||||
.addClass('OxLayer')
|
.addClass('OxLayer')
|
||||||
.click(hideMenu);
|
.on({
|
||||||
|
click: hideMenu
|
||||||
|
});
|
||||||
|
|
||||||
function hideMenu() {
|
function hideMenu() {
|
||||||
self.$menu.detach();
|
self.$menu.detach();
|
||||||
|
|
Loading…
Reference in a new issue