Bugfix in room configuration code.

This commit is contained in:
JC Brand 2013-05-20 22:16:35 +02:00
parent 316d3f3396
commit feac7363ae
2 changed files with 6 additions and 4 deletions

View File

@ -536,6 +536,7 @@ p.room-info {
a.room-info {
background: url('images/information.png') no-repeat right top;
width: 22px;
height: 22px;
float: right;
display: none;
}

View File

@ -1138,6 +1138,7 @@
for (i=0; i<$fields.length; i++) {
$field = $($fields[i]);
if ($field.attr('type') == 'list-single') {
options = [];
$options = $field.find('option');
for (j=0; j<$options.length; j++) {
options.push(this.select_option_template({
@ -1155,7 +1156,7 @@
name: $field.attr('var'),
type: input_types[$field.attr('type')],
label: $field.attr('label') || '',
checked: $field.find('value').text() && 'checked="1"' || ''
checked: $field.find('value').text() === "1" && 'checked="1"' || ''
}));
} else {
$form.append(this.form_input_template({
@ -1196,8 +1197,8 @@
converse.connection.muc.saveConfiguration(
that.model.get('jid'),
configArray,
that.onConfigSaved,
that.onErrorConfigSaved
$.proxy(that.onConfigSaved, that),
$.proxy(that.onErrorConfigSaved, that)
);
}
});
@ -1214,7 +1215,7 @@
},
onErrorConfigSaved: function (stanza) {
// XXX
this.insertStatusNotification("An error occurred while trying to save the form.");
},
cancelConfiguration: function (ev) {