|
@@ -445,6 +445,7 @@
|
|
// localstorage
|
|
// localstorage
|
|
this.model.save();
|
|
this.model.save();
|
|
}
|
|
}
|
|
|
|
+ this.occupantsview.setOccupantsHeight();
|
|
},
|
|
},
|
|
|
|
|
|
afterConnected: function () {
|
|
afterConnected: function () {
|
|
@@ -2005,9 +2006,10 @@
|
|
|
|
|
|
renderRoomFeatures: function () {
|
|
renderRoomFeatures: function () {
|
|
var picks = _.pick(this.chatroomview.model.attributes, ROOM_FEATURES),
|
|
var picks = _.pick(this.chatroomview.model.attributes, ROOM_FEATURES),
|
|
- iteratee = function (a, v) { return a || v; };
|
|
|
|
- this.$('.chatroom-features').html(
|
|
|
|
- tpl_chatroom_features(
|
|
|
|
|
|
+ iteratee = function (a, v) { return a || v; },
|
|
|
|
+ el = this.el.querySelector('.chatroom-features');
|
|
|
|
+
|
|
|
|
+ el.innerHTML = tpl_chatroom_features(
|
|
_.extend(this.chatroomview.model.toJSON(), {
|
|
_.extend(this.chatroomview.model.toJSON(), {
|
|
'has_features': _.reduce(_.values(picks), iteratee),
|
|
'has_features': _.reduce(_.values(picks), iteratee),
|
|
'label_features': __('Features'),
|
|
'label_features': __('Features'),
|
|
@@ -2037,11 +2039,17 @@
|
|
'tt_temporary': __('This room will disappear once the last person leaves'),
|
|
'tt_temporary': __('This room will disappear once the last person leaves'),
|
|
'tt_unmoderated': __('This room is not being moderated'),
|
|
'tt_unmoderated': __('This room is not being moderated'),
|
|
'tt_unsecured': __('This room does not require a password upon entry')
|
|
'tt_unsecured': __('This room does not require a password upon entry')
|
|
- }))
|
|
|
|
- );
|
|
|
|
|
|
+ }));
|
|
|
|
+ this.setOccupantsHeight();
|
|
return this;
|
|
return this;
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ setOccupantsHeight: function () {
|
|
|
|
+ var el = this.el.querySelector('.chatroom-features');
|
|
|
|
+ this.el.querySelector('.occupant-list').style.cssText =
|
|
|
|
+ 'height: calc(100% - '+el.offsetHeight+'px - 5em);';
|
|
|
|
+ },
|
|
|
|
+
|
|
onOccupantAdded: function (item) {
|
|
onOccupantAdded: function (item) {
|
|
var view = this.get(item.get('id'));
|
|
var view = this.get(item.get('id'));
|
|
if (!view) {
|
|
if (!view) {
|