Bugfix in room configuration code.
This commit is contained in:
parent
316d3f3396
commit
feac7363ae
@ -536,6 +536,7 @@ p.room-info {
|
|||||||
a.room-info {
|
a.room-info {
|
||||||
background: url('images/information.png') no-repeat right top;
|
background: url('images/information.png') no-repeat right top;
|
||||||
width: 22px;
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
float: right;
|
float: right;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -1138,6 +1138,7 @@
|
|||||||
for (i=0; i<$fields.length; i++) {
|
for (i=0; i<$fields.length; i++) {
|
||||||
$field = $($fields[i]);
|
$field = $($fields[i]);
|
||||||
if ($field.attr('type') == 'list-single') {
|
if ($field.attr('type') == 'list-single') {
|
||||||
|
options = [];
|
||||||
$options = $field.find('option');
|
$options = $field.find('option');
|
||||||
for (j=0; j<$options.length; j++) {
|
for (j=0; j<$options.length; j++) {
|
||||||
options.push(this.select_option_template({
|
options.push(this.select_option_template({
|
||||||
@ -1155,7 +1156,7 @@
|
|||||||
name: $field.attr('var'),
|
name: $field.attr('var'),
|
||||||
type: input_types[$field.attr('type')],
|
type: input_types[$field.attr('type')],
|
||||||
label: $field.attr('label') || '',
|
label: $field.attr('label') || '',
|
||||||
checked: $field.find('value').text() && 'checked="1"' || ''
|
checked: $field.find('value').text() === "1" && 'checked="1"' || ''
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
$form.append(this.form_input_template({
|
$form.append(this.form_input_template({
|
||||||
@ -1196,8 +1197,8 @@
|
|||||||
converse.connection.muc.saveConfiguration(
|
converse.connection.muc.saveConfiguration(
|
||||||
that.model.get('jid'),
|
that.model.get('jid'),
|
||||||
configArray,
|
configArray,
|
||||||
that.onConfigSaved,
|
$.proxy(that.onConfigSaved, that),
|
||||||
that.onErrorConfigSaved
|
$.proxy(that.onErrorConfigSaved, that)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1214,7 +1215,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onErrorConfigSaved: function (stanza) {
|
onErrorConfigSaved: function (stanza) {
|
||||||
// XXX
|
this.insertStatusNotification("An error occurred while trying to save the form.");
|
||||||
},
|
},
|
||||||
|
|
||||||
cancelConfiguration: function (ev) {
|
cancelConfiguration: function (ev) {
|
||||||
|
Loading…
Reference in New Issue
Block a user