1
0
Fork 0
forked from 0x2620/oxjs

make it possible to parse keywords from documented source

This commit is contained in:
rolux 2012-04-04 18:26:17 +02:00
commit fb8dd98b8a
5 changed files with 78 additions and 46 deletions

View file

@ -38,6 +38,7 @@ Ox.ButtonGroup = function(options, self) {
id: button.id || button,
title: button.title || button,
tooltip: button.tooltip,
width: button.width
}, self.options.selectable ? {
selected: Ox.toArray(self.options.value).indexOf(button.id || button) > -1
} : {});
@ -56,7 +57,7 @@ Ox.ButtonGroup = function(options, self) {
self.$buttons = [];
self.options.buttons.forEach(function(button, pos) {
var id = self.options.id + Ox.toTitleCase(button.id)
var id = self.options.id + Ox.toTitleCase(button.id);
self.$buttons[pos] = Ox.Button({
disabled: button.disabled,
group: true,
@ -67,7 +68,8 @@ Ox.ButtonGroup = function(options, self) {
title: button.title,
tooltip: button.tooltip,
type: self.options.type,
value: button.selected
value: button.selected,
width: button.width
})
.bindEvent('change', function() {
self.options.selectable && toggleButton(pos);