Commit 69dc80f6 authored by JC Brand's avatar JC Brand

Bugfixes around resizing for chat rooms.

- Make sure initDragResize gets called (in .show())
- Handle case (which shouldn't happen and is hopefully now fixed) when min_height is not set.
parent fa49fbee
...@@ -1774,7 +1774,7 @@ ...@@ -1774,7 +1774,7 @@
if (converse.resizing.direction.indexOf('top') === 0) { if (converse.resizing.direction.indexOf('top') === 0) {
diff = ev.pageY - this.prev_pageY; diff = ev.pageY - this.prev_pageY;
if (diff) { if (diff) {
this.height = ((this.height-diff) > this.model.get('min_height')) ? (this.height-diff) : this.model.get('min_height'); this.height = ((this.height-diff) > (this.model.get('min_height') || 0)) ? (this.height-diff) : this.model.get('min_height');
this.prev_pageY = ev.pageY; this.prev_pageY = ev.pageY;
this.setChatBoxHeight(this.height); this.setChatBoxHeight(this.height);
} }
...@@ -1782,7 +1782,7 @@ ...@@ -1782,7 +1782,7 @@
if (converse.resizing.direction.indexOf('left') !== -1) { if (converse.resizing.direction.indexOf('left') !== -1) {
diff = this.prev_pageX - ev.pageX; diff = this.prev_pageX - ev.pageX;
if (diff) { if (diff) {
this.width = ((this.width+diff) > this.model.get('min_width')) ? (this.width+diff) : this.model.get('min_width'); this.width = ((this.width+diff) > (this.model.get('min_width') || 0)) ? (this.width+diff) : this.model.get('min_width');
this.prev_pageX = ev.pageX; this.prev_pageX = ev.pageX;
this.setChatBoxWidth(this.width); this.setChatBoxWidth(this.width);
} }
...@@ -2839,7 +2839,7 @@ ...@@ -2839,7 +2839,7 @@
this.occupantsview.model.browserStorage = new Backbone.BrowserStorage[converse.storage](id); this.occupantsview.model.browserStorage = new Backbone.BrowserStorage[converse.storage](id);
this.occupantsview.chatroomview = this; this.occupantsview.chatroomview = this;
this.render(); this.render().$el.hide();
this.occupantsview.model.fetch({add:true}); this.occupantsview.model.fetch({add:true});
this.join(null, {'maxstanzas': converse.muc_history_max_stanzas}); this.join(null, {'maxstanzas': converse.muc_history_max_stanzas});
this.fetchMessages(); this.fetchMessages();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment