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

@ -140,6 +140,7 @@ Ox.Select = function(options, self) {
self.$button = Ox.Button({
id: self.options.id + 'Button',
selectable: true,
style: 'symbol',
title: self.options.type == 'text' || !self.options.title
? 'select' : self.options.title,
@ -202,6 +203,7 @@ Ox.Select = function(options, self) {
function hideMenu() {
that.loseFocus();
that.removeClass('OxSelected');
self.$button.options({value: false});
}
function loseFocus() {
@ -215,6 +217,7 @@ Ox.Select = function(options, self) {
function showMenu() {
that.gainFocus();
that.addClass('OxSelected');
self.$button.options({value: true});
self.options.tooltip && that.$tooltip.hide();
self.$menu.showMenu();
}