1
0
Fork 0
forked from 0x2620/oxjs

use themed modes in Ox.Button, Ox.MenuButton and Ox.Select

This commit is contained in:
rolux 2012-12-28 18:55:52 +01:00
commit 6364408236
3 changed files with 25 additions and 7 deletions

View file

@ -73,6 +73,7 @@ Ox.MenuButton = function(options, self) {
self.$button = Ox.Button({
id: self.options.id + 'Button',
selectable: true,
overlap: self.options.overlap,
style: 'symbol',
title: self.options.type == 'text' || !self.options.title
@ -107,12 +108,14 @@ Ox.MenuButton = function(options, self) {
function hideMenu(data) {
that.loseFocus();
that.removeClass('OxSelected');
self.$button.options({value: false});
that.triggerEvent('hide');
}
function showMenu() {
that.gainFocus();
that.addClass('OxSelected');
self.$button.options({value: true});
self.options.tooltip && that.$tooltip.hide();
self.$menu.showMenu();
that.triggerEvent('show');