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