Ox.FormPanel: use section id, not title, as values key; use 'OxSelectable' class

This commit is contained in:
rolux 2012-06-14 12:34:24 +02:00
parent 75b1fbbc7f
commit 38e01c26ca

View file

@ -83,12 +83,14 @@ Ox.FormPanel = function(options, self) {
})
.append(
$('<div>')
.addClass('OxSelectable')
.css({marginBottom: '8px', fontWeight: 'bold'})
.html((i + 1) + '. ' + section.title)
)
.append(
$('<div>')
.css({marginBottom: '16px', WebkitUserSelect: 'text'})
.addClass('OxSelectable')
.css({marginBottom: '16px'})
.html(section.description)
)
.append(
@ -187,7 +189,7 @@ Ox.FormPanel = function(options, self) {
that.values = function() {
var values = {};
self.options.form.forEach(function(section, i) {
values[section.title] = self.$forms[i].values();
values[section.id] = self.$forms[i].values();
});
return values;
};